More About Motor Controllers
In my last post, I talked about my problems with motor controllers not delivering enough current to the tank motors. After some more experimentation, I decided to abandon the L293X h-bridges and similar. Versions that supported more current featured bigger heatsinks: they all have some significant amount of voltage drop (Somewhere around 1 - 2 volts. Maybe not a big deal when you are north of 10 volts, but if your starting voltage is 5.5 then it matters a lot.)
There was a break in tank work, as the holidays took over and I spent what spare time I did have building a Nixie-tube clock from a kit.
I found a Pololu Qik motor driver that I had nearly forgotten about, sitting in a drawer. I installed that on my tank and, what do you know, the driver worked pretty well. This particular controller features a serial communication chip and translates that to signals that the actual motor controlller, a TB6612FNG, understands. This driver costs $25 from Pololu and, since I need two in order to control my three motors, that would mean $50 per tank, just to control the motors. But I don't need the serial feature and the TB6612FNG itself is just over two dollars from Digikey. One downside to this chip, for me, is that it is surface-mount. I've never soldered surface-mount chips before.
So the next thing I did was order a couple of breakout boards for the TB6612FNG. I got one made by Sparkfun and another sourced from Adafruit. Then I installed each in turn in the same tank and subjected them to my "motor stress test". The program spins the tank one way for ten seconds, pauses a tenth of a second, then spins the other way for ten seconds. It repeats this forever (or until something melts). I've found that doing pirouettes on carpet is the best way to subject these tank motors to abuse. I think that the tracks must need slip somewhat, as the tank rotates, but the treads catch on the carpet and so the motors must work extra hard to keep them moving.
Here is the Sparkfun driver:
Here is the Adafruit driver:
And, finally, the Pololu driver:
The Sparkfun and Adafruit boards were largely similar, bogging-down and coming to a halt after twenty seconds, but the Pololu board rotated the tank back and forth for over two minutes before finally breaking down. The actual motor-driver chips differ slightly in their identification numbers but I think that they are essentially the same chip. The Pololu test program was necessarily different, because of the serial interface, but should have resulted in the same ten-second left/right commands to the motor-driver.
So why such a dramatic difference? Passive components such as capacitors could potentially contribute to a better short-term, pulse current. But nothing that would last longer than a second or two. The Pololu chip seems to have somewhat wider traces, the pads that carry motor current and are adjacent are connected together at the surface mount, and there is heat relief with vias. The Sparkfun and Adafruit don't have the last two features, appearing to be more standard SSOP-24 breakouts, though they do have wide traces where appropriate.
So, trying to emulate the Pololu board as much as possible, I designed a new version of the tank main board.
You can see the TB6612FNG footprints to the right of the board. The upper TB6612 drives just one motor, while the lower one drives two. In the upper-right corner is a heatsink. Just to the left of the motor drivers is a shift-register. I decided to use this because, with the new chip, each motor now takes two control signals and one speed signal. This would require nine pins in total, if I did not use the shift-register. [I did consider somehow using a single control signal with inversion, since I only ever want to turn a motor one way or another (I do not care about the stop or brake functions). But, in the end, the shift-register seemed simpler]. The upside to all this is that I now have PWM speed control for all three motors. Other improvements include maybe possibly finally wiring-up the speaker-driver correctly and the ability to now control all four LEDs that come with the tank [The LED strip that comes with the tank uses a single positive wire and switched ground wires to control the LEDs, so I modified my design to accommodate a switched-ground design].
So, the board is ordered from OSHPark. It will take a coupla weeks to get back so, in that time, I will be experimenting with the IR LED beacon light [With the turret-board IR-camera driver and an OLED, I built a IR-detector-in-a-box that I can use to easily determine a given LED's range] and, if time permits, working on software to support IR control commands.
I gotta say, if the new board fails to work [I mean, if the drivers just don't turn the motors very well. If I screwed-up a connection or such, no big deal, I'll just fix it and order another board] then I'm going to be really close to canning this project. Much of the hardware design in this project has just been connecting one thing to another. But a few challenges, particularly this challenge of turning motors that draw a relatively large amount of current, just seem a large leap beyond my skill set. And ordering boards from OSHPark doesn't really facilitate experimentation and fast iteration. If my latest revision doesn't work, one way to salvage this project may be to use an off-the-shelf motor controller, if I can find something that works as well as the Pololu Qik but is not as expensive.
There was a break in tank work, as the holidays took over and I spent what spare time I did have building a Nixie-tube clock from a kit.
I found a Pololu Qik motor driver that I had nearly forgotten about, sitting in a drawer. I installed that on my tank and, what do you know, the driver worked pretty well. This particular controller features a serial communication chip and translates that to signals that the actual motor controlller, a TB6612FNG, understands. This driver costs $25 from Pololu and, since I need two in order to control my three motors, that would mean $50 per tank, just to control the motors. But I don't need the serial feature and the TB6612FNG itself is just over two dollars from Digikey. One downside to this chip, for me, is that it is surface-mount. I've never soldered surface-mount chips before.
So the next thing I did was order a couple of breakout boards for the TB6612FNG. I got one made by Sparkfun and another sourced from Adafruit. Then I installed each in turn in the same tank and subjected them to my "motor stress test". The program spins the tank one way for ten seconds, pauses a tenth of a second, then spins the other way for ten seconds. It repeats this forever (or until something melts). I've found that doing pirouettes on carpet is the best way to subject these tank motors to abuse. I think that the tracks must need slip somewhat, as the tank rotates, but the treads catch on the carpet and so the motors must work extra hard to keep them moving.
Here is the Sparkfun driver:
Here is the Adafruit driver:
And, finally, the Pololu driver:
The Sparkfun and Adafruit boards were largely similar, bogging-down and coming to a halt after twenty seconds, but the Pololu board rotated the tank back and forth for over two minutes before finally breaking down. The actual motor-driver chips differ slightly in their identification numbers but I think that they are essentially the same chip. The Pololu test program was necessarily different, because of the serial interface, but should have resulted in the same ten-second left/right commands to the motor-driver.
So, trying to emulate the Pololu board as much as possible, I designed a new version of the tank main board.
You can see the TB6612FNG footprints to the right of the board. The upper TB6612 drives just one motor, while the lower one drives two. In the upper-right corner is a heatsink. Just to the left of the motor drivers is a shift-register. I decided to use this because, with the new chip, each motor now takes two control signals and one speed signal. This would require nine pins in total, if I did not use the shift-register. [I did consider somehow using a single control signal with inversion, since I only ever want to turn a motor one way or another (I do not care about the stop or brake functions). But, in the end, the shift-register seemed simpler]. The upside to all this is that I now have PWM speed control for all three motors. Other improvements include maybe possibly finally wiring-up the speaker-driver correctly and the ability to now control all four LEDs that come with the tank [The LED strip that comes with the tank uses a single positive wire and switched ground wires to control the LEDs, so I modified my design to accommodate a switched-ground design].
So, the board is ordered from OSHPark. It will take a coupla weeks to get back so, in that time, I will be experimenting with the IR LED beacon light [With the turret-board IR-camera driver and an OLED, I built a IR-detector-in-a-box that I can use to easily determine a given LED's range] and, if time permits, working on software to support IR control commands.
I gotta say, if the new board fails to work [I mean, if the drivers just don't turn the motors very well. If I screwed-up a connection or such, no big deal, I'll just fix it and order another board] then I'm going to be really close to canning this project. Much of the hardware design in this project has just been connecting one thing to another. But a few challenges, particularly this challenge of turning motors that draw a relatively large amount of current, just seem a large leap beyond my skill set. And ordering boards from OSHPark doesn't really facilitate experimentation and fast iteration. If my latest revision doesn't work, one way to salvage this project may be to use an off-the-shelf motor controller, if I can find something that works as well as the Pololu Qik but is not as expensive.
Comments
Post a Comment