Should I use TWO arduinos?

Hi,
I am making a rather large project autonomous robot with a lot of sensors and voice control. I am thinking about using a separate Arduino in the head of the robot but I read that it's better to use just one.

The head has 6 LED matrix for eyes and mouth, 2 motion sensors, 2 microphones, a camera for face detection and a small IR lidar for distance. The head can turn 180 degrees.

I am using a MEGA in the main body to control movement motors, arms, hands, edge detection, another set of ultrasonic and IR range detectors, 3 collision switches, motor encoders, a bunch of NeoPixel LEDs, a laser pointer, more motors and servo for a special device. A small LCD AND the MOVI voice control module.

So in the head I could use a second Arduino to handle looking and listening and moving the head and then report back to the MEGA with current head position and range detection.

I am worried about the MEGA getting bogged down and the code getting really complicated with the LED matrix, motion and sound detection, etc..

I've never done a project close to this big before so I'm not sure how the MEGA will handle everything.

Should I do 2 Arduinos? A MEGA and UNO with serial communication? Or am I better off just with the MEGA?

The code will be complicated.

If you have enough I/O pins, then try it and see if the performance indicates that a second Arduino is required.

Using a second Arduino requires you to design and implement communications and a control protocol, making the code even more complicated and prone to failure.

What have gotten to work, so far?

1 Like

I answered your question before I opened the thread, and my answer does not change.

No, you should not use two Arduinos. Until it is demonstrated to be impossible, try using one.

Even when you prove it to have become impossible to proceed with one board, check back here with your state of progress and your careful justification for using a second. It may be that the impossible is just the name for something you haven't figured out, or seen, yet.

a7

1 Like

Yeah, that's basically what I've been doing. I have just the bottom of the robot with a few sensors and a compass, having it drive around randomly while playing with the code. Meanwhile the head is running on the UNO and the body has been tested but so far it's just a few motors for the arms and hands so not much to do yet.

I have the base with wheels and some sensors running around the kitchen. The arms and hands move but the body has been set aside for now. The head can turn 180 and is held down with a magnetic gear so I can pull it off and put it back on. I used a modified robotface example from Adafruit LED matrix to get the eyes blinking and the mouth moving when there is an obstacle in front of it (testing the lidar).

Oh, it's built with a Radio Shack "Robie Sr" (omnibot hearoid) as the body.

Good beginning! BUT! Remember that ultrasonic stuff is blocking, counting time until the echo is received.
Can you make or have made a list of movements and any other things that must be done simultaneously with some other movement/function? That does not include stuff that only appears to be done at the same time.

I am using the ultrasound to look right and left only to help plan which direction to turn if the front facing IR detectors run into anything. I plan to have them alternate and only ping once every few steps through the loop. If one is tracking an obstacle (like a wall) the other won't do anything.

I'm not trying to make this super mobile. I plan to have it go as slow as the PWM will allow and not really move too much. Unless I can get it to track a signal (thinking like a radio beacon someone can hold or put in their pocket) But I don't want a remote control. It's gotta do it's own thing.

The edge detectors work great. i put it on a large cardboard box and had it randomly trying to drive different directions but it never fell off.

I currently have a 5 foot tall Halloween robot that hands out candy. It's built on an old Robomower base lawnmower that mowed my lawn for about 12 years. The body is a fancy plastic trash can and the head is a 2 gallon bucket. I originally made it about 15 years ago and added to it each year. It has the obligatory blinky lights, spinny stuff, robot arms (wall-e toy arms) and randomly says robotty things. Last year I finally got the candy dispenser figured out and built that on an arduino. This year I changed the old 12 circuit relay control box with remote into arduino controlled with some automatic movements and using a 3rd arduino as the remote. I didn't want to mess with the arduino I put in for candy last year so I left that as a stand alone.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.