I have recently bought a pololu MC33926 Dual motor driver and have since noticed some strange current output. When setting the both my motors to a PWM duty cycle of 0% the current remains zero as expected. However, when setting the PWM to any non zero duty cycle, the current takes the shape of a saw tooth signal. I was hoping for some insight into this whever it is how the driver is supposed to work or if it is a fault. Attatched is the signal output fromn one of the motors.
Hi Daniel
What did you measure that with and what does the horizontal scale represent or in other words what is the repetition rate or frequency of this “sawtooth”.
If measuring with an oscilloscope across the motor you should remove the earth connection from the oscilloscope in case you get some unwanted connections via the instrument mains earth. But an oscilloscope measures volts and apparently whatever you used seems to have displayed current. A bit noisy though.
Just for the record a square wave applied to a pure inductance will produce a linear sawtooth current through it. This is modified little by the DC resistance of the inductor. To look at it another way if you need a linear increase in current in an inductor (like the old television yolk) you apply a square wave voltage with a little bit of sawtooth on the top to accommodate the DC resistance.
Cheers Bob
Hey Bob,
The x axis represents time in seconds, so its is a slow periodic saw tooth. I measured the current using an onboard current sensor (AC724), hence the noise, so the whole system is using a common ground. I have some friends using identicle systems however are not experiencing the same issues.
Thanks Daniel
Hi Daniel,
What sort of load have you got from the motors? Also if you could send through a photo of how you’ve got it setup, that’d be most helpful.
Have you ruled out any fluctuations in supply current?
It looks similar to the curve presented on the datasheet for current limiting, but I’m not sure whether it’s relevant to your time-scale:
Keen to get to the bottom of this!
-James
EDIT: Links for completeness:
- Looks like you’re using this, could you confirm?
https://core-electronics.com.au/dual-mc33926-motor-driver-carrier.html - Datasheet here:
https://www.pololu.com/file/download/MC33926.pdf?file_id=0J233
Hi Daniel
A pic and a wiring diagram as James says would be very helpful. Especially the diagram.
That is very slow. I can’t think of anything operating that speed unless it is a beat of some description between the 2 motor drives but if the PWM comes from the same Arduino I can’t see that happening.
What do you mean by “common Ground”. The motor (s) are not grounded. They float and driven by “H” bridge of some flavour inside the chip… If you have a motor grounded you are upsetting the operation badly.
What is an AC724. I google it and all I get is Air Canada schedules. I assume it is a hall current sensing device but I can’t see it anywhere on the circuit for the dual motor driver unless I am looking at the wrong one. The MC33926 is the IC and is used on several modules so if you quote the actual Core or Pololu part no we might stand a chance of getting the right one.
Please indicate where this AC724 is inserted to do this measurement.
Cheers Bob
Hey James,
This for of current plot, the same wave form is present for when there is no load and an externally applied load. That plot does look similar however i think t_A and t_B are on the oder of micro seconds. I am using a LiPo battery for a voltage source and I have measured the volatge at the Vin pin on the motor driver and it seems quite stable, onlu dropping by 0.01 V when each saw tooth occurs.
Thanks
Daniel
Hey Bob,
The schematic is shown here where the top are the two rails for an STM Nucleo-F446RE. All relevant pins are on this.
Sorry, The current sensors are ACS724. I used an oscelliscope and power supply to troubleshoot them and im happy if their performancs. They are a stand alone module not included on the dual motor driver module.
This problem seemed to be reduced by decreasing the PWM period I have found, however is doesnt fully remove it.
Thanks again,
Daniel
The link to the motor driver where purchased is: https://core-electronics.com.au/dual-mc33926-motor-driver-carrier.html
Hi Daniel,
I know this likely won’t change the result, but try hooking your scope up to the M1 FB
and M2 FB
pins on your motor driver (internal current sensor pins) to rule out any external components, and see whether that changes anything. These should apparently be shorted to ground through a resistor when not used.
As always, keen to get to the bottom of this!
-James
Hi Daniel
OK I can see where the sensors are and should be OK.
Question. Are both motors and sensors the same result ?
Tip. Remove the mains earth from your oscilloscope. Phantom and unexpected grounds vis instrument mains earths can introduce problems which are not there in the real world. I have a short length (300mm) of mains cable with the earth wire disconnected. I leave this Green/Yellow wire hanging out of one connector so it is obvious to anyone else there is no earth connection.
The rate of this suggests what used to be known as slow speed “motor boating”. Usually caused by a higher than normal source impedance power supply where the impedance has gone too high to charge reservoir capacitors quick enough. Check all your power supply voltages and connections and check for any voltages sagging under load. If both motor channels are the same the problem is common and usually about the only common thing is the supply. The charge / discharge shape is a bit of a give-away. Check any bits of the supply which look like a sawtooth generator like a capacitor being charged via a resistor and discharging into a load periodically. Do you have long leads from your power source to the motor PWM switching circuit. These can be very inductive and should be as short as possible or the inductance will cause a charge pump effect and the power source voltage will actually go up and down. If the wires are a bit small this inductance will increase and the effect will be worse. Lots of things to consider.
I assume you have done the same measurement on your friends set up and they are all clean ?
Cheers Bob
Hey James,
Great idea, Ill be sure to give this a try once I get back into the lab!
Daniel