This week I wanted to control a stepper motor via a serial connection in order to control blinds in an augmented cubicle that I built for sponsor week.
Essentially what I had to do was merge the hello echo board and the stepper motor board. At first I tried laying out the board in Eagle, but that had a bit of a learning curve and it wasn't difficult to do this in cad.py. Unfortunately I didn't leave enough space on the board for the battery header to connect I ended up having to solder the wires directly to the board.
Then I had to go back into the assembly to get the board to play nice with serial communication. This wasn't too bad after I did a refresher of the various assembly instructions. I found a great online reference for instructions on the Atmel Tiny 44 processor that was invaluable.
I'll attach the python file that I used, although it's basically the same as the one used for the hello echo board a few weeks ago. The program works by looking for a 1 or a 2 over serial and then translate that into a counterclockwise or clockwise movement. The python program will output these characters based on sensing data coming from a MySQL database.
One problem that came up was that the board would only move a few times and then wouldn't move any more, and this happened when I loaded on the hello stepper program as well. I think it might have something to do with the power situation as well having the 6-pin connectors get slightly dislodged when I attached the headers since there wasn't enough space on the board. Since this might turn into a portion of my final project, I'm planning to redo the board and possibly attach a more powerful motor since this seems a bit too weak for what I need it for. More pics to come.