First Real Motion
Tuesday night, I duplicated my H-bridge circuit for the second coil of my stepper. I provided drive power from my bench power supply, because I wanted to be able to vary it to test the effects of different supply voltages. And I didn’t (yet) do anything to drop the bridge’s voltage down to the ~2.5V that the motor wants–I just let the motor have whatever came through the bridge. The motor is hefty enough, I didn’t figure it would be damaged during brief tests.
I hooked up the motor, started my LogoChip program with a clockwise drive pattern, and slowly turned up the supply voltage. Around 2-3V, the motor started chunking along. And I found that I couldn’t supply more than 2-3V–no matter how high I turned my variable supply (like, up to 20V), it wouldn’t provide more than 2-3V. It’s only rated for 1.5A on the channel I was using, and it was giving everything it had.
Using a loop [ step-cw mwait ___ ]
command from the LogoChip console, I was able to get down to 4ms wait without losing steps, or 250 steps per second. I assumed that with a stronger power supply, I could do at least a little better than that, and I was not to be disappointed.
Dedicated Power Supply
Wednesday night, I brought in an old PC power supply and wired it into the driver board. I first used its 5V supply to power the driver, wanting to work up to 12V in stages. It was clearly driving the motor more powerfully than my bench supply did Tuesday night–motion was smoother and able to run at slightly higher speeds.
Next, I switched it over to using the 12V supply. Ideally, I’d like to run it on 8-9V, but I wanted to see what 12V did to the FETs and motor. As expected, running on 12V gave the best performance I’ve experienced yet. I was unable to stop the motor’s movement by gripping the 1″-diameter pulley with my fingertips (!), and I was able to get down to a 2ms wait in the loop shown above without losing steps.
How Fast Is That?
It was losing steps continually with a 1ms wait, but that’s a full factor of two difference in speed from the 2ms wait, so I was curious where between the two the fastest possible speed lay. I rewrote the loop to use a no-op
(which the LogoChip Language Reference lists as 13μs) for the delay instead, and tweaked it down to about 150 no-op
s without losing steps. Since 150 * 13μs = 1950μs ≅ 2ms, it looks like that’s about as fast as I’ll be able to get the motor to run with the current drive system.
What does that translate to in the real world? 2ms / step = 500 steps / second. This stepper has 200 steps per revolution, so 500 steps / second = 2.5 revolutions / second. I was planning to use 20 tpi all-thread for the drive screws, so (2.5 revolutions / second) / (20 revolutions / inch) = 1/8″ / second. That’s kinda slow.
Speed Improvements?
I deliberately designed the H-bridge drivers so that they could be quiesced and deliver no power to the motor. Some drivers use a single bit to select forward or reverse, and are therefore always on; I provide one bit for each half-bridge, like the 754410, allowing both sides to be high or low together for no power delivery to the load.
My current control software, however, always energizes each coil in one direction or the other, so both stepper coils are always active at the same time. Assuming the power supply is up to the task, this provides greater torque, as you have two magnets holding the rotor at all times instead of only one. However, if I recall correctly, this also results in a slower maximum speed. I’d like to experiment with rewriting the code to energize only one coil at a time.
Another approach to explore is half-stepping. When two adjacent coils are both energized (as they are under my present controller), the rotor is pulled to a position halfway between the two coils. If you change the control code to energize coil A, then A and B, then only B, etc., you cause the motor to “half-step,” doubling your steps per revolution. I’d like to test whether this motor performs better when single-stepping or half-stepping.
Finally, I’m not presently ramping the speed at all. When the controller starts up, it’s immediately powering the motor to move at full speed. Because the rotor has mass and therefore inertia (even without an external mechanical load), it’s possible that it’s losing steps because it can’t immediately move at full speed, and never achieves synchronization with the controller. Any CNC control software I might use will have ramp-up capabilities, so it’s worth trying with my test controller as well.
Power Supply Issues
The PC power supply I was using is a switching power supply, and switching supplies don’t like to operate without a load. Projects to adapt PC power supplies to use as bench power supplies generally suggest putting a large load resistor in parallel with the outputs to keep the power supply loaded at all times; but for my quick testing, I didn’t do that. Newer PC power supplies also have “smart switching” or “soft switching,” enabling them to be turned on and off under motherboard control, to shut off the PC when you halt the operating system, facilitate wake-on-LAN circuitry, etc.
For whichever reason, I found that after the power supply warmed up a bit, it would no longer power on unless the stepper driver was already receiving signals that caused it to draw current. That is, I had to start the stepping software on the LogoChip controller before turning on the power supply. Since in a drilling machine, the power supply needs to be on continuously to be ready to receive operating commands, this obviously won’t do. I guess I’ll have to address the dummy load issue sooner than I had hoped.
And I’m delivering a much higher voltage to the motor than it’s rated for. As noted earlier, the motor’s label indicates .85Ω and 2.5A per coil, which is about a 2.1V drop. I don’t remember the source-drain drop of a FET, but my 12V supply is obviously putting more than 2.1V across the motor coils, which means I’m running them at a much higher current, as well. That doesn’t concern me too much for the motors during a brief test, but my FETs are getting awfully hot awfully fast.
I’ve talked a bit with Tom McGuire about how to drop the voltage closer to what the motors would like. He’s seen designs with power resistors in series with low-inductance motors like this, but (1) that seems inelegant, and (2) I’m not sure I have appropriate resistors on hand. I guess I could dig through my bins.
I’m also considering stacking a series of 1N400x diodes (one string in each direction) in series with the motor, to drop the voltage. As Tom points out, I need to be careful to respect the current rating of the diodes in comparison to the draw of the motor.