A Raspberry Pi based plotter (SchetsjesJS)
I’ve seen something awesome when I was at JSConf in Budapest. An Arduino controlled by a Raspberry Pi drawing a giant skull on a whiteboard. I absolutely need this in my life, let’s try to build it for myself!
At JSConf the organisers invited the local hacker space from Budapest at one of the after parties and I really enjoyed myself there. At this after party they had retro consoles, a VR room and the opportunity for people to solder and watch a 3D printer and a device that drew a skull on a white board. The ‘plotter’ as they called it was based on a package you can buy (read more about it on the Makelangelo website), they assembled it and made it draw. I was amazed. I’ve seen a plotter before in a museum but having it draw anything you’d like at home would be crazy!
At the time of writing I’ve already ordered the components I need for this project: a stepper motor HAT from Adafruit and two 200-step stepper motors. I have no experience with motors whatsoever but I’m confident I’ll find my way since Adafruit has some nice demo code examples. I’ve also soldered the components already, and tested them with the demo code. Everything seems to work and my home didn’t burn down, I’m satisfied!
What’s a project without a basic plan? A hobby! Oh, wait, this is a hobby. Well, even hobbies need plans, and this is it in a nutshell:
Buy a MotorHAT and stepper motors Solder/assemble the MotorHAT Test the motors with demo code
- Assemble a basic drawing board
- Goal 1: draw a rectangle
- (This allows me to see what the maximum top/right/left/bottom positions are with the amount of turns and rope on the motors. It will likely also show me problems I didn’t think of before)
- Think of a way how the instructions need to be coded: array with top/left position? Or something different?
- Make a sample instruction set, based on an image and in the the newly thought of instructions convention
- For now a resolution of 10×10 pixels would be ok
- Determine shade of grey per pixel (5 shades)
- Decide what to do with the shades
- Goal 2: draw something according to the hard coded test routine
- Make a web-app that can convert an image to array of instructions
- Make it draw different patterns (what pattern I will end up with at this point is probably the easiest one at first)
SchetsjesJS: start your engines!
I’m excited about this new project but I’m also weary: this could prove to be a lot harder than I thought. I have a good sense of realism for this project: it could take a while. Having goal 1 met by drawing a rectangle will help a lot: this proves it could work, which grants me the energy to keep on going when the expected problems arise :) Go go goooo!