Number of servos you can use?

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Post Reply
Message
Author
Mikemike
Posts: 41
Joined: Thu Feb 11, 2021 11:33 pm

Number of servos you can use?

#1 Post by Mikemike »

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.
1.PNG
.

Thanks,

Mikemike

User avatar
Ralph
Posts: 7880
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Number of servos you can use?

#2 Post by Ralph »

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.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Number of servos you can use?

#3 Post by jph »

Mikemike wrote: Fri Feb 26, 2021 6:25 pm I'm familiar with the PWM pins as listed on the hardware ID page for the MEGA2560. But I'm curious,
I don't understand the asterisk remarks.
Thanks,
Mikemike
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.

Mikemike
Posts: 41
Joined: Thu Feb 11, 2021 11:33 pm

Re: Number of servos you can use?

#4 Post by Mikemike »

Ralph wrote: Fri Feb 26, 2021 9:21 pm 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.
Thanks!

Mikemike
Posts: 41
Joined: Thu Feb 11, 2021 11:33 pm

Re: Number of servos you can use?

#5 Post by Mikemike »

jph wrote: Sat Feb 27, 2021 10:35 am
Mikemike wrote: Fri Feb 26, 2021 6:25 pm I'm familiar with the PWM pins as listed on the hardware ID page for the MEGA2560. But I'm curious,
I don't understand the asterisk remarks.
Thanks,
Mikemike
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
Yes, that does make sense. Thank you

Post Reply