Arduino Uno or Arduino Mega

Hi all,

I am kind of new to the arduino universe but I am quite enthousiast about setting up my first robot. I already have the stuff to create the body and the wheels.

My project : a robot that would be able to interract with its environment : turn in front of an obstacle, make sounds and lights when hearing noise. Stuff like that. Motors (2) should be : Working voltage: 3V ~ 6V Unloads current: ≤200mA @ 6V, ≤150mA @ 3V

Is an arduino uno sufficient or should I buy right now an arduino mega? Do I need another component to power up everything (motor, leds, buzzers)? Do I plug all this to the arduino board or to the breadboard?

If i have the hardware and with some correct coding, could this robot make lights (leds) or am I planning to do something impossible?

Thanks a lot :)

Hi and welcome to this forum.

Being pretty new to Arduino world a robot is already a little challenge. You will be faced with hardware and software issues. But - as you say you are quite enthousiastic about Arduinos - go ahead!

My first remarks to your project: 1. 2 motors might be too less if you want your robot really be responsive. 2 are ok, 4 are better. 2. For your motors you will need motor shields as the Arduino itself is not able to deliver enough power (the current outputs are limited; see this link. 3. You will need at least two collision avoidance sensors (front and rear); this could be either ultrasonics or infrareds)

Do I need another component to power up everything (motor, leds, buzzers)?

Yes: at least motor shield(s); depending on the number and power of leds, you might need a kind of booster (in the easiest approach normal transistor(s) plus base resistor(s) will do); afaik the buzzer doesn't draw that much current, so the Arduino might be powerful enough to drive the buzzer - but look at the datasheet, to make sure you don't stress the Arduino's output.

Is an arduino uno sufficient or should I buy right now an arduino mega?

It depends how many pins you will need, so add all needed I/O and compare how much pins you got left (starting with the UNO; take into account that you can use almost all analogue pins as digital I/Os if the existing purely digital I/Os are not sufficient; if you need more pins -> either the mega or an additionla multiplexer chip for the UNO is needed).

Do I plug all this to the arduino board or to the breadboard?

I assume you are looking for a compact design, so you might go with a suitable motor shield which could be stacked on the UNO or Mega, but it should give you easy access to the remaining/unused pins to hook the sensors, buzzers and LEDs. If you have to go with transistors to power any LED and/or buzzers (maybe later a sound module etc.) than you will also need an external little PCB board to host those boosters.

If i have the hardware and with some correct coding, could this robot make lights (leds) or am I planning to do something impossible?

This is definitely possible with an Arduino platform - if you search with the right keywords you will find a lot of similar projects here in this forum or somewhere in the I-Net world. This will give you some more ideas for your project and you can benefit from others' experiences.

But my last advice: Think BIG, but start SMALL.

That means: Try to set up a master plan with your ideal robot, but then start with some small steps to get to learn how the things in the Arduino world fit together and then, when each single step works, merge them together as a whole project.

id go with a mega. you shouldn’t try to drive the motors directly from the Arduino. get an h-bridge chip such as a 754410 ( or maybe even something ‘heavier’ )and use the arduino for the control signals for said circuit

If you are new to Arduinos don't try to buy all the parts up front as you are likely to change your mind as your knowledge grows.

The Uno has the advantage for beginners that most software and add-ons work with it. The Mega has more of most things and its pin connections are nearly, but not quite identical to an Uno. If you can afford it I would suggest starting with an Uno and leaving the decision to change to a Mega for later.

I would be cautious about buying shields for attaching additional hardware. You may find that they limit your flexibility because the designers' choice of I/O pins may overlap, or they may used specialized pins for general purposes preventing the specialized use for something else.

Under no circumstances should you try to develop this complicated project as a single entity. Learn how to work with all the different parts one at a time and only start "joining" things together when you know how to do each one separately.

You may find some ideas in Planning and Implementing a Program

Have fun.

...R

Thanks to all of you for your advices. Your answers will help me choose carefully the components. And I can add that if I am enthousiat I nonetheless know that this challenge will be quite hard. I have built many pc in the past and am quite able to root an android smartphone and optimize it but the C coding is TOTALLY new to me. So I will order another thing to help me in case of headache : aspirin.

Well thanks again.
I will try to update this thread :slight_smile:

HI, It may help to look through the assembly instructions on other robots to get an idea of the different parts and considerations.

One example HERE:

Hi and thanks, Do you think the ultrasonic module is the better option to make the robot interactive (I mean to make it turn its head to a person that would at a distance of 1m / 3,2ft) ?

Plus another question : is there any problem if I plug a holder with 3x18650 to the board?

EDIT : pls everyone forget this very noob question.

3x18650 is fine, in series and fully charged they will output up to 12.6V, draining down to 11.1 or so. Sparkfun has LiPo/LiIon charge control/monitor/fuel gauge boards you can include in your project to have your sketch keep an eye on the battery pack.

Thanks. Yes the battery monitor is a good idea.

I'd go neither with an Uno nor a Mega when building a robot. Instead I'd use one or more smaller boards (Mini...), and distribute time critical tasks to different boards, if ever required. A Mega adds no processing power, only ports and memory. Eventually also one board can handle 5V peripherals, another one 3.3V peripherals.

For development purposes a Mega is fine, because it comes with multiple serial ports, one of which can be used for debugging. A moving robot has no use for an USB port, there it's only a waste of space and power.

If real estate isn't a problem, spend the extra &5 for a MEGA.

The extra i/o, pwm and hardware serial Ports are always useful.

"The extra i/o, pwm and hardware serial ports are always useful."

Yes even if it's just 1 extra port like on a '1284P board. Use if for another USB port, or RS232, or RS485 (with appropriate buffering).

DrDiettrich:
I’d go neither with an Uno nor a Mega when building a robot. Instead I’d use one or more smaller boards (Mini…), and distribute time critical tasks to different boards, if ever required. A Mega adds no processing power, only ports and memory. Eventually also one board can handle 5V peripherals, another one 3.3V peripherals.

For development purposes a Mega is fine, because it comes with multiple serial ports, one of which can be used for debugging. A moving robot has no use for an USB port, there it’s only a waste of space and power.

Thanks

Hi guys I have a question : is it hard to settle an accelerometer- gyroscope? I ask this because I have read many topics that make me think that it may be too hard for a beginner like me. I have another solution : https://www.pololu.com/product/2508 (a shield which has accelerometer- gyroscope - compass already)

Plus if I want an interractive robot, it is better to use a Camera Module for the head of the robot (like the PixyRobot from Adafruit) and an Ultrasonic Module for the bottom to identify obstacle, am I correct?