Autonomous Vehicle - what components?

Hi,

I'm new, have had experience before more towards a group project of how to build a clock with multiple functions.

I now have this project to do which is to create a autonomous vehicle, I am quite a indecisive person and don't like spending money unless I know what I'm buying.

The issue what components do I buy for this project?
Any links to components would be very helpful as well.

Of course I need an Arduino, but do I go for the Uno or the Mega?
Do I definitely need a motorshield? Budget is kinda tight though I can push it with my own money or is there a cheaper alternative to Arduinos own one?
Ultrasonic Module HC-SR04 Distance Sensor with a servo?
I would like to buy a chasis (with motors and a battery system if you can), 2WD or 4WD? any budget friendly recommendation which would work well?
DO I need a Dual H Bridge?

Thank you guys.
Any additional links to supporting advice or articles which would help me progress later on would be good.

http://diydrones.com for nearly everything related to autonomous vehicles and http://rover.ardupilot.com/ for ground vehicles.

All of your questions depend on your project. First you need to decide what you want it to do.

https://www.sparkfun.com/products/11954 might not be a bad starting place if you don't know.

And yes, you probably want an H-Bridge per motor so you can drive them in both directions.

jremington:
http://diydrones.com for nearly everything related to autonomous vehicles and http://rover.ardupilot.com/ for ground vehicles.

Thanks for the links, but there a bit too complicated..............I am trying to keep it a lot more basic. So a Autonomous robot which is based hopefully on machine learning algorithms, its quite basic such that the vehicle moves around and moves around any obstacles or learns to move around.

mirith:
All of your questions depend on your project. First you need to decide what you want it to do.

SparkFun RedBot Mainboard - ROB-12097 - SparkFun Electronics might not be a bad starting place if you don't know.

And yes, you probably want an H-Bridge per motor so you can drive them in both directions.

Thanks,

As above, basic autonomous robot, tries to avoid travelling into obstacles in front of it, if it does it'll learn to move around next time, if you understand?

I am also from the UK, so getting Sparkfun will be slightly harder for me, prefer to get something within a week or so.

its quite basic such that the vehicle moves around and moves around any obstacles or learns to move around

As you will discover, this is not at all trivial. You can start learning about how to do these things without building a robot at all. There are a number of on-line robot simulators, or programs that you can download and run on your PC or Mac, that emulate a robot in software. You program the robot to go places, turn, avoid obstacles, etc. and watch it perform on the screen. This is much less expensive than replacing damaged parts due a software problems, or the robot falling down the stairs!

I've found MobotSim to be quite useful in thinking about obstacle avoidance algorithms. It includes a number of configurable "sensors" that detect objects. Last time I checked, it was free to use for 30 days: Mobotsoft

I would do this in two phases... forget the learning for now, and just have a front-looking sensor in Phase1.. Perhaps mount it on a servo so it looks from (say) 45 degrees left to 45 right or something, and then it just avoids what it sees. That could be just turn a bit, and if obstacle is still there, well Plan B is back out. Or something. Maybe one on the back so it doesn't back out into something?- but that would be Phase 1a.

There are loads of such robots.

Yes to h-bridges to allow differential steering with forward and backwards. Look at Pololu for what they have, and there's bound to be similar stuff in UK. Steer away ( 8)) from L298 solutions, they eat power and have heatsinks as big as a truck. Pololu has more cunning ones, the whole board being say 3x2 cm.

THEN think of the learning in Phase2... that's a software thing anyway, so get the hardware sorted and zoomin' around the lounge first.

jremington:

its quite basic such that the vehicle moves around and moves around any obstacles or learns to move around

As you will discover, this is not at all trivial. You can start learning about how to do these things without building a robot at all. There are a number of on-line robot simulators, or programs that you can download and run on your PC or Mac, that emulate a robot in software. You program the robot to go places, turn, avoid obstacles, etc. and watch it perform on the screen. This is much less expensive than replacing damaged parts due a software problems, or the robot falling down the stairs!

I've found MobotSim to be quite useful in thinking about obstacle avoidance algorithms. It includes a number of configurable "sensors" that detect objects. Last time I checked, it was free to use for 30 days: Mobotsoft

