first pi project
Pursuant to my aforementioned automated storage/retrieval project, I'd ordered a bunch of hardware. I've played with Arduino before, and this time i wanted to try a raspberry pi.
* raspberry pi, model 3b -- $30 for a pretty full-featured computer!
* a microSD card, since the pi needs it.
* a pi "cobbler+" (which lets me easily use the pi's pins on a breadboard and, more importantly, labels them)
* a pack of 5 steppers, each with a small driver board (more on these later)
* various power supplies, and a voltage converter/regulator
* wires and jumpers and alligators
* a battery bank (because the pi needs more juice (2+ amps!) than any of my micro USBs supply)
An old ATX computer power supply supplies 12v to a buck converter/regulator that sends 7.3v to the motor driver.
The battery bank supplies 5v at 2A to the pi, which (via the cobbler and breadboard and some jumpers) sends control signals to the motor driver based on a python program i stole from the internet and slightly adapted.
The motor driver sends the stepper a simple instruction on which coils to energize.
the result was the slowest turning motor you have ever seen - like, maybe 2 rpm. I was underwhelmed. With some tweaking (using full rather than half steps, reducing the delay between steps) I was able to get it to a roaring 10 rpm -- still far too slow to actually use in a project.
I later realized the motors are geared way down, about 64:1. So they're nice and torquey, but very slow. I could steal some of that speed back by putting a big gear on it, but i don't have any gears and I'm not sure these are the motors i want to use. They're definitely good for prototyping and nice and cheap for several, but if i proceed with this project i'll probably go bigger.
The pi needs more juice than i thought. I intended to use a normal micro usb charger (i have oodles), but the current demands are more than i thought by a long shot. The battery bank was sort of a hack, i don't want to always drain it while projecting. I'll need to order a bigger supply for the pi. I think i probably reduced its demands by disconnecting it from the monitor, keyboard, and mouse and used SSH to get in from my laptop (via the wifi which the pi natively supports -- awesome).
I am not really well set up to do small mechanical things. I mounted the pulleys on makeshift shafts which i shoved into holes i drilled in a 2x4. The prototype is not as polished as it could be. I should get an erector set or something.
The cobbler ribbon cable is easy to connect backward. Fortunately i didn't break anything - it just happened not to work, so i reversed it. it should have an indicator or something.
I can actually make a motor turn!