A 5-bar linkage drawing robot system utilizing an ESP32 firmware alongside a Python GUI controller over USB serial.
The PenBot-Mini system consists of two main components:
-
Firmware (penbot-mini-firmware.ino) An ESP32-based Arduino sketch that handles:
- Inverse Kinematics (IK) calculation for a 5-bar "Elbows Out" linkage.
- Dual servo control for X/Y movement and a separate servo for pen lifting.
- A 200-command drawing buffer/queue with a 30-millisecond execution rate limit to ensure smooth motor movement.
-
USB Controller (penbot_controller.py) A fast, responsive Tkinter GUI for controlling the robot.
- Control Tab: Real-time control to manually click/drag the robot with IK visualization.
- Draw Tab: A canvas to draw paths, text, or erase lines, which is then resampled and sent to the robot for execution.
| Qty | Part | Notes | Link |
|---|---|---|---|
| 2 | Petoi Alloy Servo Motors | Not sold on Amazon, purchased directly from Petoi. These are high-quality but expensive. The project could be modded to use standard hobby servos (e.g. DS3218, MG996R) with adjusted linkage geometry. |
Petoi Store |
| 1 | MG90S Micro Servo (Lift) | Standard micro servo for pen up/down | Amazon |
| 1 | Seeed XIAO ESP32-C6 | Microcontroller | Amazon |
| 1 | 30 AWG Wire | Flexible silicone wire recommended | Amazon |
| 3 | 1/4" ID × 1/2" OD Bearings | 0.25" inner / 0.5" outer diameter | Amazon |
| 6 | 5mm × 2mm Disc Magnets | Neodymium recommended | Amazon |
- ESP32 Microcontroller
- 3x PWM Servos (M1 Left, M2 Right, Lift Motor)
- 5-bar linkage mechanism
- Firmware Dependencies: ESP32Servo, ESPAsyncWebServer (via PlatformIO/Arduino IDE)
- Controller Dependencies: Python 3.7+, pyserial
- Flash Firmware: Upload the INO sketch to your ESP32.
- Connect Device: Plug the ESP32 into your computer via USB. Ensure serial monitors are closed.
- Run Controller:
�ash pip install -r requirements.txt python penbot_controller.py - Operate: Select the COM port, click CONNECT, and use the GUI to draw!