Go Down

Topic: beeping while pwm control (Read 3341 times) previous topic - next topic

metebalci


Hello,

I am a newcomer to arduino and recently got an arduino uno board with dfrobot motor shield (2A version) and trying to control the motors in the RP5 robot chassis (a 2WD car). When I try to control it using PWM, I hear a sound like beeping, I have no idea why it happens, can you give me some hints ?

Because of the problem with PWM, I switched using PLL. I am a little familiar with PWM but not with PLL motor control at all. Is it possible to control the speed with PLL ? is it functionally same with PWM, do you recommend or not using PLL over PWM ?

Thank you.

Mete

mowcius

The beeping noise is due to the low frequency that the PWM is being performed at. Most DC motors work best with PWM of about 20kHz

If you boost the PWM frequency then you should be able to get rid of the noise.

metebalci


Thank you for quick answer. I just saw the pages in arduino.cc website on changing PWM frequency and also I am checking the outputs on oscilloscope now. I guess I will manage.

Mete

mowcius



Thank you for quick answer. I just saw the pages in arduino.cc website on changing PWM frequency and also I am checking the outputs on oscilloscope now. I guess I will manage.

No problem. Changing the PWM frequency can be a bit of a pain but glad you found some info (saves me digging for it)

jrsall92

I'm having the same problem while trying to power 2 DC motors from the motor shield (v3). I read here:
http://playground.arduino.cc/Code/PwmFrequency

that for the 3 and 11 pin which have freq of 31250, the possible divisors are: 1, 8, 32, 64, 128, 256, and 1024. But none of those divide 31250 near the 20khz zone. Any ideas?

cattledog

Quote
But none of those divide 31250 near the 20khz zone. Any ideas?
You have three ways to your goal.

1) Find a PWM library and learn how to use it. There are probably several to be found.

2)Enter "pwm 20Khz" into the search box for the Forum and follow the many leads.

3) Read the data sheet for the ATmega 328 chip and learn how to set up the timers to generate the 20Khz pwm.


Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy