Go Down

Topic: Mega 2560 servo pins & Fio AREF (Read 1 time) previous topic - next topic

magnethead794

1. What pins are for each timer, to use servos? I'll be putting between 15 and 20 servos on one 2560.

2. To do battery sensing of a 7.4 2S LiPo pack on a FIO, would I just use the analogReference(INTERNAL) and a 25K/10K voltage divider?
KF5RVR

DuaneB

Hi
Servos can go on any pin if you are using the servo library, or try this trick to put all of them on one pin -

http://rcarduino.blogspot.com/2012/08/arduino-serial-servos.html

Duane B

rcarduino.blogspot.com
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

magnethead794

#2
Sep 01, 2012, 09:18 am Last Edit: Sep 01, 2012, 09:24 am by magnethead794 Reason: 1

Hi
Servos can go on any pin if you are using the servo library, or try this trick to put all of them on one pin -

http://rcarduino.blogspot.com/2012/08/arduino-serial-servos.html

Duane B

rcarduino.blogspot.com


Well it says 48 servos...the mega has 53 digital and 16 analog..which pins go to which timers?

Going to have only 2 or 4 servos themselves. The other 13-15 will be motors running on ESC's....and not just little ones. The robot will be running on 2 optima yellow tops if that says anything. If there's room, might fit 4 of the buggers and ignore the 80 pound penalty. 4 motors would be nice but there's only so much room, and only so much you gain in a pull-pull situation.
KF5RVR

DuaneB

Again - Any Pins, it has nothing to do with timers.

In the background, the servo library is using a timer to tell it when to toggle the servo pins, the actual toggling is done in software and is not connected to timer pins in anyway whatsoever, so just choose which pins you want - any of them - and crack on.

There is a simplified overview of what the library does to manage a servo on any pin here -

http://rcarduino.blogspot.com/2012/01/can-i-control-more-than-x-servos-with.html

Duane B

rcarduino.blogspot.com


Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

codlink

Here is a spreadsheet that states what pins are on what timers. https://spreadsheets.google.com/pub?key=rtHw_R6eVL140KS9_G8GPkA&gid=0
//LiNK

Go Up