PDA

View Full Version : Motor driver



sudarshan
10-29-2011, 01:48 AM
Hi everyone

i am looking for a solid state motor driver with pwm and ablitiy to drive motor 10A -20A 12V. for my war bots. i am not looking for ready made boards. i am looking for circuit diagrams.

can anyone suggest me some. i have googled a lot but i dont seem to find simple ones. i find only very complex stuffs.

thanks in advance.

kawal24
10-29-2011, 11:07 AM
Heres one but for 10A motors
http://www.pyroelectro.com/tutorials/h_bridge_4_transistor/index.html

sudarshan
10-29-2011, 11:29 AM
thats looks great

but still one question . will a i be able to reverse the direction when i am using pwm. because i have never worked with pwm for motor controls. The video in thier site shows pwm control in only one direction.

sudarshan
10-29-2011, 11:30 AM
thats looks great

but still one question . will a i be able to reverse the direction when i am using pwm. because i have never worked with pwm for motor controls. The video in thier site shows pwm control in only one direction.

kawal24
10-29-2011, 12:10 PM
yes but for that you will have to use two PWM pins for each motor.

sudarshan
10-29-2011, 12:13 PM
ok thanks still one more question

how many pwm channels does atmega32 offer ?

i need to control atleast 2 motors (4 ch pwm) and atmost 4 motors (8ch pwm) . if atmega32 doesnt which can

thank you

kawal24
10-29-2011, 12:53 PM
I have never used atmega32 but i think it has 4 pwm pins.
Atmega328 has 6 pwm pins.

MohitM
10-29-2011, 01:45 PM
I don't know where the 2 PWM pins for motor reversing come from, but you could use an h-bridge using discrete MOSFETs. Its not too complicated.

In Microchip uCs, you have a module called Enhanced CCP. It has 4 pins on one of the ports dedicated to PWM driving of the gates of the 4 MOSFETS of an h-bridge. Check for something equivalent in Atmegas. This module takes care of running the motor, reversing it, inserting dead-band delays while reversing direction, etc.

You'll also need some some MOSFET drivers to ensure that the MOSFETs are driven hard while PWMing. Because at high switching speeds, uCs pins cannot provide the current needed to ensure that the MOSFETs don't spend too much time in the linear zone.

See this:
"http://www.cnczone.com/forums/open_source_controller_boards/18028-discrete_transistors_avr_microcontroller.html"

sudarshan
10-29-2011, 04:15 PM
check this one
http://robokits.co.in/shop/index.php?main_page=product_info&cPath=1&products_id=15&zenid=9b1ebc5c35ac0f10b0468885998e746a

it seems to be using tip122 and tip 127 for driving upto 5 amps and they seem to ressemble the above mentioned circuit except they use tip 142 and tip 147 which drives 10 amps.

so can anyone suggest me how can drive motors bi direction with pwm using 1 ch or 2 ch . 1 ch will be better

docel
10-29-2011, 04:43 PM
Simply speaking, connect same type transistors in parallel to increase the total current.
There are limits to this though.
1. You can easily drive by adding another transistor in parallel
2. The drive transistor or circuit must be changed to higher current if you add more than 1 transistor in parallel to the existing bridge circuit.
3. A series base resistor must be added, similar to each transistor. Anywhere from 100ohms to 4.7k ohms depending upon the drive transistor rating. the thing is to use a higher value and keep reducing till you get good current drive.
4. Mosfets are better than Bipolar transistors.
5. Bridge circuits are a potential fire makers, more so high current bridge circuits. Be careful or you'll burn the house up. Also , make sure your drive logic is true - 00, 10, 01 ONLY.....dont drive home made bridges with a logic 11.

docel
10-29-2011, 04:44 PM
Simply speaking, connect same type transistors in parallel to increase the total current.
There are limits to this though.
1. You can easily drive by adding another transistor in parallel
2. The drive transistor or circuit must be changed to higher current if you add more than 1 transistor in parallel to the existing bridge circuit.
3. A series base resistor must be added, similar to each transistor. Anywhere from 100ohms to 4.7k ohms depending upon the drive transistor rating. the thing is to use a higher value and keep reducing till you get good current drive.
4. Mosfets are better than Bipolar transistors.
5. Bridge circuits are a potential fire makers, more so high current bridge circuits. Be careful or you'll burn the house up. Also , make sure your drive logic is true - 00, 10, 01 ONLY.....dont drive home made bridges with a logic 11.

MohitM
10-29-2011, 05:28 PM
At 10A, or even 5A for that matter, the transistors (and even most MOSFETs) will require heatsinking. That's what point 5 of Doc's reply is about.

I sometimes wonder why do people insist on using Darlingtons when MOSFETs should be the way to go?

EDIT: Just checked the TIP142/TIP147 datasheet. The Vce drop is 3V at 10A. Which means you have to find some way of removing 30W at the Darlington. You better plan on mounting it on an ice-block.

sudarshan
10-29-2011, 05:37 PM
what ever may be fet or darlingtons

i need to control atleast 2 motors with pwm with 2 channels is it possible or i need 4 channels. if i need 4 channels suggest me a micro of atmega series

or suggest me some good circuits.

also suggest me if the pwm with relay are possible

kawal24
10-29-2011, 07:22 PM
If you are planning to use 1 pwm ch for each motor then you can control the speed of motors only in one direction.However you can reverse the directions but that would be without pwm.
As i said earlier atmega328 offers 6 PWM channels.so you can use that.

And regarding heatsink,in the tutorial which i recommended you that person has mentioned that there wont be much problem with the heat sink as the routes are thick enough to sink the heat.But still be careful.

