PDA

View Full Version : PWM Frequency



Arthur
11-09-2005, 05:56 AM
My first post...

I see a few people have used PWM based controllers here, but I can't see any mention of what frequencies are used.

Does anyone have an opinion whether the frequency matters or what frequency is optimum in any particular situation?

Thanks

Arthur

edit: The best info I have seen so far is HERE (http://www.jaygeeracing.com./SCB85_Controller_Article_Manuscript.pdf)

JayGee
11-10-2005, 05:25 AM
Arthur,

Microchip has a good set of application notes on PWM based motor speed controls. In particular, there is an app note in which a PWM speed control was developed for an electric motor in an RC plane. It contained a very good discussion of PWM frequency vs motor hum, cogging of the motor, and heat developed in the drive electronics.

Arthur
11-10-2005, 06:08 AM
Thanks for the reply, I'm an avid reader of those application notes they are a goldmine. But even Microchip can't be specific when it comes to drive frequency. From the brushed motor application note...

A good rule of thumb is to modulate
the input waveform at a frequency in the range of 4 kHz
to 20 kHz. This range is high enough that audible motor
noise is attenuated and the switching losses present in
the MOSFETs (or BJTs) are negligible. Generally, it is a
good idea to experiment with the PWM frequency for a
given motor to find a satisfactory frequency.
It's the last sentance where they suggest experimenting that makes me wonder what frequency the current PWM controller guys are using?

All discussions about this I've found on the net in robot forums etc. tend towards suggesting finding the frequency by experimentation. My controller uses a Microchip pic and I've set it up with a variable frequency between 1 - 60KHz, so I'm following the advice by being set up for experimentation.

But, can anyone throw me a clue as to what works with slot cars? What do the current PWM controllers use? Is it a fixed frequency across the throttle range. I guess I'm looking for a guy with a controller and an oscilloscope:)

BDC application note (http://ww1.microchip.com/downloads/en/AppNotes/00905a.pdf)

usraprez
11-10-2005, 01:39 PM
Interesting. Given the application notes, I'd say you'd want a knob to adjust that, as a 16D is a lot different than a 27 or open, and each motor unto itself is a bit different....

JayGee
11-10-2005, 01:43 PM
Arthur,

The answer depends as much on your drive electronics (the mosfet driver as well as the mosfet's characteristics) as anything else. What's good for one controller may not be ideal for another.

For example, the Parma EC has the power electronics integrated into the handle w/o forced air cooling. I've seen other units with the electronics in a module cooled with a fan. In theory, the fan cooled module can handle the higher switching losses incurred at higher frequencies.

I think, but I'm not sure, that International Rectifier has an on-line simulator you can use to help you determine the switching losses and cooling requirments for your electronics. Or, you can calculate it with the info that is provided in app notes by IR, Microchip, et al.

Arthur
11-10-2005, 03:28 PM
(A belated thanks to admin for moving my post to a more appropriate forum - cheers)


Interesting. Given the application notes, I'd say you'd want a knob to adjust that, as a 16D is a lot different than a 27 or open, and each motor unto itself is a bit different....
Well the thing about knobs on controllers is, it an get out of hand...
http://www.slotforum.com/forums/uploads/1131026442/gallery_2870_175_70729.jpg
I find this so interesting that it has kept me awake some nights... :rolleyes: I have 4 knobs for frequency; 2 for brake and 2 for Attack, to handle the low and high ends of the throttle range - my idea is that it may be interesting to change the frequency across the throttle range. (Yellow and blue knobs). The freq can vary in almost 1024 increments between 1kHz and 60kHz.

Thanks again Jeff, my take on switching losses is that it's not directly relevant to this application. The problem with the Microchip documentation is it is largely written from the point of view of efficiency - which is less important for slot cars. So I discount the upper limit Microchip and many others (the robot guys in particular) mention of around 18-20kHz as this upper limit seems to be based on minimising switch loss in battery powered applications.

My thinking goes like this - (please do correct me if I have it wrong or it can be improved)... There are NO switch losses at 100% duty cycle so the wide open throttle performance is the same no matter what the drive frequency is. For other throttle amounts switch loss is not important as we are at partial throttle - any non linearity can be compensated for in the code. So the only thing to be worried about is the indirect result of the switching which is heat. I also saw a simulation for this a while back, haven't done the calculations - I just put a large heatsink with a fan on the controller and hope it's enough. I plan to try driving the MOSFETs at anything upto 60kHz and see if they get too hot. The ol suck it an see.

Any feedback appreciated.


edit: Jeff - I know most of the stuff I put you already said/know, just reread what I put and it looks like I'm trying to tell you stuff... not my intention at all.


2nd edit: Just thought - all I need to do is stick a temp sensor on the mosfets and then get the microcontroller to lower the frequency automatically as the temp raises? good, bad ugly?

Oh no! - I'm not going to get to sleep tonight either;)

sambrown
11-10-2005, 04:08 PM
I've never really felt the need to vary the frequency of the modulation on my controller based on the motor type, and it largely feels the same from a Falcon to a Eurosport.

The limitations on the high frequency side are as described above - the MOSFET driver. The two limits I have encountered are rise time of the driver itself and heat dissipation in the MOSFET due to the rise time. The reason I differentiate between these is the the rise time proper can affect driveability (turndown ratio) with too high a frequency and low power motors. For high power motors the limitations are almost always heat dissipation in the MOSFET.

Too low a frequency results in excessive commutator wear. I don't really care much about audible noise.

Selecting (and even placing and routing) the MOSFET driver can dramatically effect rise time. I also discovered that a poorly routed board at the wrong frequency will take out an AM radio at a startling distance. Please don't tell my neighbors.

JayGee
11-10-2005, 04:58 PM
It reminds me of the first time I saw 4 front wheels peeking out from underneath a tarp on the last page of Road & Track...an early photo of the six-wheeled Tyrrell P34.

Egads, trying to set that up between heats. The USRA Wing guys would need 10 minute lane changes!

Arthur...my comments are all in good fun and no, I didn't think you were trying to tell me what I already knew. Like Sam said, the switching loss issue is a heat related issue, not a full power issue as you so rightly observed.

Siliconix makes a good selection of half bridge drivers, one even designed for motor control with a brake input. It doesn't have a built in charge pump so you'd need to use a large enough resevior cap to maintain the gate charge for 100% duty cycle coperation...or just use a blast relay and be done with it.

Jeff

triggerman
11-10-2005, 05:37 PM
Quiet Numbskulls, I'm broadcastin'!!!

I always wondered what these PWM controllers would do pulsing a 155ft loop antenna!:eek:

M G Brown
11-10-2005, 05:47 PM
I felt the same as you about this F1 experiment...

http://www.padokf1.com/images/dosyalar/21092004152405-8.jpg

JayGee
11-10-2005, 06:28 PM
Ummm, that sounds like something we may do at Harry's, after the Chicago Open.

Seriously, it depends on the location of the power and ground taps. If the direction of current flow is opposed in each braid, the fields would cancel each other out...at least if I remember anything from my fields and waves class.

Then again, I took F&W in my last semester of college, already had a job lined up and had the opinion that my instructor had stood in front of a microwave horn just a wee bit too long.

Jeff

smichslot
11-11-2005, 01:57 AM
It would be an Irony

if any PWM-controller would have to be fitted with a fan to keep it cool, and it would be further irony if the PWM-controller would need a relay to give full power.

The Raison d'etre for PWM-controllers are a smaller package through higher efficiency, lower losses and whatever.
Now if you need to use fans and relays there is not much difference between the "old-fashioned" electronic controller and the PWM-ditto, so whats the point?

Ohh, I forgot!! You love to tinker with it, you love application notes, and you love to stay awake all night trying to solve a problem that has come up because of your solution to another problem.

Its fun, by all means!

Steen

Arthur
11-11-2005, 05:44 AM
I knew it would kick off when I posted a pic :D

Sambrown -

largely feels the same What do you mean?
Please post what frequency you used, any notes on how you arrived at that frequency and how you drove that frequency most appreciated.

Jeff - you do me the greatest honour with the P34 comparison! Tyre manufacturers be damned things could have been so different. Gate charges... is that approach required for TTL mosfet?

triggerman - so you're saying putting 433mhz telemetry aerial on the side of the controller to get telemetry from the car is a bad idea? Damn - I'm not doing so well :(

Steen - if you had thought of your last paragraph first you'd have realised how pointless the rest of your post was. (and you're wrong in parts - if you want to know where feel free to pm me)



Might help if I told you a little bit about myself... At the moment I don't own a slot car - I haven't raced in 25 years. I fly RC aircraft and race RC cars - the controllers for these hobbies are computer controlled and programmable in depth, so I thought I'd build a computer slot controller that was programmable.

sambrown
11-11-2005, 10:09 AM
Simply stated - I determined my driving frequencies through a very quick series of experiments. If the frequency is too high for the driver you can tell it on a scope, and it shows up when you are running the car as a definite non-linearity. I did my on-track testing with a series of cars and made sure that the general controllability (sensitivity, linearity, and response) was the same for all of them.

I hesitate to tell you what frequencies to use simply because its irrelevant for any other specific application. If you use my circuit board layout and my exact driver setup then it might be meaningful. And to be frank - I'm in the middle of changing all that right now.

The throttle thing is really the easy part. Worry about how you will provide braking if the power goes off just before you enter a turn. Worry about power shaping with chokes. Worry about boot time for race starts. Worry about transients causing spurious restarts. Those are the tough problems.

By the way - why use a telemetry? All the info you need is right there in the driver board. Voltage, amperage, throttle position.

Arthur
11-11-2005, 12:39 PM
Sam - er, you didn't answer a single one of my questions, there is no detail in your post. :confused: . Thanks for taking the time anyway. If you want to PM the frequency I promise I'll keep it to myself ;).

Don't worry about problems I might have, initially I'm not bound by any racing rules so I can cut corners at will, for example: - stick a battery in the controller (I'm not going to do that, but if I needed to I could). I do have a big learning curve but that's what I was looking for when I decided to start up.


By the way - why use a telemetry? All the info you need is right there in the driver board. Voltage, amperage, throttle position.
I don't think Amps and Voltage is any real use for finding out motor power (I'm sure that'll prompt someone to post :D) - I envisaged that data as useful to monitor the tracks power performance as a baseline for other calculations (I'm measuring the amps and voltage at the track. The controller has a RS232 out and the detail from the controller settings and subsequent calculations is output in real time. The telemetry is for RPM, motor temp and 2 axis accelerometer. I also plan a reverse version of the Orion RC car personal timer if you are familiar with that. I intend to put IR beacons around the track pulsing ID and hope that the car will pick the beacon up with a sensor and RF this timing signature to the controller which should allow breaking down a lap into sectors. Not mega accurate but good enough - I have a personal timer and they are accurate enough for my requirements.

So pulling track power data, throttle detail, rpm, temp, acceleration and sector times into a database on a PC with some custom analysis software is the overall goal of the project. I also dream of a variable load dyno to see how the dyno can compare to my findings on the track.


Could I just remind anybody who made it this far that I'm just asking about what frequency people have found works well with PWM slot car controllers.

Thankyou

JayGee
11-11-2005, 12:42 PM
Arthur,

It doesn't matter whether it's a logic level FET or one rated to switch completely on at VGS = 10V. You've got a gate capacitance that needs to be charged/dischanged to switch the FET.

The more FETs you have wired in parallel, the higher the capacitance. The lower the drain-source resistance of the FET, the higher the capacitance.

Mosfet drivers have high source/sink current capability to quickly charge/discharge that capacitance.

Jeff

Arthur
11-11-2005, 12:53 PM
Jeff - I'll go away and think about that more, I may have misread something.

Thanks!

slotracer577
11-12-2005, 10:48 AM
Originally posted by Arthur
[B]My first post...

I see a few people have used PWM based controllers here, but I can't see any mention of what frequencies are used.

Does anyone have an opinion whether the frequency matters or what frequency is optimum in any particular situation?

Thanks

Arthur


Arthur, it appears on my PWM controller that it is about 3.5 ms between pulses, with the on time varied between 1 and 255. Also looking at the speed charts it looks like small throttle steps are closer together than the high speed steps. The controller works well and doesnt get hot with 16D's or C cans.
The down side if the boot time for the chip. It ends up being about 6 to 12" per track call. We fixed that by adding a battery to run the mosfets and cpu. Not legal, but OK with everyone we race with.
The up side is the interlaced brake and power. Gets the car slowing down sooner when you let off.
John

Arthur
11-12-2005, 11:50 AM
Thanks John, 3.5ms is a very big number. I assume the on period of 1 to 255 refers to the throttle being variable in 256 steps? In other words an 8bit controller and not 1 to 255ms on time :eek: .
http://mechatronics.mech.northwestern.edu/design_ref/actuators/pwm2.jpg
I think you are saying you measured the gap between pulses?

With 3.5ms being such a huge number lets say the controller was at the 1/255 position so 3.5ms would be 254/255 of the period. So the period is a tad bigger than 3.5ms.

Which makes the frequency about 285Hz - the received wisdom (what there is of it) would suggest your number is wrong, my maths is wrong or your motor is toast!

A microprocessor doesn't need to boot up there is no operating system. I guess you're referring to the time for the voltage to stabalise in the processor core. There is a delay mechanism that delays the start up for 0.028 - 0.07 of a second - this is a feature that ensures a consistent startup in the case that most applications wouldn't be affected by a delay of around 50ms. At the moment I use this feature as I'm developing. With the feature switched off the code starts executing in something like 0.000001 of a second, running the chip at 20Mhz means that the time from power on to pulse out is pretty much identical to a resistor controller.

As electrons move very very fast - it's difficult for there to be a circumstance where we mere humans could percieve the difference between electrons whizzing round a microprocessor with 1000s of transistors or a single transistor.

We could argue about PWM switching full voltage so there is some miniscule advantage overcoming track resistances that over comes the minisule difference of 0.000001s for the processor to wake up. It's all pointless circular arguments until there is a car on a track against the timer with track power interruptions - then I'll know.

Thanks

slotracer577
11-12-2005, 01:57 PM
Originally posted by Arthur
Thanks John, 3.5ms is a very big number. I assume the on period of 1 to 255 refers to the throttle being variable in 256 steps? In other words an 8bit controller and not 1 to 255ms on time :eek: .
http://mechatronics.mech.northwestern.edu/design_ref/actuators/pwm2.jpg
I think you are saying you measured the gap between pulses?

With 3.5ms being such a huge number lets say the controller was at the 1/255 position so 3.5ms would be 254/255 of the period. So the period is a tad bigger than 3.5ms.

Which makes the frequency about 285Hz - the received wisdom (what there is of it) would suggest your number is wrong, my maths is wrong or your motor is toast!



Thanks

I know it sounds like a big #, but I have printouts from the ocilliscope from the original development. It appears that the period of the mosfet is indeed 3.5ms. So a 255 is 3.5ms and 10 is .13ms, 100 is 1.3ms on time. I dont have a scope to verify this, but there are lights that signify that the fets are being pulsed and I can see them flicker while at part throttle, so 280hz or so seems like a real #. If you want the circuit, I can scan and send to you. I would also be glad to send a board if you could put a newer chip on it that can be programmed.

John

Arthur
11-12-2005, 02:41 PM
Blimey, that pulls the rug from under me somewhat :rolleyes:

I know the KO Propo VFS-1 RC car controller goes down to 600Hz but that is widely considered to be a com busting frequency.

Just to put that 280Hz in perspective a motor doing 40,000rpm is rotating at 667Hz.

I had thought of my personal rule of thumb being that I'd never drive a motor at less than 3 times the max rotational frequency of the motor - so that 40Krpm motor I would drive at a frequency no lower than 1.8kHz ish.

Well I will change my code to allow frequencies less than 1KHz then! (but I'll be examining the comm each lap)

The circuit would be most helpful, arthur@mikmin.co.uk


I would also be glad to send a board if you could put a newer chip on it that can be programmed. What's the story of this controller, did you know the developer help the development? Once I see the schematic I'll be able to say if I can put a different processor in there.

I use a hall effect sensor in the controller so there's no wiper blade but it they should still be compatible. I'm just fascinated to see the schematic.

Cheers John

slotracer577
11-12-2005, 11:53 PM
Originally posted by Arthur
Blimey, that pulls the rug from under me somewhat :rolleyes:


Just to put that 280Hz in perspective a motor doing 40,000rpm is rotating at 667Hz.


What's the story of this controller, did you know the developer help the development? Once I see the schematic I'll be able to say if I can put a different processor in there.



I am not sure that we see 40,000 rpm from the death stars that we run. I do know that the controllers work pretty well.
The story is that I bought the last two controllers that were built. The guy who did the controllers, Dr Robert Suding, was no longer actively selling the units since the supply of the eprom's had dried up and it was no longer interested in making more. So when I picked up the last 2 I also got all of his spare parts and development information. He used a flag and optical switches to provide trigger input, 8 positions I think.

John

Arthur
11-13-2005, 01:31 AM
John many thanks. You have some very interesting documentation there. Have a think what you could use from me that you might want. I could just paypal you for a photo copy of it all and postage (and a few beers on top) if you wish.


O/T...
Anyone who didn't know of Dr Suding who is interested in things electronic and RC flying might find his website an interesting read. The story of the guy is interesting in itself - a latin teacher that was into HAM radio that self taught himself electronics. Then left teaching to go work for IBM around about the time I was born;). Great to read his story. I'm going to drop him an email. Just have to figure what I'd say to a guy like that.

His website is HERE (http://www.ultimatecharger.com) All the links are worth clicking on - unlike many websites that look fantastic but are empty this one has some proper content.

Arthur
11-15-2005, 05:29 AM
I've swapped some emails with Dr Suding, Jeff and a few other European PWM controller guys and I have the info I need :)

I'd like to thank everybody who tried to help me.