GRBL_ESP32 🇬🇧

02 sept. 2020 04:03

Hello everyone,

I am creating this ESP32 dedicated topic to help any beginners like me out there that are frightened when it comes to electronics/development. Also, a huge thanks to @Philippe and @Peter Donovan who are the brains behind this tutorial!

Why the upgrade?

  • Faster (boots in 2 seconds)
  • Powerful (dual-core 32bits Ă  Less prone to G code errors)
  • Spindle relay control
  • Wifi/Bluetooth with a Web ESP3D interface (no need to USB all the time, but in case you do, you can use UGS or CNCjs)
  • Misting control
  • PWM Laser control
  • Probe connector
  • Micro SD
  • And probably much more…

First what you’ll need in comparison to the Arduino/CNC Shield:

Before installing the ESP32 on the Board, you’ll need to program it:

Prepare the computer

  1. Download and Install Visual Studio Code
  2. Download and Install Platformio IDE
  3. Plug the ESP32 Controller via USB to your computer.
  4. Check that it’s recognized: Device Manager > Ports (you should see another port)
  5. If you don’t see the controller in the ports list, check the USB list. It should be here with a warning; this means you need to install the drivers so it’s properly recognized by Windows.
  6. Check now that you can see the board in the Devices tab in Platformio (click refresh if not)

Prepare Files

  1. Download files https://github.com/tokaphi/Grbl_Esp32
  2. In Visual studio, File > Add folder to Workspace and look for the folder you just downloaded
  3. Under GRBL_ESP32 folder > Machine, open the file “topscnc_heavy.h”
  4. Modify this file based on your machine configuration (sizes, accelerations, etc)
  5. Close and Save topscnc_heavy.h

Compile and Upload

  1. Click on the Build icon (small check icon in the bottom left of your screen) No worries if you get warnings such as “HOMING_CYCLE_0” redefined, this won't prevent the successful install)
  2. Click on the Upload icon (right arrow icon in the bottom left of your screen). Wait a little but you should see a SUCCESS in green after 20/30 seconds.

Connect

Unplug and plug again the controller. Now, you should now see a new wifi network called “GRBL_ESP”. The password is 12345678. The ESP3D control interface will automatically popup once connected.

Missing file

Once connected to the controller, it will ask you for Index.html.gz

You can find the file in the original folder you downloaded on Github in the previous step

You are done with the microcontroller!You can now install it on the board. Be careful with the direction!

Modifications you’ll want to make to the $ parameters can be done through the interface (Wrench GRBL Icon at the top). No need to go back to visual studio. Unless major mods of course.

As for the rest of the install: I created a wiring diagram for beginners like me, hope this helps! You can also find the wiring for an optocoupler to avoid EMI... https://www.dropbox.com/s/m4e9qbq3mhpfq14/CNC%20Wiring.pdf?dl=0

As noted on the diagram, be aware of the inversion for the secondary Y motor like the picture below

MPCNC Grbl_ESP32 Controller

I'm almost done with my setup but I will update this original post as I go if need be.

Enjoy!

08 sept. 2020 16:12

Bonsoir Idefixes,

This is weird because I don't even have the same folder structure as you... I don't have the "SRC/MOTORS" files per example.

Easy fix: I just uploaded my entire folder directly from Visual Studio here --> https://www.dropbox.com/s/n9bj0mh8ws496ed/CNC.7z?dl=0

Hopefully, this will help.

08 sept. 2020 17:46

Cool , i will try After dîner. Thanks

09 sept. 2020 08:10

Salut,

@idefixes,  ce n'est pas un souci de ne pas avoir un second moteur sur le X 

par contre la modif que tu as faite n'est pas necessaire si tu utilises ce que @Turlutte a mis Ă  dispo .

tu l'as récupéré où ton dossier Grbl_Esp32 ?

09 sept. 2020 09:01

je viens de regarder , 

en fait je comprend mieux il y a une mise Ă  jour et changement de branche sur github depuis que j'ai installĂ© Grbl_Esp32 (j'Ă©tais Ă  l'Ă©poque sur la branche master qui a Ă©tait mise en archive depuis ) 

voilà pourquoi le code est différent .



09 sept. 2020 09:54

@Philippe : "il y a une mise à jour et changement de branche sur github" c'est aussi ce que je m’étais dit. L'environnement ESP32 c'est encore du chinois pour moi même si j'arrive à par analogie et déduction à saisir certaines choses

09 sept. 2020 10:16

Bon grbl_esp32 ne veut pas vraiment de moi.....j'ai compilé le dossier de Turlutte avec succes......uploader dans l'esp32 avec succes semble t-il.....me suis dis je vais ouvrir CNCjs pour voir......

j'arrive à ouvrir une connexion avec l'esp32 mais à partir de ce moment la console tourne en boucle sur un message que je vous mets ci dessous encadré en jaune

Et il n'y a pas reseaux GRBL_ESP qui apparait?????? 
09 sept. 2020 10:41

Pour voir le reseau wifi , il faut que tu fasses un reset de l'esp32 en appuyant sur le petit bouton ou en le debranchant puis le rebranchant

si non sur sur VSCode tu regardes dans le terminal pour voir ce qu'il se passe lors du rst 




09 sept. 2020 11:58

Effectivement comme cela on obtiens résultat plus probant

j'ai bien le réseau GRBL_ESP mais par contre ESP_3D ne s'ouvre pas j'ai cela à la place


09 sept. 2020 12:05

Il te faut telecharger index.html.gz qui se trouve dans le dossier data de grbl_Esp32

1.parcourir

2. tu selectionnes index.html.gz

3. Upload

et l'interface va s'installer 

09 sept. 2020 13:39

Merci Philippe, c'est ce que j'avais trouvé je viens juste de voir ton message ....cela marche

@Turlutte : peut-être des précisions a mettre dans ton premier post pour le bleus dans mon genre

Ce qui est bien avec l'interface ESP3Dc'est qu'on a acces a tous les les reglages pas besoin de compiler...etc

Maintenant il ne me reste plus qu'a attendre de réceptionner l'ESP32 GRBL board pour pouvoir plugger l'ESP32, les drivers moteur, les moteurs et de voir comment tout cela se comporte


Repondre

Connexion