I am not an rocketscientist...
I am a sculpter, so please be easy on me
I am creating a animatroc-mask and i have the mechanic all i need is to hook up the servos and i need at least 14.
So i would like to know what stuff i need to controll 14 servos ?
(excuse my worst english i am Austrian)
You can do it all on an Arduino using the servo or SoftPWM library or just buy a servo controller from Pololu or Parallax, or build two of these Eleccelerator
The analog pins on an ATmega328P/ATmega168 Arduino mapped to digital 14 and beyond, so pin number shouldn't be a problem
I thought there was a software PWM library, I guess not, I was wondering why you said PPM, then I realized that there's no such thing as SoftPWM yet... Hmm...
The ATmega328P has 3 timers, that means 6 compare match interrupts, which also means 6 really accurate servos
If you manipulate the compare match registers during the interrupts themselves (staging one interrupt right after another), you can in theory control probably 50-60 less accurate servo signals (less accurate due to latency in the interrupt code).
I got 60 from 60 = 6 interrupts * 20 milliseconds / 2 milliseconds
Err, I'm not that familiar with what libraries are out there right now, it's not in the libraries folder on my computer at least.
Apparently staging one interrupt after another is how the official Servo library works, go figure... It should do 14 servos just fine, so go for that
EDIT:
Apparently it only uses compare match A but not B, you might have trouble using 14 servos... You can duplicate it and change it so it uses compare match B as well though
12? 12 * 2000 microseconds = 24 milliseconds, that's over 20, and what if all servos were pulsed for 2500 microseconds? that's 30 milliseconds. I thought servos are specified as using a 20 millisecond maximum period, and they time out if no pulse is received. I know I'm talking about a worst case scenario, and I'd expect an apparent loss of torque and/or speed if I tried pulsing 12 servos for 2500 microseconds, it seems wrong to say the maximum is 12.
You can always just buy a dedicated servo controller from Pololu or Parallax, those things can have features like sequencing and speed control, it might be useful for animatronics.
There's probably a tiny microcontroller running a PID loop inside the servo, it will stop driving the motor if you don't pulse it at regular intervals. These are pretty basic characteristics of anything using standard RC servo PWM signals, and it's also a fail-safe feature just in case radio signal is lost.
the thing with the computer interface is its to unhandy
i need to make it compact like an xbox 360 controller but thnx.
the mega was my guess to but what about the powersource (a batteriecase when mounted in the mask but when plugged via usb do i need a extra powersource)
the mega lists 54 digital ports can i hook up 54 servos to that?
in total i need 12 servos and 10 controll levers (no rotary control switches) and 1 joystick (total of 24 ports can i doo that just on one Mega, i guess so)
i am not much into the matter now cause first i need to buy it to test it and understand via tutorials, nad i guess with asking,
so first of all i need to know what board i should buy.
You connect your Arduino to it, not a computer, so it fits into your small xbox controller sized box. It will be easier this way, $28 is the price of about 3 servos anyways so it's a worthy investment
If you really want to write your own servo controller code for the Arduino, go for it
I guess i need the mega because it gots enought digital ports
than a simle programing to stear a servo with a lever (apply it for each port / connect my 10 servos to the 10 lever controller and 2 servos to the joystick wich basically is a pair of two rotary control switches and tata its alife)
i guess thats it but it sounds to simple ^^
ps. if i need more power to pull the eyebeows for example can i hook up 2 servos to one port and make them run simultaneously
I guess i need the mega because it gots enought digital ports
than a simle programing to stear a servo with a lever (apply it for each port / connect my 10 servos to the 10 lever controller and 2 servos to the joystick wich basically is a pair of two rotary control switches and tata its alife)
i guess thats it but it sounds to simple ^^
ps. if i need more power to pull the eyebeows for example can i hook up 2 servos to one port and make them run simultaneously
You could use a standard Arduino, plus a servo controller (or two) from a place like Pololu:
This one will control up to 18 servos (and, if it is like other Pololu products, can be daisy chained to control more if needed); you send it simple commands via TTL serial (or other methods - even USB!), and it moves the servos to the proper positions. It has external power input for the servos as well. They also sell a slightly cheaper version that is partially unassembled.