Building a rover

I am planning on building a rover and I have been looking into the Arduino Mega to do the job, after I was reading URL: esawdust.com

( sorry, I cannot post a link )

He is using a ATMega128 AVR ( http://www.esawdust.com/product/dvbd-et-avr-stamp/ )over the Arduino for a few reasons.

"
The ATMega architecture also has builtin timing support and PWM functionality, so it was a natural choice for auto

nomous vehicle control. We could “bit-bang” a PWM wave if we wanted to but that would be a waste of processor cycles since the timing work can be handled by the micro directly in hardware...."

Is this simply just a timer that will send the PWM instead of using the main loop to control it. If someone could explain this a bit more to me, I really want to use the Arduino but if it is going to limit my control of the rover I would like to know what all I need to do to deal with this issue.

Arduino has pwm and timing support (if by timing support you mean being able to get the time since the program started running, then yes it does)

I skimmed his blog, and he had a bunch of things he wanted to do, and he wants to add a bunch of other interfaces, where it may get too awkward without having some extra interfaces.

There is an Arduino servo library which can run ('Bit-bang') 12 servo's on an ordinary Arduino (ATmega168/328). This uses some time running the software. But hey, what is it to do otherwise? That's what it's there for.

An 'standard' Arduino has three independent timers. One 16-bit, and two 8-bit. An Arduino Mega has two 8-bit, and four 16-bit timers, they are similar to the standard Arduino timers.

The 16-bit timer can do very, very precise servo servo pulses (better than 0.01% error) which is way better than the vast majority of servo's. I think this is what esawdust is using.
Or it can do good servo-pulse timing using the 8-bit timers (about 0.5% error, still better than many servos), or okay-ish (crude) across 6 PWM pins. This takes no software time, it is all hardware.

If you don't understand the difference very clearly, then it is probably not worth worrying about, and better to get on doing the experiments to build pieces of your rover.

IMHO, doing experiments with an Arduino rather than a Mega will not waste any time because the programming is almost identical. The Mega has more of the 16-bit timers, with more PWM pins, and more I/O in general.

If you don't have an Arduino, and you are torn between buying it and a Mega, post a description of what you want to do, and we may be able to give better advice.
If you already have an Arduino, I'd suggest doing some work with that first. You may discover that a 'standard' Arduino may be more than enough for the job you have in mind.

HTH
GB

[edit]If the processor is doing nothing, because everything is in peripherals, you maybe bought something more powerful than you need (though, I am a power nut, so I always want more power, even when I don't know what to do with it :))

If you can afford to buy something with too much power, a job may get easier. But it may be better to use the money to buy other parts, like good sensors, good motors, good motor control, radio telemetry, ...

Another thought is, you may get a lot more bang for the buck using DC motors and 'real H-Bridge' motor drive for driving wheels (or tracks), rather than servo's, in which case, precise servo timing may be less important. Or you might want to keep track of where the rover has got to with wheel encoders, to measure distance moved ...

There are a lot of parts to the whole, so don't focus on one to the exclusion of the others.

Summary:

  1. If you have an Arduino, use it.
    The code you write will work on a Mega
  2. If you haven't an Arduino, describe what you want to do,
    it may be neither Arduino or Arduino Mega are ideal
  3. Have fun

[/edit]

A question I have: do you have the rover part of your rover, or do you have an idea of what you will use?

Scale is important here; the bigger the rover, the more you can put on it (to a point). For instance, I am building a "rover" - it is being based on a PowerWheels H2. So far, I know it can haul my fat butt around (200+ lbs), so my choices of what to control it with are nearly unlimited.

Which is why I am using an Intel ATOM motherboard with a PicoPSU running off on-board SLA batteries. I am using an Arduino merely for steering and drive motor control (as well as pass-thru for servo commands to a Pololu MSSC).

If you are planning something smaller, keep in mind power requirements of everything you are planning to use - sometimes, it might be easier to plan everything, build all the component building blocks, find out the power requirements from those experiments, then choose your chassis size based on that.

Depending on your needs and desires, you might find you need more processing power than you have battery to run it; I initially had a plan to use a smaller 2WD truck platform (a cheap New Bright toy truck) that was fairly big, but didn't have the power to allow me to put a full PC on-board (nowadays, though, I could possibly choose a BeagleBoard or similar micro PC mobo) - so I planned on using an RF interface of some sort, do all my coding and testing in that manner, then migrate everything together into the next step which was to be the larger PowerWheels base.

What ended up happening though is I found a colleague who had a spending problem; he went ahead (against my advice) and bought the PowerWheels - after he left the project, I bought everything back (he ended up liking the Arduino, and last I heard he was performing some gardening/growing experiments with it). So, we (and now I) have decided to stick with that larger platform and skip the initial one.

You could do something similar, though - off-load processing power to an external computer connected by xbee, RF, or some other wireless system (unless you are building it for a contest that disallows this). If you need vision processing, use a wireless camera and feed it into the "base" computer with a capture device and process it that way. Other sensors and such can send readings back via the wireless interface. This would allow you to have more processing power available than you have power (or space) on-board; in the future if you move to a larger platform, it can be easy to migrate.

Good luck with your rover!

:slight_smile:

Thanks for the great the input, I have been planning on just starting with a small RC car to get used to working with all the things I plan on putting in place ( IR Sensor, Camera, GPS, etc ) I had also thought of the power wheels idea myself, but I figured it would be less work to start smaller and work my way up. From the sound of it a Arduino Mega will be just fine. If I could avoid using clock cycles on controlling the car I rather do that. I just wanted to make sure the Arduino was also capable of doing this before I bought it.

The biggest problem with a PowerWheels (well, other than needing high-amperage motor drivers, and a custom high-torque servo for steering), is storage - that thing takes up so much room in my shop (which isn't as big as I would wish to have - something the size of Costco would be a nice size).

;D

"Plan to throw one away"
If this is your first rover, then assume it is a learning platform.

IMHO, folks waste enormous amounts of time and money on the 'perfect' solution (I know I suffer from this sometimes), but never get it built because its a moving target. As I learn more, I get more ambitious.
Until one is successfully completed, valuable lessons are unexplored.
After one is built, there is a much richer understanding of the entire rover, the process of making it, debugging it, calibrating it, repairing it, upgrading it.

A college used to say go cheap, go dirty, get there fast. He earned his employer hundreds of millions of dollars/year.

Take it as a challenge to make it as simply, cheaply and quickly as you can.

HTH
GB

I fully agree with you on that cheap is a great way to go :wink: I have a very very limited budget. I have wanted an Arduino for a while just did not have the cash I have come into to enough to get one but just enough for that so I would be very limited as to what I could do right now. Luckly I have a RC car, not a walmart one either so thats what pointed me in that direction in the first place. I checked ebay the other day and found kits like this ( http://cgi.ebay.com/Super-Arduino-Mega-ATmega1280-16AU-AVR-USB-Power-Kits-/280482707739?cmd=ViewItem&pt=LH_DefaultDomain_0&hash=item414e12791b ) for 50 bucks for the Arduino Mega and a kit this seems like a great deal. Is there a reason for this?

back to the topic of the rover now... Will the nano support pwm/timer support I also have a ( http://www.hobbytron.com/SilverLit-X-UFO-RC-Flying-Machine-RTR-with-4-Motors.html ) and well there is a VERY small amount of space on that and weight would be a major issue but it would be fun to try and get that to fly on it's own :slight_smile:

Thank you all for replying and helping me out! There is a great community here and I would love to be apart of it.

50 bucks for the Arduino Mega

seems pretty good to me too.

Luckly I have a RC car ...

they are quite popular for robot drag races.

http://www.hobbytron.com/SilverLit-X-UFO-RC-Flying-Machine-RTR-with-4-Motors.html Very neat.
Have you tried putting small weights, for example quarters, on it to see how much it will lift?

Prices are very variable. Chinese companies are selling clones pretty cheaply:
http://cgi.ebay.co.uk/Arduino-Duemilanove-2009-AVR-ATmega168-20PU-USB-board-1_W0QQitemZ170475032129QQcmdZViewItemQQptZLH_DefaultDomain_3?hash=item27b11a8e41#ht_3374wt_829

These chaps sell Nano-clones at a pretty good price http://cgi.ebay.co.uk/DFRoduino-Nano-Arduino-compatible_W0QQitemZ220592157678QQcmdZViewItemQQptZUK_ToysGames_RadioControlled_JN?hash=item335c5133ee#shId

Will the nano support pwm/timer

I have Nano clones, but a Nano has everything that a standard Arduino does, and two more analog inputs. So a Nano has 6 PWM, 8 Analog, and 6 digital. The two differences are they don't have a DC power socket (but you can put power in through the pins), and the power regulator is a bit smaller than a standard Arduino.

It is a bit more complex to use, but the Pololu Baby Orangutan might also be interesting. It needs a USB to serial converter. But it does have two H-Bridge motor controllers onboard.

HTH
GB