I am building a model railroad and am looking for or help for a sketch to control multiple servos, each servo will be controlled by an input to control direction and have a permanent throw as in turnout distance. This distance is not very large maybe 15 or 20 degrees. I am incorporating a PLC to drive most of the layout but using arduino for some control. If I can get most of the servos on say 2 of these boards I can have better cable layout. Also using arduino for a turntable
Thanks in advance
Do you really need a PCA9685 Board? An Arduino can control multiple servos without any external board. You could also have a look at my MobaTools library, which was originally written with the model railroader in mind. It can move servos slowly, which is an advantage when driving turnouts with a servo.
Nice! I've built one too.
What things do You want to move?
Using several controllers makes no problem as long as they don't need to communicate. That increases the level of difficulties.
An Arduino UNO or Nano can control up to 12 servos each using the Servo library. If you need an input pin for each you can probably get up to 9 per board because the UNO and Nano only have 20 I/O pins.
The PCA9685 can control up to 16 servos each and you can have more than one one each Arduino.
The Arduino MEGA 2560 can control up to 48 servos with the Servo library.
Just want to move turnouts, I have the boards and want to use them
Fine. Then controlling the speed gives a beatiful action, not the bang style. Back reading the first post again..
Poke around in the IDE example folder. There are surely some useful examples for servo. I'm fiidddling with the phone for the moment so no IDE available here.
Is there a chance to convert the manual to english? I like what I see but will need some examples to using for servo (sketch), you can tell I am rather new to this arduino but willing to learn
Thanks
There should be an english version of the manual. Examples are different. Some are commented in english, some in german or both.
The examples Servo_01.ino and Servo_sweep.ino are commented in english.