coming soon...
I'm supplying 10V from an external supply (ADM) capably of sourcing enough current divided down to 5V to the motor and to the two H-bridges. The bulk and bypass capacitors are recommended in the data sheet and honestly I don't know exactly what their purpose is.
I thought the motor was bipolar and that the current through the coils could be reversed. The datasheet for this motor pretty much sucks and doesn't offer much information. Most of what I've learned about operating the motor is by looking at blogs (here and here). Good thing it's a popular hobbyist motor with lots of information. I bought the motor from Mouser, but neither Mouser nor the data sheet mentions it takes 100mA per coil nor do they mention the polarity of the coils (unipolar vs bipolar). I guess If I had had more experience with stepper motors I would have known that I need to know these things and judging by the sparse data sheet provided I think the manufacturer expects you to already know how to operate the stepper motor. This All About Circuits article also shows some symbols for the coils that I was not familiar with. I can see now the datasheet clearly showed 4 unipolar coils with a 5V center tap
I also didn't realize the motor had 4 coils. The data sheet looked like it had abstracted the number of coils down to 2 groups with 4 inputs for forward and reverse current.
So the motor is a 4-coil (or at least grouped in 4s), unipolar stepper motor which requires the controller to source 100mA per coil activated which means my H-bridges are not going to work because I only have 2 outputs that can generate forward current and other two work in the reverse direction.
I found a couple new parts to order now that I knew to focus on parts related to unipolar stepper motors. The class of part I need is a load driver, or transistor array, or darlington array. I need a load driver since I can't supply the undocumented 100mA per coil (or phase) needed to drive my unipolar stepper motor. I have, of course, heard of load drivers before but they're purpose feels a lot more concrete now that I'm dealing with them first hand.
This part is quite expensive, but automates the process of activating the phases of the coil. It requires two inputs to set the step mode, and another input for stepping (driving the clock) so it does lower the pin count from 4 PWMs to 3 GPIOs.
This one is significantly cheaper, but does require me to manage all the states of the coils. Since my main focus here is learning I'm going to go with this one. I think it's better for me to do this the hard way first and then graduate to the more complicated IC later. The next time I need a load driver I can use the DRV and I will have some appreciation of how much simpler the circuit has made the process. There were a couple options on Mouser, but I went with the cheapest one from STM. I looked at the electrical characteristics and I can get a collector current of 300mA with 3V so I should be well within my range to drive the stepper motor with this driver. It says it has a max of 500mA so I'm not sure why the datasheet doesn't say what input voltage you need to get that current. The highest it lists is 350mA at 8V.
This part was very frustrating. I take about 3.5 days to figure out why this wouldn't work. It ended up being the the ULN2003 sitting on top of the SOIC adapter was not making a good enough connection. I had tested the pads on the adapter board a lot, but never thought to test the actual pins on the darlington until days later. It was then that I found I had voltage on the pads but not on the ULN pins.
One thing that bothered me was how much I had to rely on googling and tutorials on order to get this to work. I would have much rather preferred to be able to to a more systematic and deductive approach by measuring and observing to determine the problem but I was just unfamiliar with the parts on the circuits.
The ULN2003 is open collector which just means the pins lead to an open circuit to the collector of a BJT. This video explained the chip in detail and I don't feel there is too much I didn't understand about the internals.
One thing I noticed which I did add to my circuit was that many of the driver boards for the ULN2003 that come with LEDs and a connector to attach the motor too also included a capacitor near Vin. This capacitor is apparently a decoupling capacitor. It sounds like when the current drawn by active devices changes it can cause the supply to not be able to supply the required current immediately, so the capacitor is used to fill in these gaps during those times.
I watched this pretty nice video from Texas Instruments that does explain that it is possible to control a unipolar stepper motor with a bipolar driver so that might be something to try later, however I have another device with a bipolar motor on it that I will be able to use my H-bridges with and it also has some feedback wires on it so I can test out some signal processing techniques.