Pages: [1]   Go Down
 Author Topic: Need help understanding this problem - brushed Dc motor with pwm  (Read 297 times) 0 Members and 1 Guest are viewing this topic.
Offline
Newbie
Karma: 0
Posts: 44
 « on: August 21, 2014, 12:37:49 pm » Bigger Smaller Reset

Hello,
I am trying to to a parameter identification, estimation on a motor and I am having trouble with it's behavior.
I'm using an arduino mega 1280 to control it and send values read by serial to simulink.

-For 12v at 0,9pwm and 18v 0,6pwm the voltage is the same but the resulting speed is diferent, how come ?
-Is the pwm interfering somehow with the motor speed ?
-Why at Pwm>90%  the speed starts to decay instead of rising ?

My power source is a transformer, at 12v inputs max 10A and 5,5A at 18v
The motor is rotating freely in the experiments so the current is around 0,2A.

The motor has a dynamo built-in and I use it to measure the velocity by its output. 2v/1000rpm
I added a 10nF capacitor to attenuate the vibrations caused by the brushes on the output of the dynamo.

There is a graph with measure velocity vs input voltage and pwm

 Velocidade.JPG (174.07 KB, 1409x621 - viewed 24 times.) « Last Edit: August 21, 2014, 03:56:11 pm by marcosmoura » Logged

UK
Offline
Tesla Member
Karma: 127
Posts: 7239
 « Reply #1 on: August 21, 2014, 01:20:00 pm » Bigger Smaller Reset

Those questions are above my pay grade.

I think it would help you to get an answer if you write the questions in your Post so people can see what you want without opening the picture.

...R
 Logged

0
Offline
Shannon Member
Karma: 207
Posts: 12200
Arduino rocks
 « Reply #2 on: August 22, 2014, 06:46:34 pm » Bigger Smaller Reset

The average voltage on a motor's inputs that's being PWM'd isn't a great measure
unless you know which decay mode is used in the motor controller.  Ignore it unless
you are also prepared to poke a 'scope at the leads of the motor & learn about
slow and fast decay modes, and synchronous rectification mode.

The slowdown when PWM rises from 95% to 100% is interesting - again a 'scope
might be needed to track down the issue here, it might be that the H-bridge is being
given pulses that are too narrow for it and misbehaving.  Some H-bridge designs
require the low-side drivers to be be active regularly to refresh a driver
bootstrap supply on the high-side drivers.  Such H-bridges can never be driven at 100%.

What H-bridge / motor-shield and what PWM frequency?
 Logged

