[ Raspberry Pi/Piface ] Draw Bot Failure #1
This post is something a bit different to my previous posts, but hey.
I’ve been playing with a raspberry pi, piface and a whole slew of various things the past while.
My creation pictured above is a V-plotter prototype.
It works – to a degree, and has taught me tons about working with stepper motors.
The issue I have had is successfully keeping the pen or pencil in firm enough contact with the paper to draw a really visible line. I tried adding a magnet at the top of the pen-holder. This obviously acted as a pivot. Additionally it wasn’t possible to use a magnet large enough, as then the holder would remain in place, and not be pulled back down by gravity.
So I conceded, its not a failure. It requires re-engineering.
Anyway, so for those who don’t know, the Piface pictured above is an expansion board for the Raspberry Pi, that slots right on top of it neatly, consuming the GPIO pins. The Piface is essentially just a nicely packaged ULN2803A Darlington array, two relays, and a couple of push-button switches. However the Darlington array is perfect for driving a stepper motor.
I have included the datasheet for the ULN2803A below, if you’re interested.
The device was mostly constructed out of 60 year old Meccano. Forget Lego. The motor and gear mounts were made out of alclad.
The stepping is preformed using the Full-step sequence. I have also included a table picturing Half-stepping. This provides more steps, but less torque.
The wiring diagram for the stepper motor, 42SPM-24DJA is shown below. They were two cheap 24V stepper motors I picked up at Communica.
The application is shown functioning below, stepping through the various steps. Stepping on both motors is shown in this screenshot (F and B control rotor 1 whilst N and G control the other):
Below is a brief youtube clip showing the stepper motors ticking away upon instruction. The lines being drawn are unfortunately too light to be picked up clearly by the camera.
You can build the code with:
sudo gcc -L/usr/local/lib/ -lpiface-1.0 -o pitool pitool.c
Note: Jumpers 4, 5, 6 have been removed to disconnect the diodes and the relays.
I reworked the idea on an arduino platform in a working printer-project.
I have posted a psuedo-build log on my blog available here: