Different types of motors on the same arduino?

So I am still learning Arduino but I've already built quite a few robots. I'm stepping things up a notch by building a robot with several motors. I am using 9g servos, stepper motors, standard servos, and regular dc motors with l293d ic. I am also using 2 ultrasonic distance sensors. There will be 14 motors in all but I think Arduino Uno can only handle 12? I will be using an Arduino Mega, so will that be ok? I also want to know if you can put all these different motor types on the same Arduino and if it is possible, would writing a code be really complex?

iceng3 months ago

Compared to all the equipment the robot needs to operate, the cost of a second Arduino is negligible.. Use the second uP to run a group of motors under direction of the primary Arduino and make up your own easy to decode serial commands to issue motion on the slave Arduino, like ; A1= motor-A-fwd-run , A0=motor-A-stop

and B2=motor-B-rev-run

or D27=servo-D-position-@-position-27`

also handy R14=status-motor14

and RR=status-motors running

You get the idea then the Primary Arduino is not tasked with time consuming details !

seandogue iceng3 months ago


no matter the embedded platform, once one has gone beyond the simple, using satellite controllers makes sense. It helps to isolate electronics, and it helps to organize management from a central governor.

rickharris iceng3 months ago


It's one of th things I really like about the Picaxe system (besided easy programming) they actually do an 8 pin chip that is quite powerful and cheap so you can easily build distribute systems - I2I support on them as well.