While playing with a couple of H-bridges one motor had more torque then the other. Although the voltage going to both motors was the same. The reason was that I was using 2 pins with different pwm frequencies. I had read that not all the pwm pins had the same frequency but couldn’t find a list on the Arduino website with the different frequencies of the pwm pins. So I used my oscilloscope to check the frequencies of the different pwm pins. While I was at it I checked all my different Arduinos. Here is the list:
Arduino with ATmega328 (Duemilanove/Uno/Nano)
pin 3 490Hz
pin 5 980Hz
pin 6 980Hz
pin 9 490Hz
pin 10 490Hz
pin 11 490Hz
ATmega1284 (Maniacbug bootloader)
pin 3 980Hz
pin 4 980Hz
pin 6 490Hz
pin 7 490Hz
pin 12 490Hz
pin 13 490Hz
pin 14 490Hz
pin 15 490Hz
Arduino Mega (ATmega1280 and ATmega2560)
pin 2 490Hz
pin 3 490Hz
pin 4 980Hz
pin 5 490Hz
pin 6 490Hz
pin 7 490Hz
pin 8 490Hz
pin 9 490Hz
pin 10 490Hz
pin 11 490Hz
pin 12 490Hz
pin 13 980Hz
pin 44 490Hz
pin 45 490Hz
pin 46 490Hz
Arduino Leonardo (ATmega32U4)
pin 3 980Hz
pin 5 490Hz
pin 6 490Hz
pin 9 490Hz
pin 10 490Hz
pin 11 980Hz
pin 13 490Hz
BTW, it is possible to change the frequency of the pwm pins. But this will change the behaviour of the Arduino core libraries. The Millis and delay function will not work as they should. Many libraries will stop working, for example the servo library. More info on the Arduino website: http://playground.arduino.cc/Code/PwmFrequency
Thank you!! I will produced an error if i didn’t read it!!
We are interested in static voltage stibilizer for ac 220vby using PWM,IGBT.
Thanks for this info. Now i understand why sg90 servo on atmega32u4 programmed with arduino ui doesnt work. This servo needs 50 Hz, not 490 Hz.