docel
10-29-2011, 07:59 PM
1. :-)) Mohit !! you read it between the lines alright !!
Those transees can make coffee. best is to fit a CPU heatsink with its attached fan.
2. Why do you need more than 2PWM channels ?? 2 PWMs are enough for 2 motors. The reversing is done by the Transistor bridge switching the polarity. The PWM is not different for change in direction. You just need 1 PWM o/p to drive 1 motor.
3. The Tutorial is talking about current carrying capacity of the tracks nad not the heat dissipated by the transistors. His circuit may be running just warm because he is using 12v - 2(.7v) through the bridge transistors. Like Mohit said, there will be a drop in the output voltage due to the transistor junctions. Then the current is not all continuous due to the PWM duty cycle so the transistors dont conduct full 10A at any given time. This may reduce the need to use a heat sink. But - god help you if the motor "STOPS" at a corner or slope or obstruction....

sudarshan
10-29-2011, 08:58 PM
now everything regarding Darlingtons and MOSFET seems to be very clear to me. heatsinking i understand clearly.

343

i will use i good h bridge with mosfet and a good heat sink and with a fan if needed.
so will the above attached reverseing method work well. i have used a 2c relay act as a dpst for changing the direction there by reversing with pwm.
i know there will be some lag in switching due to relay. but i think it could be used so that the motor comes to a halt when it changes direction.

or there any better ways to change direction or this method will do . are there any other saftey measures in this.


and one more thing the motors wont be drawing 10 A all the time ie may not exceed 5 A even when stalled.

docel
10-29-2011, 10:57 PM
Youre a quick and Smart-alec kid alright... but you have the concept a little bit wrong :-(
Please hold a bit before trying that till I reach home- will clarify.
--Sent from my Nokia mobile--

docel
10-30-2011, 12:25 AM
There are 2 ways to simplify PWM control through a Bridge circuit. One is simple the other is not.
The simple one -
1. The PWM simply switches the power supply voltage to the motors on and off. Meaning, the PWM drive MUST be applied instead of the DC power supply. ie., inplace of the +ve and -ve DC terminals.
2. The control Logic inputs remain the same - by the Microcontroller or any other switch that generates 2 bits control ie., 00, 01, 10. These 2 bits go to the base of the Transistors/Mosfets in the Bridge.

Using this Simple method, you dont need a Transistor/Mosfet bridge at all. You can do so using 4 Relays as a Bridge. Just substitute a high current PWM in place of the DC supply.
I dont have time right now or I could draw a schematic for this method.
It is really very simple: 4 relays switched with 2 bits for direction. PWM from anything as simple as a 555 to a complex Microcontroller driving a high power Transistor / Mosfet ( a 2n3055 is good enough for 24V/50A) that replaces the DC battery. You must tolerate the Relay switching sounds though.
The joystick with the pot varies the PWM for speed ( duty cycle). The bridge Relays are switched by 2 push to on switches, one each for FWD or REV.
....been using this method for more than 20years now without problems. I can supply the kit if many are interested.

To sum up:
1 555 "oscillator", 1 series pass high current Transistor/ Mosfet substituting the +ve DC terminal of the Relay bridge, 4 high current relays operated by 2 PushToOn switches for Fwd/ Rev.
No need for a Micro or the hassles of programming.

Simple !!

roopakjada
10-30-2011, 07:34 AM
Why not look into logic level mosfets out there?
irl 640 17A
irliz 34n 22A
irli 540n 23A
irliz 44n 30A
all above 50V should suit your purpose also if you decide to go for a design with only N-channel mosfets (better as less resistance so less heat)
look into fet driver IC's

kawal24
10-30-2011, 10:52 AM
1. The PWM simply switches the power supply voltage to the motors on and off. Meaning, the PWM drive MUST be applied instead of the DC power supply. ie., inplace of the +ve and -ve DC terminals.


Hi docel,
Thats something new to me.I didn't know that i can apply pwm to +ve and -ve terminals instead of input pins.I have also used two pwm pins as inputs for the motor driver for controlling the speed of motor in both directions.

Thanks a alot.That saved me some pwm pins for my next project.

sudarshan
10-30-2011, 02:59 PM
got it very clearly.
thats more simpler than may method.

please check the below block diagram to check wheather i got it right.
344

if i have missed something over there please let me know.

thank you Doc and everyone else

MohitM
10-30-2011, 04:59 PM
Use an electronic CAD tool. The diagram doesn't make any sense to me.

sudarshan
10-30-2011, 05:37 PM
let me explain it
its a h brigde with a motor at center
h bridge is either made of relays or mosfets
(see it will resemble something like this with some extras
http://www.pyroelectro.com/tutorials/h_bridge_4_transistor/img/schematic.png
http://www.pyroelectro.com/tutorials/h_bridge_4_transistor/img/on_dir_2.png
)

the directions inputs are used for driving the motors in forward and rev (1 0 and 0 1 digital)
and pwm in is used for speed control.

everything over there is fully documented.

it makes a perfect sense. its block diagram how can i draw it in a CAD. one all my doubts are cleared, i will convert it into a schematic.

MohitM
10-30-2011, 05:51 PM
everything over there is fully documented.
Not really. Like, what are those oval/circle thingies at the 4 corners of the rectangle?



it makes a perfect sense.
To you, maybe.


its block diagram how can i draw it in a CAD. one all my doubts are cleared, i will convert it into a schematic.
What's wrong is drawing a schematic from day 1? Why do you need the block diagram?

sudarshan
11-01-2011, 10:57 PM
sorry i couldnt reply. i was away from my place.

can anyone just verify the block diagram
http://www.roboticsindia.com/attachment.php?attachmentid=344&d=1319966848

check whether the concept is right for the motor control with H bridge mosfet/relay with pwm.
i will post the full schematic few days later.