It's Tuesday already and I am yet to solder the components on my board. I have spent a lot of time on the circuit design. I have also tried to understand the working of the bipolar stepper motor and Neil's code to control it. The milling process took longer than expected because of some errors at the machine which I have explained below. Hope to be done with this assignment by tomorrow.
Tuesday evening - I could run Neil's code and move the motor. However the anti-clockwise rotations are not smooth. Wonder why?
Wednesday - I noticed that the voltage regulator heated up when the board is connected to the ISP and to my PC. With the help of Lancy, our instructor, I figured out that the Vreg is reversed when the power supply is from the ISP. Lancy suggested that I add a diode to the path, so that current would flow only in one direction. It solved my issue!
I'm still figuring out how to exactly control the motor. Trying different codes..
A few datasheets that I referred to understand the working of the bipolar stepper motor : source1,source2, source3.
After checking if the board is fine with avrdude command, I flashed Neil's stepper motor code into the ATtiny44. The clockwise rotations looked fine (see video at the top of this page) but the anti-clockwise rotations did not.
I tried Rahul's code. The steps worked.
I then wanted to programme switch control of the motor. I tried this in Arduino IDE. I modified a code logic from an internet source to incorporate switch control. Frustratingly though, the switch worked only to pause the motor when the pin is held high in the code and switching would cut off the current. The other way where the pin is held low and switching would take it high and thus operate the motor, did not work. This is a puzzle yet to be solved. The code, however, worked beautifully for clockwise and anticlockwise rotations: ino file
Something else that I would like to document is my persisting problem with soldering. On two days, I was stuck with only one motor driver chip heating up and the other one idling. On each of those times, it was either one or the other chip not soldered properly. A lot of time wasted in debugging. Soldering is still my weakness.