[ I won't respond to messages, use the forum please ]

Offline
Newbie
Karma: 0
Posts: 44
 « Reply #3 on: August 23, 2014, 09:41:10 am » Bigger Smaller Reset

I am using the l298 with both outputs connected in parallel for more current output, because of the current peaks the motor has when suddenly changes direction in response to a step wave.

I was using the default fast pwm at 1khz for pwm, but I could hear the motor making a sound so I changed the prescaler on timer0 which is the timer on pin13 that I use for pwm, (atmega1280), to 1 instead of the default 64.

So now its at 62.5 khz  (16Mhz/256).

Another thing I though of just right now was the response of the components inside the l298n if they are as fast switching as the pwm because lets say at 90% pwm, they are only switched off 10% of the period (1/62.5khz).
So I am thinking that it doesnt have time to switch off and turns on again very quick. So I will change the prescaler back to 64 and check the diferences.

I don't just need  a solution but if someone as tips on what it could be it i will be grateful ;D

EDIT:
So I tested at diferent pwm frequencies and the results vary greatly, at 1khz, 7.8khz and 62.5khz (64,8,1 prescaler).
Here are the results, I got suprised by the 7.8khz.
The torque seems to be significantly weaker at 62.5khz at 60% pwm than at 1khz.
The motor rotates after 25.5%pwm at 1khz and at 62.5khz only after 50%.
There is something wrong about the 7.8khz, I am going to try to run it at 31khz using phase correct and check the results.

L298
ELECTRICAL CHARACTERISTICS
SYMBOL            PARAMETER                                      test condition           min           typ.            max        unit
fc (Vi)         Commutation Frequency                          IL = 2A                                       25               40          KHz

Fast 1khz                            Fast 7.8khz                        Fast 62.5khz

phase corr 490hz            phase corr 3.9khz            phase corr 31.25khz

 pwm_supply_12v.JPG (52.61 KB, 959x361 - viewed 4 times.) « Last Edit: August 23, 2014, 12:11:27 pm by marcosmoura » Logged

Victoria, Australia
Online
Edison Member
Karma: 46
Posts: 1564
Electronics Engineer/Industrial Control
 « Reply #4 on: August 23, 2014, 11:23:59 pm » Bigger Smaller Reset

Hi, are you doing all these tests with a known load on the motor, ie a constant load?

Also do not forget that you are using PWM, hence AC component of current in a motor.

Even though it is a brushed DC type, the frequency you test at will have an effect due to the  fact that the armature will appear as an inductor with indescribable spikes on it from commutation, back EMF.
Your last set of graphs has no title or axis labels, my maths, physics and chem teachers would have crucified us for posting graphs like that. I have no idea what I'm looking at.

Tom.....

Can you please post a  copy of your circuit, in  CAD or picture of hand drawn circuit in jpg, png or pdf format.
Including the diagram of your power supply, is it a regulated supply, what sort of regulation does it have, size capacitors.
 « Last Edit: August 23, 2014, 11:32:45 pm by TomGeorge » Logged

Everything runs on smoke, let the smoke out, it stops running......VK3DMK

0
Offline
Shannon Member
Karma: 207
Posts: 12200
Arduino rocks
 « Reply #5 on: August 24, 2014, 11:06:22 am » Bigger Smaller Reset

The L298 is a darlington driver, you'd be hard pressed to get it to work past 5 or 10kHz
before its sluggish switching affects PWM behaviour at the extremes of the range, darlingtons
can take several us to switch off.

Try 8kHz
 Logged

[ I won't respond to messages, use the forum please ]

Offline
Newbie
Karma: 0
Posts: 44
 « Reply #6 on: August 24, 2014, 06:12:42 pm » Bigger Smaller Reset

TOM:
Sorry I didn't noticed the axis.

It is Rad/s (Velocity) vs time in seconds.

Another thing that I noticed and now you also mentioned is the power supply which is a charger where I can choose voltages from 12V to 24V.  At 12V it has max current of 10A which is enough but probably has a bad response to PWM.
I was thinking it is the reason why the response is getting better at lower frequencies.

Tomorrow I will try with a car battery 12V I think it is ok and do the same tests for different frequencies.
I'm using the outputs and inputs of the L298n in parallel for double Amp. output, just in case.
I don't have acess to my faculty labs at the moment maybe in some weeks, it would be the only way for me to get a better power supply. I think the car battery will make the difference to see if it is the power source ( charger) problem.

Also I pulse the enable pin and not the input pins I think it is the right way to do it.

Markt:
Commutation Frequency is typically 25khz max 40khz and that made me think it is probably not the l298n that makes all those differences in velocity bellow 31khz.
 Circuit.png (140.54 KB, 1750x826 - viewed 8 times.) « Last Edit: August 24, 2014, 06:15:47 pm by marcosmoura » Logged

0
Offline
Shannon Member
Karma: 207
Posts: 12200
Arduino rocks
 « Reply #7 on: August 25, 2014, 11:50:21 am » Bigger Smaller Reset

With the L298 try 8kHz or 4kHz, the 95% + range should behave as expected (but
motor noise may be too much).

Generally slow devices like Darlingtons and thyristors are PWM'd in the audio range, faster
devices like MOSFETs/IGBTs can be run ultrasonic without undue switching losses.  40kHz
is a very high PWM speed for motors.
 Logged

[ I won't respond to messages, use the forum please ]

Offline
Newbie
Karma: 0
Posts: 44
 « Reply #8 on: August 25, 2014, 01:18:07 pm » Bigger Smaller Reset

I have tried to see if it was my charger problem but it is not, I gess the motor does not respond well to higher frequencies pwm.

 Logged

0
Offline
Shannon Member
Karma: 207
Posts: 12200
Arduino rocks
 « Reply #9 on: August 26, 2014, 11:58:28 am » Bigger Smaller Reset

Let me say it again - its a darlington H-bridge, it doesn't switch fast.

Forget the motor, that H-bridge takes several us to switch, so if you want
linear PWM response between 95% and 99% you'll need to switch at 5 kHz or so.

The max 40kHz in the datasheet is the manufacturers figure, its erm, "optimistic"
(ie codswallop).
 Logged

[ I won't respond to messages, use the forum please ]

 Pages: [1]   Go Up