Yes, thanks, that would be very helpful for trialing any software.
I don't think I'll break it lol It's a university project, it'll be done in a lab on the floor when its up and running and trialing the software. I also hadn't realised I could damage the parts due to software :S

JimboZA:
I would do this in two phases... forget the learning for now, and just have a front-looking sensor in Phase1.. Perhaps mount it on a servo so it looks from (say) 45 degrees left to 45 right or something, and then it just avoids what it sees. That could be just turn a bit, and if obstacle is still there, well Plan B is back out. Or something. Maybe one on the back so it doesn't back out into something?- but that would be Phase 1a.

There are loads of such robots.

Yes to h-bridges to allow differential steering with forward and backwards. Look at Pololu for what they have, and there's bound to be similar stuff in UK. Steer away ( 8)) from L298 solutions, they eat power and have heatsinks as big as a truck. Pololu has more cunning ones, the whole board being say 3x2 cm.

THEN think of the learning in Phase2... that's a software thing anyway, so get the hardware sorted and zoomin' around the lounge first.

I am planning on doing exactly that with a distance sensor, its pretty much what I have found to be a common and to be budget friendly way of detecting obstacles.

I have found it a struggle to find robots similar to what I'm doing, I'm more look into ideas about people making budget friendly concepts with details on the components in particular.

The L298 solutions are pretty much all that I have found so far........I also understand a 4 x AA battery to power the system isn't enough for some people :S

The L298 solutions are pretty much all that I have found so far........I also understand a 4 x AA battery to power the system isn't enough for some people :S

Check the specs for L298s- you'll see they have a voltage drop of (I speak from memory) 2V minimum, rising to 3-4 at higher currents, so if you start with 6 you don't have much left to drive the motors. But they are ok as long as you throw enough volts at them.....

JimboZA:

The L298 solutions are pretty much all that I have found so far........I also understand a 4 x AA battery to power the system isn't enough for some people :S

Check the specs for L298s- you'll see they have a voltage drop of (I speak from memory) 2V minimum, rising to 3-4 at higher currents, so if you start with 6 you don't have much left to drive the motors. But they are ok as long as you throw enough volts at them.....

I was also thinking of kinda getting a cheap robot kit with the essential parts and I just simply add in the arduino, a servo for the sensor and make my own code. And possibly change the power system as well.

Would that be a good idea?
As I am kind of contemplating the idea it would put my mind at ease a bit more.

Yes it would make sense to get a chassis with the motors and wheels. Some have a plastic or metal chassis with lots of holes and slots cut in, so it's easy to attach stuff with small screws and even cable-ties. The holes make it easy to pass wiring around the parts too.

JimboZA:
Yes it would make sense to get a chassis with the motors and wheels. Some have a plastic or metal chassis with lots of holes and slots cut in, so it's easy to attach stuff with small screws and even cable-ties. The holes make it easy to pass wiring around the parts too.

Pretty much all chasis that I have found have that all.
I was talking about that they contain everything, on top of what the chasis includes which is the distance sensor, motor drive board, pp3 connectors, etc its simply missing a arduino and batteries.

Like this for example:
http://www.ebay.co.uk/itm/Arduino-Based-Avoidance-Robot-Car-Complete-Kit-Just-An-Arduino-not-Included-/221256858664?pt=UK_Computing_Other_Computing_Networking&hash=item3383efbc28

Or
http://www.amazon.co.uk/SainSmart-Mega2560-Platform-Ultrasonic-Duemilanove/dp/B00AJGM3E6/ref=sr_1_25?s=computers&ie=UTF8&qid=1389720172&sr=1-25&keywords=SainSmart

Hell yeah, if you have budget, go for that. The intelligence part is the difficult bit, so making it easy on yourself from the building pov makes good sense to me.

JimboZA:
Hell yeah, if you have budget, go for that. The intelligence part is the difficult bit, so making it easy on yourself from the building pov makes good sense to me.

I'm just slighly wary, as its my university project and I hope to add in some additional features later on.
Hopefully theres another user who may have bought such kits with a review hopefully.

The Pololu Zumo and 3Pi are very popular and expandable. The engineers provide excellent product support through the user forum, too. Pololu - Robot Kits

Iqbal007:
I'm new, have had experience before more towards a group project of how to build a clock with multiple functions.

