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!

09 sept. 2020 14:08

Content que ca fonctionne! Pour le fichier manquant c'etait ecrit dans le post original :) Mais je comprends o combien le desarroi quand ce message apparait, personnellement j'etais en panique et Philippe m'a bien aide!

Par contre j'ai rajoute le details de debrancher/rebrancher le controlleur apres les manip. Je l'ai fais tellement de fois que c'etait sans importance a mes yeux. la preuve que non...

09 sept. 2020 14:46

Ă  savoir aussi que vous pouvez reflasher le programme directement via esp3d 

il suffit de le compiler comme vous l'avez fait avec Vscode et de récuperer le firmware.bin dans \.pio\build\...

09 sept. 2020 14:53

par contre , pour utiliser la branche actuel du github (main) il faut bien faire la modification que tu as fais @Idefixes

je n'ai par contre pas testé sur la machine mais ça devrait normalement fonctionner

l'idéal serait de proposer à bdring un PR avec le fichier machine "topscnc_heavy.h"

09 sept. 2020 16:35

@Philippe : Pour la modif dont tu parles c'est bien les deux lignes que j'ai rajoutées? C'est quoi le "PR" pour toi?

09 sept. 2020 17:53

un Pull request github , en gros on lui propose d'intégrer le "topscnc_heavy.h" aux sources du code


ici ==>  https://github.com/bdring/Grbl_Esp32/tree/main/Grbl_Esp32/src/Machines


je regarderais demain , mais il faut que je test avant sur la cnc  que les modifs fonctionnent 

09 sept. 2020 18:43

Ah oui ce serait cool pour pouvoir profiter des ameliorations futures

11 sept. 2020 12:28

Salut ,

voilà je viens de tester le nouveau firmware sur lequel j'ai adapté le fichier machine

j'ai créé un github avec les source de grbl_esp32 + le fichier machine ==> https://github.com/tokaphi/Grbl_Esp32

et je verrais par la suite si topsie est d'accord pour proposer un PR à bdring afin qu'il intégre le fichier machine "topscnc_heavy"

dans la configuration de ce fichier j'ai activé le squaring sur l'AXE Y et je vais chercher les fdc dans le sens positif

@Turlutte si tu veux changer tes liens du premier post que l'on est bien tous le mĂŞme firmware

il possible de rencontrer une erreur de compilation avec cette nouvelle version de grbl (HTTPClient) ,

pour solutionner le problème il suffit de lancer la commande suivante dans le terminal de VScode==>  pio lib install "mbed-kazushi2008/HTTPClient"

j'ai Ă©galement renseignĂ© je fichier machine.h avec la bonne machine  


11 sept. 2020 13:41

Petite pĂ©cision 

il est important de respecter le cablage et l'emplacement des driver comme ceci 


MPCNC Grbl_ESP32 Controller

11 sept. 2020 15:45

Bon je crois que je vais me commander un autre ESP32 pour celle si au prix ou est le module....

12 sept. 2020 21:25

Merci Philippe, j'ai mis a jour le post original!

First post updated with newest info


Repondre

Connexion