View Full Version : Technical Problem - motor
Hypnobeard
11-26-2006, 06:54 AM
Hello everyone,
I'm fairly new to the practical side of robot building, and have almost completed construction on my first autonomous bot. I studied Cybernetics at university, so I'm not a complete necomer. However, I do currently have a problem.
I'm using a PIC16F876 to control a differential drive 'bot using 2 DC motors. The test circuit I've made uses an H-Bridge to control the direction of the motor. The circuit is set up on a prototyping board. I know the control signal from the control circuit is OK. The out put of the H-Bridge is providing a voltage drop of +3.3V across the connector for the motor. however, when I actually connect the motor, it nothing happens (the motor doesn't turn). If I measure the voltage across the connection terminal again, I get ~+0.5V. If I simply connect the battery cells directly to the motor, it turns fine, as I'd expect. The motor is rated to operate at 3V.
What am I doing wrong, and why isn't my motor turning when it's connected to the circuit?
It's doing my nut now, and I'd appreciate some help!
JonHylands
11-26-2006, 07:49 AM
Generally speaking, most h-bridges require a higher voltage on the output side than on the input side.
What specific h-bridge are you using?
- Jon
Hypnobeard
11-26-2006, 08:18 AM
Thanks for the reply Jon.
It's a scratch built H-bridge, not a package. Thought it best to work from 1st principles on my first bot. I'm using the standard arrangement with 2N5551 and 2N5401 transistors with diodes in parallel. Voltage source is from 4AA cells via a 3.3V regulator.
what should I be checking?
JonHylands
11-26-2006, 09:02 AM
Most people use MOSFETs if they are scratch-building h-bridges, but I really don't know much about that.
Building your first robot is challenging enough - keep the number of unknowns to a minimum.
I would strongly advise you get a simple h-bridge chip to start with. Once you're satisfied that the software in your PIC is working, and the motors are good, and everything is wired up correctly, then, if you really feel you must, build a transistor/MOSFET h-bridge and substitute it.
For low current (less than 1 amp draw) I use the SN754410NE, available from digikey.
http://www.digikey.com/scripts/DkSearch/dksus.dll?PName?Name=296-9911-5-ND&Site=US
It is a two-channel h-bridge, with built-in protection diodes, that can handle one amp per channel.
I have a very simple schematic on my site of how to hook it up to a PIC 16F876:
http://www.huv.com/miniSumo/seeker2/Schematic.gif
It allows you to use the hardware PWM channels on the PIC to control the motor speeds. You can look at my C source code here:
http://www.huv.com/miniSumo/seeker2/Seeker2Source.zip
The motor control code is in Seeker2Speed.c, although I noticed somewhere between making the schematic and publishing my code, I changed the h-bridge enable pin to go to C5 instead of A4.
- Jon
Hypnobeard
11-26-2006, 09:26 AM
Thanks again Jon. Probably right about the number of unknowns - was approaching it from an academic point of view rather than commercial.
Thanks for the ID of the H-Bridge chip - it's difficult to know where to start with stuff like that, there's so many figures in the datasheets it's all abit confusing.
I'll check out your links too.
Thanks again.
Hypnobeard
11-26-2006, 09:59 AM
Just out of interest Jon, is there a version of this chip with a min. voltage of +3V? My motors are rated at 3V.
wrighthobbies
11-26-2006, 11:01 AM
The SN754410 has a minimum voltage of 4.5v. But at that voltage level, it is very inefficient. It works best at higher voltages. Dave Cook did a nice analysis of h-bridges at low voltages in his book, Intermediate Robot Building.
There is another chip similar to the SN754410 that is designed for low voltage called the FAN8200. It is a dual h-bridge rated for 2v to 9v, 650mA each channel. The FAN8200 is very efficient compared to the SN754410. If you need more current capacity, you can bond the the 2 channels together into one h-bridge or you can stack 2 chips (that's a trick used a lot with the SN754410).
Here is the spec sheet - http://www.wrighthobbies.net/datasheets/fan8200.pdf
I have the FAN8200 available on my site (I have the SN754410 too, but I don't have it listed independently).
The difference in efficiencies has to the with the Vsat of high and low side of the bridge. The SN754410 has a Vsat of about 2.5v if I remember correctly while the FAN8200 is .4v. That means at 4.5v, only 2v is getting to your motor if you use the SN754410 while the FAN8200 delivers 4.1v.
At higher voltage levels, this isn't really much of an issue.
HarryBotter
11-26-2006, 11:03 AM
Just for testing you could certainly run the motors at 4.5 volts. Running it continuously might shorten it's life.
A book that handles all this really well, including info on setting up the SN754410, is Intermediate Robot Building by David Cook.
Harry
wrighthobbies
11-26-2006, 11:07 AM
Just for testing you could certainly run the motors at 4.5 volts. Running it continuously might shorten it's life.
A book that handles all this really well, including info on setting up the SN754410, is Intermediate Robot Building by David Cook.
Harry
LOL, we must have been posting replies at the same time!
HarryBotter
11-26-2006, 11:28 AM
LOL, we must have been posting replies at the same time!
LOL! And our brainwaves were also in phase out there in the ether. Makes me reflect on how the internet has changed our world. :)
Hypnobeard
11-26-2006, 02:55 PM
Thanks gents,
Will let you know how I get on. I'll probably go down the route of a packaged driver and see how it works out. All I have to do is understand what all the pins mean!
Thanks again,
The Beard
nitroacid
07-25-2007, 12:00 AM
Hi HypnoBeard and All,
Please let me know your finalised solution? I do have the same problem, having a motor rated at 3 V and having a current consumption of 1.5 A. Is there any packaged driver out there that drive this motor?
I appreciate any of your help.
Nitro
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.