Let's Make Robots!

Electric braking

ByMG2R

I'm working on an RC car and was thinking about the braking. The idea is: I'm driving at full speed and need to turn. Obviously, because my car is going to break the land speed limits ( ;) ), it cannot take the turn at full speed so I'll need to slow down. Now, just releasing the throttle won't be enough, so I'll have to brake extra somehow. I was thinking about giving slight reverse throttle, so that with PWM, I can handle the braking intensity. Now I don't know what this would mean current-wise. I know this will kind of short-circuit the motor (motor makes its own voltage when rotating, so when you apply a voltage in the different direction, you short-circuit it). I don't know however what currents I'd might me expecting. The motor will run at 8V, draws 1.5A cont without load, 15A when stalled.

Anyone with experience in this department?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Chris the Carpenter's picture

This is very doable and probably with what you already have. I had not done any braking until I got a hold of the Wild Thumper controller and now it seems, I can't live without this feature.

Check my math on this, but it seems that you simply need to run your PWM signal to both your driver pins at the same time instead of PWM on one pin and say, low on the other. This working or not working can depend on the layout of your motordriver (the L293 for example, is effected by the enable pin and how it is wired) but should be simple to figure out.

MG2R's picture

If you look at the schematic below -and I might be hugely mistaking here- it seems that if you use PWM on both pins, you just cut of power to the engine when they're both at 50% duty cycle's (both high and low on the same time). If they're not at he same duty cycle, this might work.

But then another problem arises: if the car is halted, I want it to go backwards (forward pin LOW and backward pin PWM) when I pull my throttle downwards. When the car is already running forward, I want the car to brake (both pins PWM, as you said) when I pull the throttle backwards. So how should the car know what to do?

 

Also, do you know what it would do to the current draw (because of the short-circuit I explained above) or is my assumption wrong?

OddBot's picture

In the circuit you've shown, if you pull pin 1 and pin 2 high at the same time then both your NPN transistors will be on and both your PNP transistors will be off. This will not short out your power but the two NPN transistors will creat a short circuit across your motor which is how electronic braking works.

When your car/robot is coasting then the motor becomes a generator. By shorting this generator out it creates back EMF in in the windings with a similar result to putting the motor in reverse except that as the motor slows down, the back EMF is also reduced so you brake rather than reverse.

This effect will also work using the PNP transistors with both pins low in the case of your circuit. The only way your circuit can coast is to make your control pins high impedance (change them to inputs).

The Wild Thumper controller has additional logic so that both pins high will brake the motor but both pins low will allow the motor to coast. This allows PWM to be used to vary the amount of braking.

You can see how the Wild Thumper motor driver works here: http://letsmakerobots.com/node/18633

MG2R's picture

In short, I can just brake by shorting my motor? How 'hard' will this braking be? Also, I want to make this thing safe to drive in a place where kids run around: I need an emergency brake. I was thinking about simply reversing driving directions but that would create a short-circuit because of the motor acting as a generator when coasting. So is there another way to achieve this, or wouldn't it be tremendously bad to simply reverse the power?

Thanks!

OddBot's picture
You can just slam it in reverse but that will be much harder on the transistors. Shorting the motor is the standard braking method. It is pretty effective.
MG2R's picture

Wait, I still have another question (sorry :P), it hasn't been answered yet and it's quite critical to everything working correctly.

If the car is halted, I want it to go backwards (forward pin LOW and backward pin PWM) when I pull my throttle downwards. When the car is already running forward, I want the car to brake (both pins HIGH or PWM) when I pull the throttle backwards. So how should the car know what to do?

Should I install a speedometer, or is there another way to solve this?

ignoblegnome's picture

Can you just use center stick postion as the brake control? This way, you have a "dead man" type control. If you let go of the stick, you brake. This is assuming your stick is a return to center type.

FYI, braking a motor this way only works while the motor is moving. You are shorting the leads of the motor to create an inductance to power the motor in the opposite direction. In other words, it does not hold the motor in place if it is not moving. Rather, it applies a force opposite to the direction that it is moving.

MG2R's picture

But then, I wouldn't have any control over the 'amount' of the braking. But I'm going to solve this later on, first I'll just wait for my parts and hope to get everything assembled right...

Thanks for all comments, thoughts and explanations people!

MG2R's picture

When my parts arive, I'll test everything out :D