Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: Pulsar06 on June 12, 2009, 03:17:04 PM
-
Hey
I'm trying to get this H-Bridge to work with my BX-24 (thanks again to robologist for identifying it):
http://www.newmicros.com/store/product_manual/NMIH-0050.pdf (http://www.newmicros.com/store/product_manual/NMIH-0050.pdf)
I hooked up a 7.2V R/C car battery to the left two screw terminals, and an R/C car's motor to the right two screw terminals. I'm using it in locked-antiphase mode (I've got the jumper from IN2 to IN1'). I can get the wheels of the car to turn full speed either forwards or backwards by setting the BX's output pin to either 0 or 1.
I use PWM to achieve speeds between full foward and full reverse. The following code should stop the motor:
Option Explicit
Public Sub Main()
Do
Call PulseOut(14,0.000005,0)
Call PulseOut(14,0.000005,1)
Loop
End Sub
The motor does, in fact, stop, but it produces a high-pitched hum. So I'm wondering:
*Is it possible to eliminate this hum? I realize it's being alternately driven forwards and backwards and I assume this is the source of the problem.
*Is it damaging to the the motor or electronics?
*Will increasing the PWM frequency eliminate it? What type of frequencies are motors typically driven at?
Thanks
-
Hi,
[...] I can get the wheels of the car to turn full speed either forwards or backwards by setting the BX's output pin to either 0 or 1.
I use PWM to achieve speeds between full foward and full reverse.
Which is it, full speed or PWM?
[...]
The motor does, in fact, stop, but it produces a high-pitched hum. So I'm wondering:
*Is it possible to eliminate this hum? I realize it's being alternately driven forwards and backwards and I assume this is the source of the problem.
*Is it damaging to the the motor or electronics?
*Will increasing the PWM frequency eliminate it? What type of frequencies are motors typically driven at?
Full stop means 50% forward and 50% reverse in your case. It's a very wastefull method and should only be used when a huge amount of control over the motor is needed.
Is the hum present if you go very slow in either direction?
If the motor doesn't get hot, it won't be damaged and the same goes for the electronics.
increasing the frequency will increase the frequency of the hum and you may find a sweet spot where it's less annoying without going to high, as mechanical resonance may play a part in it. the best frequency range for smaller motors is usually up to a few kHz (3..4kHz). going higher will mean loss of efficiency and loss of the PWM advantage of full voltage pulses, due to the inductance of the motor windings which will smooth the pulses to a near DC instead of the pulses (seen by the motor).
-
A 1 makes it go forward at full speed and a 0 makes it go in reverse at full speed. I have to use PWM to get any speed between the two (including stopped).
If driving it forward and backwards at several kHz is wasteful, does that mean locked-antiphase is the wrong mode to operate the h-bridge in? There's no way to stop the car in locked-antiphase except a 50% duty cycle with PWM.
-
Hi,
A 1 makes it go forward at full speed and a 0 makes it go in reverse at full speed. I have to use PWM to get any speed between the two (including stopped).
Ah, that helped me get it and printing the datasheet to paper does wonders for the overview as well :)
If driving it forward and backwards at several kHz is wasteful, does that mean locked-antiphase is the wrong mode to operate the h-bridge in? There's no way to stop the car in locked-antiphase except a 50% duty cycle with PWM.
So, you connect IN1' to IN2 I guess.
If you run IN1 and IN2 separately (Sign/Magnitude), you can use the truth table at the top of pin 5 (both inputs either high or low brakes the motor efficiently by shorting the motor windings. That would be my choice, but I don't know if you have a reason to keep it doing antiphase?
In Sign/Magnitude you just assign one of the inputs to be the direction flag ("Sign") and PWM the other input ("Magnitude").