To make the Where Clock I need a stepper motors. I don’t know how stepper motors work but I know you can get them to turn around to point in a particular direction. Of course, I’m not the first person to think of this and after a bit of Googling I found a page about using stepper-motors from a Raspberry Pi.
That blog suggested a 28BJY-48 with ULN2003 control board which can be bought from eBay from “4tronix_uk” so I went ahead and bought 2 (just in case I needed another for something…). The motors arrived quickly and I took one, along with a Pi into Maplins to get some wires to join them together. Unfortunately, Maplins do (did) not have the female to female jumper leads you need to connect the Pi directly to the controller board of the stepper motor. Instead I was sold some male-female leads and an IDE cable! The IDE cable fits onto the GPIO pins of the Pi (well, it hangs over the side) and we thought I could stick the male end of the jumpers into the other end of the IDE cable and then the female ends onto the motor’s board.
Following the instructions about which GPIO pin is which on the same blog as before (mine is a revision 2 Pi), I cautiously wired it all up. It was extra complicated because I had to also count along the holes in the IDE cable. I then copied the code from the first post crossed my fingers and ran it.
Well, it didn’t work. I got out the multimeter and checked there was the right voltage on the pins on the Pi (for instance, 5V between pins 2 and 6 and 3V between 2 and 1) but I could find no reading at the other end of the cabling. I think perhaps that the male pins on the jumper leads weren’t quite long enough to connect to the IDE cable.
So, back to the drawing board, or rather eBay, where I purchased a bunch of female to female jumper leads from “phenoptix“. They were listed as being for the arduino, but are just fine and arrived the next day…
Comments
Comments powered by Disqus