Drawing robot capable of rendering SVG paths over WebSockets. Powered by a Raspberry Pi running Node.js.
- Motor Mounts (two of each)
- Electronics Case
- Pen Holder Gondola
- Servo Horn Extension
- NEMA 17 Stepper Motors, 36.8oz.in 12v 0.4a (need 2) - $23.98
- Suction Cup with Quick Release (x2) - $5.98
- Spiderwire 80-pound fishing line - $17.56
- Micro USB cable 10-ft. 2-pack - $8.99
- Micro USB breakout 10-pcs (only need 2) - $6.59
- USB type a female breakout 2-pack - $4.50
- Raspberry Pi Zero W - $10)
- Easydriver Stepper Motor Driver (2-pack) - $9.99
- SG92R Micro Servo motor - $6.99
- 6003zz bearing 17x35x10 (need 2) - $11
- 10pcs 500mm 3-pin servo extensions (need several) - $7.69
- 2.1mm x 5.5mm barrel jack 15pcs (need 1) - $7.59
- 12v 1a power adapter 2.1mm/5.5mm lead - $9.99
- USB Micro Power Adapter - $5.99
- Pololu Universal Mounting Hub for 5mm shaft, #4-40 holes (2-pack) - $11.44
- USB fan (40mm) - $7.99
- #8-32 x 1-5/8 in. Eye Bolts (2-pack) - $0.98
- 8 screws for spools (#4-40 x ~½")
- 8 screws for motors (M3-.50 x 6mm metric machine screws)
- 1-2 small screws for gondola to secure pen/marker
- Mounting Putty - $4.87
- Standard wire or jumper wires (and headers for components if using jumpers)
- Dry erase markers (or other drawing implements)
- Micro SD card (class 10 or better)
Thank you to the kind people at the Johnson County Library's Black & Veatch MakerSpace for documenting the assembly process at instructables.com.
- Download and install Etcher.
- Download and install latest Raspbian OS and flash it onto your SD card with Etcher.
- Enable SSH by adding a blank file named
ssh
(no extension) to theboot
directory on the Pi's SD card. (Last tested with Raspbian Stretch Lite 2018-06-27 version.) - Set up Wifi by adding a file named
wpa_supplicant.conf
to the sameboot
directory with the following contents (replaceMySSID
andMyPassword
with your credentials):ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="MySSID" psk="MyPassword" }
From a device connected to the same network as the Drawbot Pi, SSH into the Pi with ssh pi@raspberrypi.local
. The default password is raspberry
.
Then, on the Drawbot Pi:
-
Update, upgrade, and install NPM, Git. (Automatically answer "yes" to everything.):
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install npm
sudo apt-get install git
-
Install Node.js.
sudo npm install -g n
(Install n for node.js version management. github.com/tj/n)sudo n stable
(Install latest stable version of Node.js. Last tested with v10.8.0)
-
Upgrade NPM. (and remove old apt-get version).
sudo npm install npm@latest -g
sudo apt-get remove npm
sudo reboot
(After rebooting, you'll have to SSH into the Pi again.)
-
Install pigpio C library. npmjs.com/package/pigpio
sudo apt-get install pigpio
(Only if you're using Raspbian Lite.)npm install pigpio
On the Drawbot Pi:
git clone https://github.com/andywise/drawbot.git
to clone this repository.cd drawbot
npm i
On the Drawbot Pi:
- Run
npm start
orsudo node draw.js
to start the Drawbot controller.
On a device connected to the same local network as the Drawbot Pi:
- Go to raspberrypi.local/control to access the Drawbot control interface.
- Use the "bullseye" interface to manually position the gondola, or raise/lower the pen/marker.
- Use the settings panel to configure the Drawbot's
D
,X
, andY
values (see "Configuration" below). - Drag and drop an SVG file onto the control interface to send artwork to the Drawbot!
- Only the first
<path>
element will be drawn, so if necessary, combine artwork into a single compound path. - The Drawbot will scale artwork so that 1 pixel = 1 millimeter.
- Enter value for
D
: measure distance between string starting points (in millimeters). - Enter starting
X
andY
values: measure distance from left and top (respectively) of left string starting point to initial pen position (also in mm). - Note: Values will be stored in the
config.json
file.
- For now, go check out "TSP Art."