Custom Motor Driver Debugging
September 6, 2009
I built a motor driver, look:
Cool isnt it? Of course it doesn't work as intended, but hopefully you guys can help me fix that. Lets take a look at the details first, and afterwards my problem.
The motor driver is built on a LN298N H-Bridge using a tri-state switch to control the directions and PWM input to control speed of the motors. Yes, it's supposed to drive two motors using up to 2A. In addition I've added a low-dropout volt regulator for +5v logic. I've used eight 31DQ04 40V 3.3A Schottky's as kickback diodes, just because I didn't have anything else suitable. The schematics for the driver is the same as found in this tutorial(i've added it for download at the bottom of this post as well).
In my test setup I used 2x 11.1v Lipo's connected in serial giving around 24v output. A 6V Ni-Mh pack was used on the logic side. Motors hooked up are two Pitman 19.1V GM8712 gearmotors, with a 60.5:1 reducing gearbox and a arduino was used to control the I/0 connections.
In my code I set all pins as OUTPUT and used the following in the main loop:
The logic is that if I set m_io_pin to low the motor should spin one way, setting it to high should make it spin the other way. The logic is easily explaind here. Testing the has shown that when mN_io_pin is LOW the collector of my transistor will output ~2v, while when the mN_io_pin's are brought HIGH the collector outputs ~4V.
My problem is that the motors only spin when the mN_io_pins are brought LOW.
Hopefully someone has a simple solution to my mess :)
UPDATE: Oh, well. Wasnt able to let my burned chip sit still for too long. I must have done something horrible wrong yesterday as I had 30cm spark and a small campfire for a couple of seconds. I created a new breadboard circut using a SN754410NE instead of the LN298N. I think If I put 2x of these H-bridges in parallel they'll provide me with enough current to drive the motors i got. This is a new picture of the setup on a breadboard: