Skip to content

A DIY Mach4 MPG Handwheel (for controlling a CNC Machine) using an ESP32 development kit.

Notifications You must be signed in to change notification settings

kethort/esp32-cnc-mpg-handwheel-conversion-mach4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mach4 Wireless (Wifi) MPG Handwheel Using ESP32 and Modbus TCP library

Demonstration & Assembly

https://www.youtube.com/watch?v=sGhttK0reT0&t=2s
https://www.youtube.com/watch?v=5fpQ3xS1Tu8&t=2s

ESP32 Firmware and Network Setup

  1. Download NodeMCU-PyFlasher.exe program from here: https://github.com/marcelstoer/nodemcu-pyflasher/releases/tag/v5.0.0
  2. Connect a USB to FTDI or CP2102 to FTL programmer to the ESP32 PCB at the programmer port.
  3. Select the COM port of the programmer in the NodeMCU program.
  4. Select the Mach4MPGModbus-ILI9341-Display.ino.bin file from the fw-build folder and press the Flash NodeMCU button to flash the firmware to the ESP32.
  5. Reboot the ESP32.

  1. The ESP32 device should show up in the list of network access points.

  1. Connect to this access point and navigate to 192.168.4.1 in a browser.
  2. Press the "Configure Wifi" button.

  1. Find your network access point and connect to it by providing your network credentials.

Mach4 Software Setup

  1. Find the local IP address of the ESP32 (espressif).

  1. Launch the MPGInstaller.exe from the dist folder of the repo.
  2. Select the Mach4 profile you want to update, enter the IP address of the ESP32 and press install. (if the ESP32 device is already connected to the network, and in the ARP table, the IP address should auto-populate)

  1. Turn on the ESP32 MPG, open Mach4 and navigate to Diagnostic->Modbus in the File Menu.
  2. To connect or reconnect to the modbus device, press the stop button in the diagnostic window and then the play button. (Alternatively use the Wizard instead [step 6])

  1. The wizard can be accessed by opening the Wizard launcher in the Mach4 file menu. (Wizard->Select Wizard->MPGWiz)

Installer Build from Source

If you want to make changes to MPGInstaller.py and rebuild exe file:

  1. Install Python
  2. In elevated command line window from root directory of repo: pip install -r requirements.txt
  3. In command line window from root directory of repo: python setup.py py2exe

The updated .exe file will be created in the dist/ folder.

PCB Gerber File & 3d print files for Display included

Original 3d print: https://www.thingiverse.com/thing:4539827

About

A DIY Mach4 MPG Handwheel (for controlling a CNC Machine) using an ESP32 development kit.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published