Skip to content

NacreousDawn596/Penplotter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Pen Plotter Project ๐Ÿ–‹๏ธ

Pen Plotter in Action
A precise and elegant system for automated drawing using Arduino control.


โœจ Features

  • Modern Web UI: A sleek, user-friendly Electron application for easy control and visualization.
  • High-Precision Movement: DC motors with encoders ensure accurate X/Y/Z-axis positioning.
  • Interactive GUI: Built with Python and Tkinter for shape design and command execution.
  • 3D-Printed Frame: Customizable modular structure for easy assembly.
  • Automated Workflow: Converts digital designs into physical drawings via Arduino.

โšก Circuit Diagram

PDF cannot be displayed. Download it instead.

Components List

Component Quantity Description
416 DC Motor + Encoder 3 Controls X/Y/Z-axis movement
Arduino Uno R3 1 Main microcontroller
9V Battery 1 Power supply

โš ๏ธ Note: The report mentions Arduino Mega and stepper motors, but the BOM and circuit diagram specify Arduino Uno and DC motors. Ensure consistency in your hardware setup.


๐Ÿš€ Installation & Usage

๐Ÿ”ง Hardware Setup

  1. Assemble the 3D-printed frame.
  2. Mount the motors and attach the pen mechanism.
  3. Wire components as per the circuit diagram.

๐Ÿ’ป Software Setup

# Clone the repository
git clone https://github.com/NacreousDawn596/Penplotter.git

๐Ÿ–ฅ๏ธ For NixOS Users:

nix-shell

๐Ÿ—๏ธ For Non-NixOS Users:

python3 -m venv venv
source venv/bin/activate  # On Windows, use 'venv\Scripts\activate'
pip install -r requirements.txt
arduino-cli core install arduino:avr
arduino-cli lib install Stepper

install the imagemagick package as well if you wanna use the manual method, it's available in most package managers... or compile it from here.

๐Ÿ–ฅ๏ธ Electron Web UI (Recommended)

The easiest way to use the Pen Plotter is via the bundled Electron application.

Linux (AppImage)

  1. Download the latest PenPlotter-x.x.x.AppImage from the releases (or build it locally).
  2. Make it executable:
    chmod +x PenPlotter-1.0.0.AppImage
  3. Run it:
    ./PenPlotter-1.0.0.AppImage

Building from Source

If you want to build the application yourself:

  1. Install Dependencies: Ensure you have npm, python3, and arduino-cli installed.

    # Install Python dependencies
    pip install -r webui/backend/requirements.txt
  2. Build the App:

    cd webui/electron
    npm install
    npm run dist

    The output will be in webui/electron/dist.

โœ๏ธ Legacy / Manual Usage

๐Ÿ“Œ Manual Drawing via GUI

python3 manual.py /path/to/image

Controls:

  • Middle Click: Show/hide the image.
  • Right Click: Draw connected polygons.
  • Left Click: Draw a separate point and start a new polygon.
  • Close Window: Saves the drawing.

๐Ÿ–ผ๏ธ Automatic Image-to-Sketch Conversion

python3 main.py -h  # Show help command, adjust the parameters as needed. almost every image needs its own parameters.

Example:

python3 main.py criam.jpg criam  # Convert 'criam.jpg' to a sketch and save the code to ./criam/criam.ino

Alternatively, use an online AI tool to convert complex images to sketches before processing with main.py.

Execute:

Simply navigate to the folder where you saved your file.ino then:

arduino-cli board list

to show the available boards and finally upload using:

alias ards="sudo arduino-cli compile --fqbn <board, like arduino:avr:mega> ./ 
sudo arduino-cli upload -p <Port, like /dev/ttyACM0> --fqbn <board, like arduino:avr:mega> ./"

Alternatively you can use the ArduinoIDE


๐Ÿ“ Results

Geometric Shapes

Examples of drawings: faces, cars, landscapes, etc....


๐Ÿ”ฎ Future Improvements

  • โœ… Add SVG file support for more complex designs.
  • โœ… Implement wireless control (Bluetooth/Wi-Fi).
  • โœ… Enhance precision for intricate patterns.
  • โœ… Integrate with Raspberry Pi or ESP32 for advanced functionality.

Crafted with โค๏ธ by the PenPlotter Team

๐Ÿ’ก CRIAM ยท LinkedIn Page

About

a Robotics project that aims to create a Penplotter from scratch.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project