Pwm and the VNH3SP30

Hello, I have the VNH3SP30 breakout board working but I have a question about the kind of signal I should be sending it. I’m using the robostix board with an atmega128, which puts out a pwm signal for servos. I believe that the frequency used for these servos is 50hz, and i send pulses for intervals which determine position.

I’ve been using that same type signal for the VNH3SP30 controller and I increase the value which normally corresponds to the servo position, and it makes the motor spin faster. Understandibly, since I’m increasing the pulse duration. The problem is that at low speeds the motor (normal hobby car drive motor) sounds like it’s in pain, horrible pain. I read in the VNH3SP30 datasheet that the pwm pin accepts “up to 10Khz”. Does that mean that I should be increasing the frequency to increase speed? Are these servo pulses not what the motor controller wants, leading to the noisy low speeds? Or is this motor just not ideal for an hbridge somehow?
Thanks for any advice.

Your suspicions were all correct! You do need to increase the PWM frequency, and servo-control or RF PWM is not really what your motor-controller wants. There are many hobby motor controllers that use RF PWM as their control input, but this is only so you can plug your servos and motor controller into the same RF receiver. The circuitry that actually runs the motor is operating at higher frequencies.

Hobby servo PWM signals vary widely, but on average you’re talking about a pulse width of between 1 and 2 milliseconds, and a frequency of 50 hz. That means that the entire cycle takes 20 milliseconds, and the signal line is only high a maximum of 10% of the time (aka 10% duty cycle). Servo motors pay attention to the width of the control pulses, not so much their frequency. A servo will hold the position specified by a pulse width for a period of time ideally equal to the delay until the next pulse. The unusually long spacing between the control pulses is intentional. It is specifically designed for analog RC control, where pulses of different widths for different actuators are sent together on the same channel. This also makes it easier to generate the control pulses for many (i.e. 8) servos from one source device.

The good news is that if you raise the duty cycle past normal servo control range, your motor can turn much faster than the speeds you have seen already. Ideally you want control of the duty cycle from 0 to 100% to have access to your motor’s full speed range. If you also raise the PWM frequency your motor can turn very slowly, without sounding like it’s dying.

Remember that an H-bridge is really just a very fast-responding bi-directional switch. You switch it on and off very quickly with your PWM signal, and thus connect and disconnect the motor and the supply voltage. DC motors are ideal for being controlled in this way, because they naturally smooth the PWM voltage input. The rotational inertia of the turning motor allows it to cost when you briefly disconnect the power. It even generates a voltage of its own (Back-EMF), which helps the line-voltage approach some average value, and allows you to electronically brake (not break) a motor by connecting both poles to either power or ground. This is all very interesting, but does not really answer your question.

Yes, you should increase your PWM frequency, up to the controller maximum of 10Khz if you can. The datasheet for the VNH3SP30 does not specify a minimum PWM frequency because the H-bridge will cycle as slowly as you want it to. Maybe you want to use it to blink a light bulb every ten seconds; you certainly can! A LOT of physics goes into describing the effect of switching frequency on the motion of a particular motor, but it is sufficient to say that the faster you cycle the H-bridge at the same duty cycle, the smother your motor motion will be. I would recommend you use at least 1Khz, 20 times the hobby-servo frequency.

There is an simple little applet that illustrates the relationship between an H-bridge and a DC motor here: … motor.html

Great response, you should teach! So what I was seeing was intermittent pulses at one duty cycle; wow, that motor is gonna love a proper signal. Thanks for your help.


I use the VNH3Sp30 for the servo-control and driver,the contonller is lm629 with Atmega128.But I find that
when the PWM frequency of lm629 is about 8kHZ,the VNH3SP30 get hot while the speed of the motor is very low (about 1rpm),can you tell me something about this ?Thank you!

Can you show&tell a little more detail about your motor and servoing setup? Also, Also, does the motor work well at different PWM frequencies? Are they higher or lower?

P.S. A picture is worth 2^10 words!

yeah,I think,if the PWM frequency is very low(E.G.100–200hz),the motor will become terrible,while the PWM frequency is very high ,the time of MOSFET working become very short,the MOSFET gets hot.Is that right?
There is my picture about the control
of the Servo Motor.

The H-Bridge shouldn’t be getting hot just from switching quickly, that’s what H-Bridges are for. At some amazingly high PWM frequency that might be a problem, but the VNH3SP30 has a max rated PWM frequency of 10 Khz, so running it at 8 Khz shouldn’t be a problem.

Are you saying that when the PWM frequency is high, the VNH3SP30 gets hot and the motor turns slowly? Or are you saying that when the PWM frequency is high and you are commanding the motor to turn slowly (with a low duty cycle) the VNH3SP30 gets hot?

If the second is the case then the only thing I can think of is that the motor is the problem. You said it was turning at ~1 rpm. Is this the output shaft of a gearmotor, or just the drive shaft of a regular DC motor (sorry, I can’t see the picture in your last post)? If you have a regular DC motor turning that slowly, it’s basically drawing the stall current all the time. It would be like shorting power and ground from the H bridge through the motor armature wires.

In this case the problem might be worse at high PWM frequencies. The VNH3SP30 has over-current protection, which would be tripped every duty cycle. For a short period of time each cycle, however, current is flowing, so at higher PWM frequencies, more current is flowing and the chip is getting hotter. If you actually need a shaft to turn that slowly for some reason you should get a gearmotor with a high-reduction.

I’m making a lot of assumptions about your problem here though. Could this be your problem or am I just totally wrong?

(I’m very sorry that I didn’t express the opinions clearly,while I will try my best to improve that)
Yes,you are right. It is the second case. When the PWM frequency is high and I am commanding the motor
to turn slowly (with a low duty cycle,I will describe it clearly and precisely later) the VNH3SP30
gets hot.

The motor is a problem,but not all the problems.I use a MAXON motor (RE-40,24V,Order Number: 148867)
without a gear and a SANYO(MADE IN JAPAN) DENKI SUPER L motor with a gear ( 10:1 ).Also I use a
MAXON motor (RE-MAX 29) with a gear (19:1) . And I get that it is not the duty cycle ( I can change
the system Power supply from 7V—30V,and I can change the PWM frequency of LM629 through different
Crystal Oscillator ,now the PWM frequency is 4KHz with a 2.048MHz Oscillator ) but the duty
time ( the high level time,I don’t know how to convey it properly).If the duty time is shorter than
100us~150us,the VNH3SP30 will get hot(although the current is only about 0.21A,the chip gets hotter
and hotter. )while the duty time(the high level time) is more than 100us~150us(e.g. 200us),it won’t get hot.
It is almost the same whether the PWM frequency is 4KHz or 8KHz.

So you can get that, when the PWM frequency is 4KHz,the cycle period is 250us(1/4KHz).The duty cycle is
at least 40%(100us/250us*100%) for a cool VNH3SP30.But with the 40% duty cycle ,the motor will work so
fast even a gearmotor with a high-reduction.If I want the motor to turn at a low velocity such as 1 rpm,
maybe I have to abort this VNH3SP30(recently when I go to buy the VNH3SP30 chip ,the seller tells me that
STMicroelectronics has stop offering VNH3SP30,is that right or just a trick of the seller? if right ,maybe
a 10KHz PWM frequency a Bug?)

Thanks for any reply.

PS:I am a Chinese student and very interested in robotics,hehe.

I’m using the VNH3SP30 and am seeing simmilar behaviour. Did you end up working out what the problem was?
Many thanks
Paul Kelly