I’m using the Dual VNH2SP30 Motor Driver Carrier MD03A board. I’m running into a strange problem. If I scope the output (outA to outB) the rise time (tr) is good about 1.6 uS, but the fall time (tf) is about 50 uS, which is bad. The spec sheet for the chip says that the fall time should be 2.4 uS max. I have also noticed that there is about a 2V dc offset at the output. This is how I have the connections made right now:
Vcc = 5V
Vbat = 8.4V (Li-po batt.)
E = NC
A = Vcc or Vbat (does it matter?)
B = gnd
PWM = 5Vpp
This problem happens for
PWM 2.5-10 Vpp all duty cycles, and freqs from 1-20 kHz
A = gnd B = Vcc - Vbat
B = gnd A = Vcc - Vbat
Do you have any idea where the offset or slow fall time is coming from?
When the PWM pin goes low, the VNH2SP30 turns off both of the low-side MOSFETs, so one of your motor outputs will be floating (in your case it is OUTB). You have no motor/load connected between the motor outputs, so there is no reason to expect the voltages to OUTA and OUTB to quickly equalize during this time. Try connecting a 1K resistor or a motor between your outputs and you should get much different results.
Your wiring sounds like it is probably OK, but if you want help with your wiring, please use the full, correct names of the pins as printed on the Dual VNH3SP30 Motor Driver Carrier MD03A board, otherwise it’s hard to tell what you are talking about. For example, there is no pin called Vbat, and “A” could either mean 1INA, 2INA, OUT 1A, or OUT 2A.
I would also like to add that the waveform is not much like a square wave when the motors are hooked up. The voltage drops sharply, then increases again very sharply to nearly full voltage for all duty cycles then at the end of the “off” part of the cycle it comes up to full voltage. Thus, we don’t get a significant change in average voltage for a large change in duty cycle.
petey42 and mgriff,
Do you know eachother? Are you both working on the same project?
mgriff, what are you measuring with the scope, and what are all the connections that you made to the board? I think you should use your scope to plot the voltage of OUTA with respect to GND, and also try plotting OUTB with respect to GND. I think one of them should look more like a square wave, and the other one might look like the image you posted.
The waveform you’re seeing doesn’t look unusual. You can see where the outputs are driving (the active portion of the duty cycle) followed by a negative inductive spike and a period where the outputs are high-impedance (the low portion of the duty cycle). While the outputs are high-impedance, you are seeing the voltage generated by the spinning motor. This is not voltage supplied by the driver, and if you were measuring current you would not see current flowing from the driver into the motor during this portion of the duty cycle. Can you describe how your motor is reacting as you vary the duty cycle?
When you use the PWM input of the motor driver, you get drive-coast operation, where the outputs float while the PWM pin is low. It is possible to use the driver in drive-brake mode if you hold the PWM input high and PWM one directional input (e.g. inA) while holding the other input (e.g. inB) low. You can change direction by changing which of the two pins you PWM. This method requires one fewer I/O line per motor, but it requires two PWM outputs per motor. In general, drive-brake operation tends to result in a more linear relationship between duty cycle and motor speed than drive-coast operation.
Edit: I had a closer look at the VNH2SP30 datasheet and I see I was incorrect about a couple of points. One is that only the low-side MOSFETs are disabled when the PWM pin is low; the high-side MOSFET stays on, but current still will not flow from the driver into the motor while the PWM pin is low. The second is that the turn-on and turn-off delay times are relatively long, which makes PWMing the inA and inB pins impractical on this motor driver unless you want to use very low PWM frequencies. I don’t recommend trying to get drive-brake operation using the VNH2SP30.
Thanks for all of your input. Sorry for the late reply, petey42 and I are working on the same team. I have been using the drivers in drive-coast mode. I tried putting a 100 ohm resistor across outA and outB. With a supply voltage of about 8V. With this load the output waveform looked exactly like it should with the rise time and fall time in spec (~2 usec) and no DC offset. However if I use a 1k ohm resistor I don’t have any DC offset, but the fall time is very slow around 30 usec.
With the motors that I need to use the motor speed isn’t linear with the PWM. The motor basically stays around a constant speed from 20% to 80% duty cycle. I tried a different (larger) DC motor that drew alot more current, and the motor speed was very linear with the PWM. It seems like the motors I’m trying to use just don’t draw enough current to get the mosfets to switch properly…
What is the current draw of the two motors you’ve tried?
The motors we are using could draw 8A max on startup, but then during normal operation about 0.5A. Do you think the Dual MC33926 Motor Driver Carrier would work better? Assuming we limited the transient current down to 5A.
Thanks for all the help
I think you could potentially get better results with the MC33926 if you use it in drive-brake mode (hold the PWM pin high and PWM the direction inputs appropriately). If you build acceleration-limiting into your system and avoid stalling the motors, you should be able to keep the current draw under the 5A limit. The MC33926 has current-sense feedback, which can help you keep the current draw within the acceptable range.