I'm familiar with the PWM pins as listed on the hardware ID page for the MEGA2560. But I'm curious,
How many servos can you actually use? It looks like I can only hook up 4 of these little cheap SG90 servos total. Because it doesn't work on the other 5 PWM pins. I don't understand the asterisk remarks. I guess you'd need plenty of Arduinos handy for a panel full of instrument servos. .
Thanks,
Mikemike
Number of servos you can use?
Re: Number of servos you can use?
As many as there are PWM pins, so 12. But note that you'll need a good external power supply. You cannot run 12 servos through the Arduino, it'll go up in smoke.
Re: Number of servos you can use?
Hi Mike, For any form of PWM output, then the pins with the asterix must be on the same frequency as the pins (without asterix) as quoted in the remarks column.
In my understanding, all this means is setting up the frequency of the PWM on the non asterix PWM output and using them first, then the other asterix pins can be used but must share the same pwm frequency. For example - 50hz for a servo .... So, all 12 pins are available providing you follow the guidance on the PWM frequency settings. ie: you cant use an asterix'ed pin without setting the non aterix'ed pin first. The PWM frequency you set the non asterix'ed pin to has to then be used for the asterix'ed pins in that group.
Does that make sense ?
AND, definitely as Ralph says, you MUST use an external power supply for the servo power.
Joe
Joe. CISSP, MSc.
Re: Number of servos you can use?
Yes, that does make sense. Thank youjph wrote: ↑Sat Feb 27, 2021 10:35 amHi Mike, For any form of PWM output, then the pins with the asterix must be on the same frequency as the pins (without asterix) as quoted in the remarks column.
In my understanding, all this means is setting up the frequency of the PWM on the non asterix PWM output and using them first, then the other asterix pins can be used but must share the same pwm frequency. For example - 50hz for a servo .... So, all 12 pins are available providing you follow the guidance on the PWM frequency settings. ie: you cant use an asterix'ed pin without setting the non aterix'ed pin first. The PWM frequency you set the non asterix'ed pin to has to then be used for the asterix'ed pins in that group.
Does that make sense ?
AND, definitely as Ralph says, you MUST use an external power supply for the servo power.
Joe