I now have this project to do which is to create a autonomous vehicle, I am quite a indecisive person and don't like spending money unless I know what I'm buying.

Well, nothing wrong with planning something before spending the money - in fact, that's probably a good way to go (or at least understand what you're getting into so you know approximately what you'll end up spending).

Iqbal007:
Of course I need an Arduino, but do I go for the Uno or the Mega?

You mention that you want to do machine learning in a separate post; machine learning of any type typically requires more than a bit of memory, but to an extent it can be done with an Uno. Better would be to consider a (slightly) larger robot, using an Uno for lower-level motor and servo control, and sensor reading - and then add another computer - either on-board or off-board (wireless) to do the machine learning portion (that's the thing about robots - their brain doesn't need to be with the body - it can exist anywhere).

If you opt for on-board, a small laptop (or netbook) - or an old Mini-ITX motherboard can be made to work (provided you have the battery power for it); a better solution (for a smaller robot) would be to use a Raspberry Pi (or similar). It could communicate with the Arduino via USB (perhaps using something like Bitlash - http://bitlash.net/); basically you could make a "hierarchical" control system - where the Arduino controls and reports as-needed, while the command computer (Raspberry Pi or such) acts as the "intelligence".

You could certainly try to do everything using a Mega or similar, though (or go with a Mega ADK and make software for an Android device to control it?).

Iqbal007:
Do I definitely need a motorshield? Budget is kinda tight though I can push it with my own money or is there a cheaper alternative to Arduinos own one?

I don't know - that would depend on what platform you decide to go with for the chassis of your robot. If you wanted to be "real cheap" - you could do something like this guy did:

http://blog.davidsingleton.org/nnrccar/

As you can see - he used an Arduino to actuate the R/C controls, and carried an Android phone on the car to relay back the "road" it was seeing to the control computer. All the (image) processing basically happens on the main computer, along with the machine-learning portion (a neural network in this case). The output of that sends commands to the Arduino board that actuates the remote-control of the R/C car. Little modification of anything is needed, and the entire system replicates a machine (albeit in a smaller, more controlled environment) as a vehicle made in the 1980s or so that was the size of a very large truck.

Also - you don't indicate what you know exactly about machine learning - if your knowledge of the subject isn't great or you want a refresher, I recommend looking into the following two courses:

https://www.coursera.org/course/ml (this class is the same class as the guy above used - we were only about 2/3'rds through it when he built that project, btw!)

https://www.udacity.com/course/cs373 (this was a fun course - if you want to understand the basics behind Google's self-driving car, this course is where you can start!)

I took both courses (well - I took the Coursera one when it was originally offered thru Stanford as an experiment in MOOCs - so, I was part of that inaugural class - but it's the same class; extremely well done). For both, you need to make sure you have a good grasp of linear algebra and probability/statistics - that, or cram, cram, cram (the option I had to take - I hadn't touched that stuff since high-school over 20 years back).

Iqbal007:
Ultrasonic Module HC-SR04 Distance Sensor with a servo?

This may be your cheapest solution for a sensor - but it won't be a very accurate one - but certainly enough to get started with. Alternatives would be using a phone camera (or wifi camera) like the example above to transmit back to a larger computer system. Another possibility (if you are using an on-board Raspberry Pi and Uno combo) would be to hook up a camera to the Pi (which can handle the larger amount of data). You might also use a Nootropics Design Video Experimenter board coupled to an Uno - which then communicates with a Mega or Pi (or something else) to get video that way (more complex, and probably more expensive, and lower resolution, and will likely only allow you to use the Uno for that function alone, as it uses a bunch of memory just for the TVOut framebuffer - but it is an interesting possibility). You could try using a CMU camera module. If your budget allows, you could tear apart a Neato robotic vacuum cleaner for the LIDAR sensor.

Iqbal007:
I would like to buy a chasis (with motors and a battery system if you can), 2WD or 4WD? any budget friendly recommendation which would work well?
DO I need a Dual H Bridge?

The answer to these questions will ultimately depend on your budget and the size of the robot you intend to build. I mean - the above example of the self-driving car used a cheap R/C car and some parts had on-hand; likely the whole thing cost well under $100.00 even if you bought everything brand-new (and you already had an Android phone). But - he didn't put the Arduino or anything else, other than the phone - on the R/C car itself, so it didn't have to be very large.

You could purchase a small platform fairly cheaply - but it may not be able to hold much more than a motor driver board and the Arduino, plus a few sensors. It will also likely be limited to running on a smooth surface like tile flooring or a desktop. These limitation may be an ok compromise for your needs, though. Without knowing your budget, it is difficult to say.

I would love to point you to example platforms - but there really are a ton of options available, ranging in price to "costs very little" to "government budget".

One example closer to the latter would be the Dagu Wild Thumper 6WD chassis and control board; this system (which you would still need to buy additional components for - like batteries, charger, R/C radio system, servos, etc) will set you back several hundred dollars USD. But it is an all-in-one kit; the control board has all the on-board motor drivers meant for the motors in the chassis, and it is based on the ATMega328 (IIRC) and can be programmed using the Arduino IDE.

Something a little less expensive would be a 2WD or 4WD ready-to-run (RTR) hobbyist R/C truck chassis; something by Losi or Traxxas, around the 1/10 scale - would be perfect and fairly easy to work with (btw - if you intend to use hobbyist R/C for control - make sure you check out the code base for the Dagu Wild Thumper board - the code samples are all there for taking the PPM signal from the R/C controller, and translating it into actions for the motors - a great example to learn from).

You might also go an purchase a cheap 2WD (or 4WD or a tank - if you get lucky) toy R/C car chassis from a thrift store - then mod it up, like discussed in this thread:

http://forum.arduino.cc/index.php/topic,86883.0.html

Other low-cost options would be the Magician chassis (desktop rover), Gordon McComb's ArdBot (http://www.robotoid.com/servomag/) - another desktop rover, or maybe a hacked up Tamiya bulldozer kit (http://www.tamiyausa.com/product/item.php?product-id=70104)?

(to be continued...)

(...continued from earlier...)

Iqbal007:
Any additional links to supporting advice or articles which would help me progress later on would be good.

For literature on all of this - be sure to check out Gordon McComb's books:

Note that the last one is the 4th edition - if you have the means, I -strongly- suggest purchasing all of the previous editions; they are all well worth it (as the newer editions came out, older stuff was dropped from the pages - but that older information can be a goldmine).

Other worthy books would include:

Now - finally - I am going to let you on to a little, slightly unknown "secret" - way back in the 1970s and 1980s, there was a guy experimenting and investigating a form of machine learning that we now call "subsumption architechture" - he was basically doing this alone, in his home, before Rodney Brookes.

His name is David L. Heiserman. Here is a link (to my website) which includes a set of six links for his books on the subject of what he termed "Machine/Robot Intelligence", along with an interview with him:

http://www.phoenixgarage.org/show_article/12

As you can see, his work culminated in a commercial robot being produced, the RB5-X (RB5X Robot); this robot is no longer manufactured, but if you check out that site, you can get an idea of how it was made (perhaps you could use it for inspiration?).

When he was building his robots, his source of computing power was necessarily limited - in effect, it was much less than what you could get from an Uno. In one of this books (the one on Rodney - which became the RB5-X), the book details the step-by-step building of an 8-bit computer to control the robot; yep - back in those days, you either spent a ton of money on an single-board computer (SBC) like the Kim-1, or you built it yourself - and probably still spent a ton of money. You couldn't just go out and buy a cheap Arduino.

In theory - you could take his algorithms on "Machine Intelligence" and translate them over to an Arduino and control your own robot with them. I've long had the idea to do this myself (I've been a fan of Heiserman since I was a young boy, over 30 years ago). Since the hardware back then was much less than what you have available today, it should be easily doable...

A good international site is http://www.seeedstudio.com/depot/ for parts. They have free shipping, but it takes a while (It starts with the Chinese post office). They also have a few robot chassis. Additionally the parts for Sparkfun's RedBot are a good starting place.

And you probably do want some form of H-Bridge, either as a module or as an individual chip. Look on Farnell's website and dig around see if you can find something. You can also build it yourself using 2 N-Type and 2 P-Type FETs or BJTs (Or IGBTs) each. Just make sure you can handle enough voltage and current (Both instantaneous and steady state) +50% to 100% margin. I'd give a lot more margin to the MOSFETs as they tend to be temperamental about that kind of thing.