Controlling 300 small micro servos? - Page 1
Forum section: electronics / beginners

author: eevfan007
author_rank: Contributor
timestamp: February 16, 2017, 07:44:22 pm
content: Any advice on wiring/multiplexing solutions to be able to control 300 small micro servo motors?I only need to control one at a time, but the wiring it self is potentially a mess.What would be the best solution here? Any advice would be greatly appreciated.

author: Richard Crowley
author_rank: Super Contributor
timestamp: February 16, 2017, 07:52:05 pm
content: Are you asking for suggestions for interface boards (the components that actually create the servo PWM signals)?Or are you asking for suggestions about connectors, wire, cable management, power management, etc?What is the source of the servo positions? Arduino? Some other kind of microcontroller?There are several Arduino interface boards that will handle multiple servo outputs.Are these servos all together, or are they distributed across a large area?Do you need a central source of 300 servo signals?Or do you need 3 sources of 100 signals? Or 30 sources of 10 signals? Or 10 sources of 30 signals?Does your application allow creation of a custom interface board to fit your particular configuration?Or are you constrained to use off-the-shelf commercial interface boards?

author: Richard Crowley
author_rank: Super Contributor
timestamp: February 16, 2017, 07:57:55 pm
content: There are commercial solutions like these (and likely many other similar)...16-Channel Servo Motor Controller / PWM Servo Driver Board"This is a i2c-controlled PWM driver board with a built-in clock? which is quite different from TLC5940 series. You don’t need to continuously send signals and occupy your MCU."http://www.scale-n.nl/ScaleN_Naslag_Arduino_16_Channel_Servo_Motor_Controller.aspx32-Channel Servo Controller Board V2https://www.elechouse.com/elechouse/index.php?main_page=product_info&cPath=100_146&products_id=188332-Channel Servo Controller for Arduino (Works with Official Arduino Boards)http://www.dx.com/p/arduino-compatible-32-channel-servo-controller-red-white-145907#.WKYFZW8rJhE

author: danadak
author_rank: Super Contributor
timestamp: February 17, 2017, 12:01:35 pm
content: Some questions -1) Worst case latency time you can tolerate to any one servo ?2) Max distance from processor to servo ?3) Do you have to control servo position in a continuous mannerof just tell it to go to a specific position and hold ?4) Is system a life support design ? With need for redundancy ?5) What is preferred signaling, serial buss, wireless, LAN network....?6) Servo power from the network, eg. share communications and powerover interface ?Regards, Dana.

author: james_s
author_rank: Super Contributor
timestamp: February 17, 2017, 08:27:09 pm
content: I think I would be inclined to use one or more large CPLDs, the actual logic will be relatively simple but you'll need loads of IO pins.

author: ebastler
author_rank: Super Contributor
timestamp: February 18, 2017, 04:39:27 pm
content: Quote from: eevfan007 on February 16, 2017, 07:44:22 pmI don't think anyone has addressed this part of your question yet. In principle, this would lend itself nicely to an matrix address approach, with the servo's PWM inputs connected to e.g. 8 column address lines and 9 row address lines.But I don't know how typical servo motors behave if they do not receive PWM pulses at all: Do they stay at their current position (which would be required for this approach to work), or do they interpret this as "go to minimum position"? Could someone in the know please comment?As a side note, this sounds like an intriguing project! Would you mind telling us what you want to build? Art project? Active telescope mirror control?

author: fcb
author_rank: Super Contributor
timestamp: February 18, 2017, 05:03:05 pm
content: Without more information on your application and what can and can't be tolerated I would do it like this:Serial control data from PC/device is fed into a bunch of TTL buffers (one output could feed a dozen or so micros).The output from a buffer feeds an I/O pin on a low cost microcontrollers (PIC10/12 size).Each microcontroller has a simple UART (hardware or software, doesn't matter really).Each microcontroller generates a the suitable 50Hz variable duty-cycle for the servo, and also controls power to the servo via a P-MOSFET (my favourite is the DMG2305).You probably want a way of setting the address on the micro - mikeselectricstuff describes various ways to do this. Personally, i'd probably add a 2-3mm pad next to each microcontroller connected to a spare I/O (pull-up enabled) - and use something like "short pad to gnd to set address to next message address".You could also use a slightly bigger micro and get it to drive 4-16 servos., you could then hardcode in the address.

author: james_s
author_rank: Super Contributor
timestamp: February 18, 2017, 08:27:50 pm
content: But you could do this with a pair of CPLDs or a single FPGA rather than having a whole pile of microcontrollers and TTL chips. Something like the Xilinx XCR3256XL would probably work well, 164 I/O pins in a 208 pin package, there are cheaper options that are in a BGA package instead. If BGA is ok then an FPGA such as the Lattice LCMXO3LF-4300C-5BG400C is under $12 each in single quantity and has 335 I/O pins. The thing I love about working with CPLD/FPGAs is that nearly any pin can be assigned any function so you can do the hardware design very easily and then just assign the pins as needed in the constraints file. Anything with enough I/O is going to have more than enough logic capacity to do anything you could possibly need here. Pair it with a single small microcontroller to interface with whatever is controlling the servos and you're pretty much set. These things are fantastic for highly parallel applications, and controlling 300 individual servos is just such an application.

author: Richard Crowley
author_rank: Super Contributor
timestamp: February 19, 2017, 02:13:46 am
content: Quote from: ebastler on February 18, 2017, 04:39:27 pmActually, it was addressed in my suggestion for the independent 16-channel board:"You don’t need to continuously send signals and occupy your MCU."QuoteIf you want the servo to hold position, it must receive a continuous PWM control stream. That is why that first board claims the feature that it can hold position without continuous input from the controller.

author: james_s
author_rank: Super Contributor
timestamp: February 19, 2017, 02:18:23 am
content: Most of the servos I have kind of go limp with no signal, it just acts like they're not powered. Sometimes they can act unpredictably and twitch around a bit but for the most part it's just like shutting them off.

author: Richard Crowley
author_rank: Super Contributor
timestamp: February 19, 2017, 04:42:11 am
content: This may be of some interest to @eevfan007 (who has never returned to the thread he started).https://youtu.be/A6qNxnRPD3o?t=2m30s

author: mikerj
author_rank: Super Contributor
timestamp: February 19, 2017, 05:47:30 pm
content: Quote from: ebastler on February 18, 2017, 04:39:27 pmAll the RC servos I have used stay put with no PWM present, but they don't have any holding torque i.e. the output arm could be moved with relatively little force.