Skip to content

dorianborian/penbot-mini

Repository files navigation

PenBot-Mini

pbmini-gif

A 5-bar linkage drawing robot system utilizing an ESP32 firmware alongside a Python GUI controller over USB serial.

System Overview

The PenBot-Mini system consists of two main components:

  1. 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.
  2. 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.

Bill of Materials

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

Requirements

Hardware

  • ESP32 Microcontroller
  • 3x PWM Servos (M1 Left, M2 Right, Lift Motor)
  • 5-bar linkage mechanism

Software

  • Firmware Dependencies: ESP32Servo, ESPAsyncWebServer (via PlatformIO/Arduino IDE)
  • Controller Dependencies: Python 3.7+, pyserial

Usage

  1. Flash Firmware: Upload the INO sketch to your ESP32.
  2. Connect Device: Plug the ESP32 into your computer via USB. Ensure serial monitors are closed.
  3. Run Controller: �ash pip install -r requirements.txt python penbot_controller.py
  4. Operate: Select the COM port, click CONNECT, and use the GUI to draw!

About

Miniature 5-bar linkage drawing robot based on ESP32

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors