For this week, I just wanted to get comfortable with stepper motors as a component of my final project. To move the parts of the lion head, I need to be able to control the motion pretty precisely, so I think I'll be using stepper motors for the most part. I might end up using something more along the lines of sensing a stopping point, depending on how it goes in the end.
To the end of understanding stepper motors, I used and made some small modifications to the hello.stepper.bipolar.44.full.c code and board on the website. The traces and edge cuts are below (it's not just a white square, I swear).
I milled the board on the Roland SRM-20, laid out the components and soldered them on.
After some issues with forgetting to power the board and misalignments with the ribbon header to my programmer, I got the base program loaded. However, the stepper motor started freaking out when turned it on (plugging it in before powering the board, as instructed). I made some adjustments to the code in a test file to try and diagnose the problem, making the motor spin in one direction, pause, and then the other.
The h-bridges were clearly firing, and seemed to have some consistency in their cycles to keep the motor moving. However, it looked like there was some weird offset error that would irregularly time how the coils were pulsing, meaning clockwise and counterclockwise rotations weren't reliably in the right directions. I desoldered the h-bridges, and saw that the ground pad underneath one wasn't really soldered on. I cleared the solder with a braid and tried again.
With the replacement, the circuit worked perfectly! It consistently moved back and forth. I tested the initial code for the board, and made a speeds program to test delays between steps. I might modify the speed one to put the delays between individual steps, instead of between the groupings of 4 in the original code's functions, but it worked well for now! I'll make some modifications to the board and use it for the moving parts of my final.