Mach3 Cycle control box
2x Esp32-S2 Mini
3x Momentary Buttons
1x E-Stop Latching Button
On/Off Rocker Switch.
QI Charging Receiver
LiPo Battery
All part of the ESP32 Package:
|-esp_now.h
|-WiFi.h
|-USB.h
|-USBHIDKeyboard.h
YOU MUST run the MAC sketch on your receiver ESP32-S2 Mini device, and record the mac address from serial output. This will be REQUIRED in the transmitter sketch.
The goal of this repository is to make life a little easier on those DIY'ers who want a wireless control box for Cycle Start, Cycle Stop, Cycle Pause, and E-Stop buttons.
Using 2x Esp32-s2 mini's you'll be able to instantly trigger these buttons when pressed on ESP32-s2 Mini, and wirelessly send it to the other ESP32-S2 mini that's acting as an HID device. Essentially, what we're doing here is leveraging ESP-Now and the s2-mini's CDC to create a seamless wireless solution.
I purchased the control box with 22mm buttons, and an estop from Amazon, you can source, or build your own however you like.
In order to fully realize a truely wireless solution here, i also incorporated a TP4056 LiPo battery charger, an ON/OFF rocker switch, LiPo 2500mAH battery, and a wireless QI charging receiver. (I used one of those cheap aliexpress QI cellphone usbc plugin types, but i peeled the sticker back, desoldered the USBC FFC, and just wired directly to it)
The way i wired these:
as for the buttons, i daisy-chaned the ground from one button to the next, then to the ground on the ESP32-S2 Mini, then each button was wired to pins 2,3,4,5 respectively. (See the "Transmitter" file for pin mapping)
It is IMPORTANT to keep the battery, or any other metal, or metal containing part seperated from the QI charging coil by at least 10mm. These "sticker" type QI receiver coils oftend don't include a ferrite pad, so they will not work if there's metal near the coils.
![internals](https://github.com/ArcAIN6/Mach3_Lolin32-s2-mini_controller/assets/418929/a59c2df0-f2a2-4a1d-975f-373d3bd002e1)
The Receiver ESP32-S2 Mini doesn't really require much... Just edit your pins if you want LED's, and go.. (Be sure to check your specific Mach3 shortcuts to ensure the keyboard keys match the Mach3 shortcuts)