Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

DC motor controller

Status
Not open for further replies.

windozeuser

Member
Currently I'm building a simple robot. I have the frame and motors mounted. The rear drive motors are independent, both being 1.5 HP at 24 Volts (estimated 50 amps draw each). The problem I have is that I want to control them using a BASIC Stamp Microcontroller. What can I use to control the motors at the current? As for a power supply do you guys think two deep cycle 12 volt car batteries wired in series would suffice?

I was thinking about using relays or an automotive starter solenoid, but for reliability how can I make a soild state H bridge that will handle that amount of current?

Thanks
 
Last edited:
You will certainly want variable start-up speed on those motors which is impossible if you just use a relay. I think you need a speed controller using a TRIAC or SCR since they are designed to pass lots of current. But I don't have a circuit handy, sorry.

The two batteries in series should be OK, but you might need to charge them separately.
 
In the Parallax Basic stamp docs for the BSC2-IC it saids the Source / Sink Current per I/O is 20ma/25mA respectively. Does that mean that's the max output current per IO port?
 
windozeuser said:
In the Parallax Basic stamp docs for the BSC2-IC it saids the Source / Sink Current per I/O is 20ma/25mA respectively. Does that mean that's the max output current per IO port?

Yes, that is correct.
 
50amps on two lead acid cells in series is a bit much to ask if you intend to draw that much current regularly. You might want to do two parallel two serial. Doubles the battery load, but half the current load, you'll get a lot more run time and less voltage sag and starting torque loss because of it.
 
Is the basic stamp capable of generating a PWM signal? You can use that to vary the speed of the motors.

I'd recommend using an H Bridge. I'm currently building one to drive a motor for my final project in my advanced digital class. There are quite a few schematics of them on the web.

The H bridge will simplify the control needed from the microcontroller as well as isolate the noisy motor.

Make sure your mosfets are quite capable of driving that load. You might even want to use IGBTs.
 
Thanks, Is there anything I have to worry about when interfacing the H-Bridge to the Basic Stamp I/O. Like protection diodes and such?

And yes the Basic Stamp can generate a PWM signal, The max output is 5v at 20mA

Also will these work well with 24 volts, and being pulsed with PWM? Or should I go higher in Amp rating

**broken link removed**

How exactly would I make an H-bridge using those.. If anyone could help me with a schematic I would really appreciate it. It needs to have forward,reverse, and stop
 
Last edited:
I have used an LT1158 as the mosfet driver in several motor controls. It's rated at up to 30V. It takes care of all of the timing issues for half-H control, gate feedback, etc., and has plenty of current to drive 10 mosfets in two banks (top and bottom), each with 5 mosfets in parallel. All you need is a single, PWM signal with programmed soft-start. Two units can be used if full-H is needed. The motors I am controlling are 1.5 to 2 HP at 12V. It was a simple way to get started for a non-PIC-oriented person. If you are familiar with PICs, that might be the way to go. My next project will use a PIC to generate the PWM, plus other duties, while I will probably keep the
LT1158 for the mosfet driver. I take just small steps...
 
**broken link removed**

This is a quick circuit I drew in Multisim, I couldn't get the correct symbols for the 2SK3383's.

Is the operation correct? Also to implement the PWM would I just pulse either A or D for forward PWM, and either B or C for Reverse PWM ?

Also is there a way I can electronically brake?

**broken link removed**
 
I'd definitly look into getting a driver IC like the LT1158 that JpanHalt suggested. It'll simplify things quite a bit.

As far as protection goes, you want to make sure that you dont switch A&C or B&D at the same time. A specialized driver chip will have this feature built in. and provide a slight dead time when switching. (the dead time is the time it waits after switching fet A off and turning fet C on).
You should also put some Transient voltage suppressors (TVS) across the gate and source of each fet. Make sure they are rated for slightly under the max gate voltage. The TVS will kill any sharp spikes in the gate voltage before they kill the fet.

Also, you might want to try to find some larger fets. those are rated pretty close to the continuous operation of the motors. The peak currents could be much more than 50A.
 
dknguyen said:
Switch the MOSFETs to short the motor terminals to brake.

I don't quite understand. Could you please explain

Also, so it looks hooked up correctly in my schematic?


So to implement the PWM I just pluse A? For forward And Pulse C for Reverse motion

Also, What is the average dead time that would be suitable for this application?

The TVS would be a Zener? rated at 4 volts, 200W?
 
Last edited:
Turn A/B or C/D on to connect the two terminals of the motor together to brake it.

I suggest you use PMOS transistors for the top two, since you will need quite a high votlage to switch the top two transistors on and off if you use NMOS. The switching voltage at the gate for NMOS is related to the voltage at the drain (the bottom of the transistor on the schematic). If the drain is at a high voltage, you need an even higher voltage to switch the transistor. With PMOS it's the other way around.

https://www.modularcircuits.com/h-bridge_secrets1.htm

Yes, you can either pulse both A/D or B/C. Alternatively, you could leave the high-side transistor on, and pulse the low-side transistor- this is best if you use PMOS for the top two transistors since PMOS switches slower than NMOS.
 
Last edited:
It will control the low-side gates since the drains are referenced to zero and the gate voltage to turn the transistor on is probably less than 5. However, the drains on the high side are referenced to something higher than zero. So if you use NMOS there you need 5V+that drain voltage to activate.

Where is 29V coming from?
 
Circuit looks good...you might want to add some reverse biased diodes in paralle with each MOSFET to handle the flyback current. MOSFETs have a diode built in that can do this, but the diode is not very fast. It works in a pinch, but isn't optimal.

For PMOS, the source is connected to the +voltage. This is because to turn the PMOS on, the gate voltage must be a certain amount less than the source voltage.

For NMOS the drain is connected to the -v voltage. This is because to turn the NMOS on, the gate voltage must be a certain amount greater than the source voltage.

By placing the terminal that the gate-switching voltage is "referenced to" nearest to the voltage source, you can ensure that your microcontroller can switch them most easily (assuming the gate-source voltage required is low enough. If it's too high you need to find other transistors or add voltage boosting circuitry).

Remember that in this configuration, a "+5V" signal will switch NMOS on, but PMOS off and a "0V" signal will switch NMOS off but PMOS on. So if you want to drive the whole H-briodge with just two PWM signals, you need to use an inverter (but then you can't brake). Another way to do this is to use pull-up resistors on the high-side PMOS gates and then also connect the gate to the terminal of the motor. This way when the NMOS activates, it pulls down the voltage on the motor terminals. Since these terminals are connected to the PMOS gate it will also pull down the PMOS gate voltage and activate the PMOS. The pull-up resistors make sure the PMOS is off the rest of the time. Look at this H-bridge circuit for an example of what I mean:
https://www.electro-tech-online.com...tachFiledogettargetopenservo_21_schematic.pdf

If you want to brake you have to use 4 PWM signals so you can control each transistor independently.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top