Arduino / Multiple Maestro's

Hi,

Probably a stupid question but impossible to answer via google.

Can I connect multiple Maestro’s to my Arduino Mega?

I want to control several robotic arms that are each connected to a Maestro. Then I would like to control all those Maestro’s with one Arduino. Is it possible? Logically i think it is since you create SoftwareSerial objects to attach a Meastro to 2 pins on the Arduino to receive and transmit. So assume I can create several SoftwareSerial objects right? The amount of Maestro’s that I can connect will depend on the amount of pins available right? Or is there a work around?
The reason I ask is that each robot will have its own sequence of movements to follow but all of them will react to the one and the same sensor.

I see you can daisy chain these Maestro’s as well, but I find it very difficult to understand the documentation (sorry total newbie to the Maestro) and not the most advanced Arduino’er. I usually just need an image or Fritzing diagram to understand the connections, but can’t find one for the daisy chaining…

Any help or advice would be really helpful! Just want to make sure about everything before I start buying stuff.

Thanks
Nelmarie

Hello, Nelmarie.

Yes, it should be fine to connect multiple Maestros to your Arduino Mega.

Yes, you can use the SoftwareSerial library to create serial communication on other digital pins of your Arduino Mega to each of the Maestros and control them. You should look at the SoftwareSerial page for a list of the library’s limitations, which states that not all pins on the Arduino Mega support change interrupts and only one software serial port can receive data at a time (when declaring multiple software serial ports).

There are two simplified wiring diagrams shown under the “Daisy Chaining” section of the Maestro’s user’s guide. If you are chaining multiple Maestros with a special input pin labeled TXIN (which is only available on the Mini Maestro 12, 18, and 24), then you should follow the second wiring diagram with the caption “Daisy chaining serial devices that have a TXIN input”. Otherwise, you should follow the first wiring diagram, “Daisy chaining serial devices using the Polou protocol. An optional AND gate is used to join multiple TX lines”. All your Maestros, which are slave devices, should have their serial mode set to UART. The TX pin on your Mega should be connected to all the Maestros’ RX pins. Then, starting with the last board in the chain, you should have that Maestro’s TX pin connected to the TXIN pin of the next Maestro in the chain and so forth. Your Mega’s RX pin should be connected to the TX pin on the first Maestro. Please note that along with these connections, all of the boards will need to share a common ground.

Considering you are new to using the Maestro, I recommend controlling one Maestro from your Arduino Mega before adding others to the chain. Also, if you have not already done so, you might consider using our Pololu Maestro library for the Arduino, which can be found under the “Arduino library” section of the user’s guide.

- Amanda

Thank you so much for your excellent reply Amanda!

I did see the Arduino Library and will test this out today! I might be back here in case there is something I don’t understand but hopefully in following your advise this will work!

Best
Nelmarie