So I'm building my first Arduino robot, and here's a list of parts I've compiled. Is this everything I need to program and use the motors and other components?
Arduino Uno USB Microcontroller (http://www.robotshop.com/arduino-uno-microcontroller-2.html)
ATmega328 with Arduino Uno Bootloader (http://www.robotshop.com/sfe-atmega328-with-arduino-bootloader-4.html)
Brushed DC Motor 2 (http://www.robotshop.com/solarbotics-regular-motor-2.html)
Sharp GP2Y0A21YK0F IR Range Sensor - 10cm to 80cm (http://www.robotshop.com/sharp-gp2y0a21yk0f-ir-range-sensor-2.html)
Lynxmotion SIRC-01 Sharp GP2 IR Sensor Cable - 8" (http://www.robotshop.com/lynxmotion-sirc-04-cable-1.html)
170 Tie Point Mini Self-Adhesive Solderless Breadboard (http://www.robotshop.com/sfe-mini-170-solderless-breadboard.html)
Arduino ProtoShield Kit (http://www.robotshop.com/sfe-arduino-protoshield-kit-4.html)
Looks like an interesting collection.
What's it all going to mount on to?
What will the motors drive?
What is the power source?
What will secure it in place?
How will it all connect together?
Am sure you find you need many little bits to tie it all together as you proceed.
What's it all going to mount on to?
It's going to be mounted on some aluminum that I'll cut, weld, and make places to mount the components and wheels.
What will the motors drive?
The motors will actually move the robot.
What is the power source?
Just a battery. How would you suggest hooking that up?
What will secure it in place?
Most likely screws
How will it all connect together?
Screws
Don't forget you need an infallible method of encoding the Three Laws into the positronic brain.
Why are you buying an arduino UNO and a seperate Atmega 328? This is only necessary if you plan on using the Atmega chip without the arduino, but then you will need some extra components.
You will also need a driver for the motors, as the arduino cannot source nearly enough current to power them on its own.
Also make sure you are considering proper gearing and wheels for the motors.
Best of luck!
For some reason I thought it didn't come with the Atmega328. Apparently it does.
Would this work for a motor driver? http://www.robotshop.com/pololu-dual-dc-motor-driver-1a-4-5v-3-5v-tb6612fng-2.html
RobotEsach:
Would this work for a motor driver? http://www.robotshop.com/pololu-dual-dc-motor-driver-1a-4-5v-3-5v-tb6612fng-2.html
Your motor driver can put out 1A of current. Your motors have a stall current of 5A.
I think if you dig around on Pololu's site (pololu.com) you'll find a clearer selection of motors and drivers.
You are also going to need to need a gearbox for each motor or some other way to trade some of that speed for torque like belts or your robot won't go anywhere.
growler:
You are also going to need to need a gearbox for each motor or some other way to trade some of that speed for torque like belts or your robot won't go anywhere.
Would this work?
http://www.robotshop.com/tamiya-double-gearbox-70168.html
Chagrin:
Your motor driver can put out 1A of current. Your motors have a stall current of 5A.I think if you dig around on Pololu's site (pololu.com) you'll find a clearer selection of motors and drivers.
What does 1A mean? (I guess I'm asking what the measurement A is.) Also, could someone suggest to me what motor driver to use?
That gearbox will work just fine and it comes with two motors, so you could cross those off of you list above if you get that.
A is the symbol for Amperes, or as you are likely to here amps and is the measure of current flow.
If you are confused about that I would strongly suggest doing some more learning about electricity before you begin wiring things up or you are likely either get poor (and extremely frustrating) results or even damage the parts you are working with. I'm not trying to discourage you from building a robot as it is a fun hobby, just suggesting you spend way more time in the design phase than seems necessary and make sure you know how everything SHOULD work before plugging things together.
Otherwise I fear you will find that you didn't spend enough time designing and you have various components that don't work that well together.
All that said to be actually helpful, check this out, Pololu - Low-Voltage Dual Serial Motor Controller + Tamiya Double Gearbox Combo
Okay, thank you for that information. I completely understand what you're saying.
So back to the subject of components. For the gearbox I posted a link to above, do I need a driver for that?
Yes, if you want dc motors on your robot you will need some kind of driver circuitry to power them, and more importantly give the arduino a way to control the power being for speed control and direction control.
I did link to a motor driver being sold with that exact gearbox from another site. Did you check that out?
And by the way, what is your robot supposed to be able to do? That will help in answering questions about what you are likely to need.
The robot is just supposed to be able to drive around and detect if it's going to hit something.
So I'm assuming I just need one of these? http://www.robotshop.com/pololu-low-voltage-serial-controller.html
That will certainly work with the gearbox and motors.
I suggest you think about the power requirements of the motors and the arduino and what kind of battery life you would find adequate. Then, based on your projected power consumption pick the battery.
growler:
That will certainly work with the gearbox and motors.I suggest you think about the power requirements of the motors and the arduino and what kind of battery life you would find adequate. Then, based on your projected power consumption pick the battery.
Probably a 9V?
A nine volt is not a good choice. Those motors each draw about half an amp while running with larger spikes on starting up. Add in you other stuff and you battery will last a maybe, ten minutes? At that point the battery voltage will likely go below the 7 volts you need to run through the voltage regulator on the arduino to get 5 volts for that.
I'm sorry to keep asking so many simple questions (for you). I'm an absolute beginner at this, and I'm not that educated on electronics. So what kind of battery is typically used in rover-like robots?
I'm sorry if this seems difficult, but then its not a simple question for others to answer without a little bit more from you since many of the sub-questions involved can only really be answered by you.
I'm not sure what is typically used, I use rechargeable AA nimh cells, but that is what I have around.
If you want this to come out well you are going to need to do some research and some arithmetic. I can lay down the process I would go through for something like this.
First ask, what do I want my robot to do? You want yours to be able to wander without running into obstacles directly in front of it. Then I would try to break it down to sub-problems, the above goal seems to have two in my mind, movement and obstacle detection.
OK, then how fast should it be able to move? For how long? These are questions that you can answer. Then pick motors and gears based on that and projected weight of the finished bot. Since this is going to be your first robot you probably don't have any firm requirements for speed which makes it easy to pick a motor, those motors with that gearbox should be fine.
How will it detect obstacles? Great, you've picked a method with the ir sensor.
So now you battery will have to provide power for the motors, the arduino, the sensor and any other leds or whatever you want to add for style points. In general your motors are going to be by far the biggest current draw so I would mainly worry about that.
Pololu has a datasheet for the motors in the gearbox, http://www.pololu.com/file/download/fa_130ra.pdf?file_id=0J11, which tells us that the motors have a stall current of 2.1 A and draw .56 A at max efficiency. So I'd want to allow for both motors running at the same time with some load, and plan to avoid stall conditions and look for a battery that can provide at least about 1.5 A continuous and I would like to be able to run it for, say half an hour (another question only you can answer).
When looking at batteries there are a few important numbers, the voltage obviously, the mAh, and its current capacity. Now the 9V (nominal value, actual value likely to vary between ~10 and ~6 or lower depending on how discharged it is) is a bad choice for several reasons
#1. You have nothing that wants 9V, you will have to regulate this down to 5V for the arduino and the sensor, and those motors only want 3V (you can run them higher, but they will burn out faster and you probably don't need the speed). This leaves the voltage regulator on your arduino dissipating power for no reason, wasted power is bad. I'm not exactly sure how you planned on getting the motors involved, but it wouldn't work well, if at all.
#2. A 9V is generally going to be rated ~550 mAh, or to put it another way it can provide 550 milliamps for 1 hour, or 5.5 milliamps for 100 hours (not quite true but we will get to that). So if you have two motors running at .6 A or so under some load, ignoring the other electronics you need ~1.2 A, all the time. So if you just go by the rating you should get about half an hour of charge out of a 9V.
#3. The more current you try to pull out of a battery continuously, the fewer effective mAh you will get out of a battery. First, I would be surprised if a 9V could actually put out that kind of current (its off of energizer's charts for example), and even if it could that would reduce you battery life even further.
#4. The final reason is that batteries voltage level changes over the charge cycle and 9V manufacturers assume you are going to keep using the battery until the voltage drops to about 5V. The problem is that the voltage regulator on the arduino requires an input voltage of about 7V to operate correctly, so there goes a third of the useful discharge cycle for arduino operation.
If you have read this far, you can see a few things. 9Vs suck and were invented as a dirty trick for newbies to electronics (9V = MORE POWER WEEEEEEE!!!!), if you want a robot that works you have to be willing to do some homework or buy a kit, and that I have way too much time on my hands to type all this up.
As suggestions, use AA's as they are much better at providing more current for longer, they are cheap and you can get rechargeable ones easily. Everything above should help illustrate why you should plan plan plan before you build build build. How disappointed would you be if you got it all together and then found the thing ate through batteries at the rate of 5-6 an hour with sub-par performance due to inadequate power?
I hope this has been mildly helpful and will help to encourage you to look at things a little more closely, otherwise my fear that you won't end up with a robot that performs as expected remains. Or get a kit, there is nothing wrong with that and it is a great way to start out.
Thank you so much for the help. I have one final question. Do you have to have a specific type of plug to hook up batteries to the Arduino? What is the best way to connect (a) AA batterie(s).
What is the best way to connect (a) AA batterie(s).
Properly.