Giter Club home page Giter Club logo

esp32-cnc-mpg-handwheel-conversion-mach4's Introduction

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

Demonstration

https://www.youtube.com/watch?v=FvmKIaZbhRo

Required Arduino Libraries

https://github.com/emelianov/modbus-esp8266
https://github.com/madhephaestus/ESP32Encoder
https://github.com/tzapu/WiFiManager

ESP32 Firmware and Network Setup

  1. Upload the Mach4MPGModbus.ino file to the ESP32 using the Arduino (or other) IDE.
  2. Reboot the ESP32.
  3. 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, 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)

Parts List (Amazon links)

  1. MPG Handwheel
  2. Lipo Battery
  3. Lithium Battery Charger Module
  4. Boost Converter
  5. ESP32

Wiring

battery -> TP4056 Charger Module -> XL6009 Boost Convert (3.3 to 5V) -> MPG Estop switch -> ESP32 VIN/GND

(The LED on the MPG PCB is connected to the 3.3v and GND terminals on the ESP32)

MPG PCB:
ESP32 GND -> COM
ESP32 Pin 2 -> A+
ESP32 Pin 4 -> B+
ESP32 Pin 13 -> X Axis
ESP32 Pin 14 -> Y Axis
ESP32 Pin 27 -> Z Axis
ESP32 Pin 25 -> MPG Enable Switch
ESP32 Pin 32 -> A Axis
ESP32 Pin 35 -> B Axis (8k ohm pullup to 3.3v)
ESP32 Pin 34 -> C Axis (8k ohm pullup to 3.3v)
ESP32 Pin 15 -> Inc 1
ESP32 Pin 21 -> Inc 2
ESP32 Pin 22 -> Inc 3

Wiring an Ethernet Port

W5500 Lite:
ESP32 Pin 23 -> MOSI
ESP32 Pin 19 -> MISO
ESP32 Pin 18 -> SCLK
ESP32 Pin 5 -> CS
ESP32 Pin 26 -> RST

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.