Changing PWM frequency to reduce motor noise?

Hello,

I'm currently in the middle of a project where an Arduino Mega 2560 is used to control 12 motors via its 12 PWM pins and auxiliary H-bridges. It is important for the application that the motor operation is quiet. However, they make quite a lot of screeching noise at low and medium duty cycles.

I was wondering if I changed the PWM frequency (by resetting the prescaler) to a value above the human hearing threshold (20kHz or so) would that eliminate the noise?

I understand that changing the prescaler bits have impact on millis() and delay() functions. But do they also affect serial communication?

Thanks in advance.

Changing the timer prescalers is not going to affect serial communication. And only Timer 0 is used for millis() and delay() so the other timers should be fine to play with.

What type of motors are you using? You should indeed see a big reduction in noise if you go to higher PWM frequencies. Just make sure your H-bridges will switch OK at those frequencies and won't overheat (the higher the frequency, the more power the H-bridges dissipate).

--
The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected

I'm using pretty standard permanent magnet DC motors (RS-380) driven by SN754410 (datasheet) H-bridges. In the datasheet it says the minimum switching time is 900ns which is equivalent to around 1.1 MHz so I guess it should be fine in that sense. Is there a way to estimate whether they would overheat? As in, what is the relationship between frequency and energy dissipated as heat?

It's not easy to say, but for a 754410 it might be less of an issue than a MOSFET based driver. In any case, I would take the temperature of the 754410's now, then maybe double the frequency (not quite 20kHz) and see what happens. Assuming linear behavior that would let you extrapolate out to 20 kHz.

My guess is that with your components you're not going to see a big change in temperature.

--
The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected

hammeraxe:
In the datasheet it says the minimum switching time is 900ns which is equivalent to around 1.1 MHz so I guess it should be fine in that sense.

A bipolar/Darlington switch is much less sensitive to switching time heat-up than a MOSFET based switch. I think you'll be fine at 25 kHz.

Indeed, this works really well - no noise whatsoever.

The ICs do heat up more, but I have put heatsinks on them so this is not an issue. However, I also noticed that the Arduino board itself heats up considerably now. After some poking around it seems that it is the oscillator that heats up (it can almost burn my fingers). The question is: is this harmful?

This is very unusual. The oscillator should not be heating up at all. Are you sure it is the oscillator? Can you post a picture of the part getting hot?

--
The QuadRAM shield: add 512 kilobytes of external RAM to your Arduino Mega/Mega2560

Actually you're right. It's whatever is right next to the oscillator (in the yellow circle). It gets HOT and heats up everything else around it.

Also, I don't know what's happened now but the Mega isn't recognized by the computer anymore. I swear it worked fine 10 minutes ago, I don't think I did anything to it. Power LED light's up, but TX/RX don't.... And my Uno works fine, so it can't be the computer...

That's the LM358 comparator that auto-switches between USB power and external power. Something bad happened to your board and that component needs to be replaced. It should not even be warm under normal circumstances.

--
The Flexible MIDI Shield: MIDI IN/OUT, stacking headers, your choice of I/O pins

Ughh.....

Is it possible to tell if it's just that component that's dead or if the 8U2 is dead as well?

What could have caused this though? Short circuit? Overcurrent?

:frowning:
This has been a very bad day

It can't be said with certainty what happened to your board, but looking at the Mega schematic an overvoltage condition on +5V or +3.3V is the most likely culprit. If an overvoltage on +5V caused it (perhaps you hooked up 12V to the 5V output pin?) then most components on your board will have been destroyed. We have some discussion on this here:

Sorry :frowning:

--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

jwatte:

hammeraxe:
In the datasheet it says the minimum switching time is 900ns which is equivalent to around 1.1 MHz so I guess it should be fine in that sense.

A bipolar/Darlington switch is much less sensitive to switching time heat-up than a MOSFET based switch. I think you'll be fine at 25 kHz.

That statement doesn't make physical sense. Are you trying to say bipolars switch faster then?

Bipolars in general switch faster, but I'm not sure about darlingtons.

MarkT:

jwatte:

hammeraxe:
A bipolar/Darlington switch is much less sensitive to switching time heat-up than a MOSFET based switch. I think you'll be fine at 25 kHz.

That statement doesn't make physical sense. Are you trying to say bipolars switch faster then?

From what I know: A bipolar "switches" totally differently than a MOSFET. In a MOSFET, you have to build up charge until it goes from high Rds to low Rds. In a bipolar, the amount of current through the base controls the amount of current through the collector/emitter. There is no "charge capacitance" to build up.

Now, because BJTs are current limiting, they are usually specified for a certain amount of current, and any current through them that is less is "within spec"-- the amount of heat dissipated at a lower current will be less than the amount of heat dissipated at max current. (I could be wrong here, but this is what I remember from many years ago)

Meanwhile, with MOSFETs, the resistance varies such that, at an intermediate state, the i-squared-R of the device will actually be higher (and thus dissipate higher amounts of heat) than at the fully switched-on state, where Rds is measured in milli-ohms. It is my understanding that you have to put enough voltage into the gate and enough of a current burst into the gate to build up the charge to lower Rds quickly, to not stay in that problematic area for too long and build up too much heat, whereas BJTs don't have t he problem. Put another way, "half on" is not a supported operational mode for MOSFETs.

BJTs, instead, have the problem that their "fully conducting" state has higher effective resistance than MOSFETs, and thus dissipate more heat at "max current" ratings. Thus, packages and ratings and designed for that dissipation ("half on" is a supported operational mode), so as long as you stay within rated max current, you'll be OK.

Does that make more sense? If not, I'm looking forward to refresh my knowledge!

Put another way, "half on" is not a supported operational mode for MOSFETs

Well it actually is. A mosfet can certainly be operated as a linear amplifier rather then as a simple switch mode device, just like BJT transistor can. However the current value that can be operated in a linear mode must be within the heat dissapation rating for the device. So it's just a matter of always keeping the transistor (bjt or mosfet) operating within it's SOA, (safe operating area) and it's datasheet can help you determine what those conditions are.

Lefty