Programmer building a 4x4 platform - possible? ( Help appreciated )

Good afternoon to all,

I am 15+ years experienced programmer and finally i decided to program some autonomic 4 wheels car.
Arduino is the choice as from what i have seen, it is highly customizable and has great community.

Here is what i would like my car to do:

  • at least medium size ( to drive on the grass and some small bumps )
  • drive per waypoint ( have GPS unit )
  • send / receive telemetry data ( wireless XBEE up to 1km ? )
  • have small camera onboard ( images to be sent via telemetry )
  • have few servos ( pan, tilt, ... )
  • have 4 wheels ( 4 motors ? )
  • have enough power to perform some simple image detection (like follow the color, ... )
  • have a possibility to be extended with additional sensors ( light sensor, distance sensors, the more space for extensions it has - the better it is )
  • have a 6 dof unit ( for later experiments (it can be separate gyros, but might be one small 6dof board ) )

Now this is all 'wow i really want to build it' - but it's not 'wow' when i sit on the page and think 'what to order'.

I am not an electrician and that's the main problem, if someone could point me the right direction - what to order,
piece by piece - i would be very thankful for any help..

I hope somebody can shed a little bit light on this for me - as i am totally lost when it comes to ordering...
Thank you for any input into this.

Well considering your lack of experiance on the hardware side of things (the electrical part :wink: ) I would suggest that you are not really at the point to buy all the stuff at once and start building and coding such a 'mega' project. Better to order the individual parts one at a time and write simple sketches to utilize the component until you have mastered how to intergrate that component both electrically and software wise. So maybe buy a couple of servos first and master them. Then buy a motor and motor driver and master PWM speed and turning control. Later obtain a pair of wireless modules and develop and test the protocol method you will need.

Only then are you really ready to try and intergrate all the peices required for your project. You will have a better understanding of their electrical requirements needed to figure out how you are going to power the whole thing. You will also have an idea of how many input and output pins you will require as you might end up needing I/O pin expanders, or your project might even require more then one arduino processor.

So, start simple and learn a lot as you go. That will save you mucho dollars and time in the long run.

Lefty

pees:

  • at least medium size ( to drive on the grass and some small bumps )
  • have 4 wheels ( 4 motors ? )

When you say "4x4" - do you mean 4 wheel drive, or 4 wheels? Do you intend to do differential (skid) steering, or Ackerman-style?

Would there be a particular reason to have four motors? Why not two? Or even one?

It doesn't sound like you have much experience on anything but perhaps the "software" end of things (and I have no proof of that, either - only your admission of being an "experienced programmer" - which doesn't tell me much); certainly it seems you lack experience on the mechanical end of things.

First, follow retrolefty's advice - it will help you avoid many pitfalls, and thus becoming overwhelmed by the size of the project as you are learning.

If you don't have mechanical design experience (or the tools and materials), then your best bet/solution would be to go with an off-the-shelf platform to base your robot on; there are a number of small and medium sized robot base platforms out there (some targeted for the Arduino - but most for whatever platform you care to use), and a few that are four-wheel drive. Note that many of these platforms, though, can be pretty expensive (on the lower end of things are platforms from DFRobot, on the higher end, platforms from Lynxmotion and/or CrustCrawler, for example).

Something to consider for platform choice of this nature - since the Arduino has easy access to control servos (or, use a servo controller like from Pololu or such), is a hobby R/C vehicle; if you can afford it, a larger scale Traxxas 4x4 can make a nice platform (there's a video out there of a guy who made a 6-wheel drive platform using Traxxas parts). There are other manufacturers as well, but the basic idea is that since they use standard R/C controls, they're very easy to interface with the Arduino.

Another option (though it might be difficult to find a 4-wheel drive option) would be to go to a thrift store (such as Goodwill) and pick up an old toy R/C vehicle, and hack it. I'm always finding cheap medium-sized 2WD R/C trucks from companies like "New Bright Toys" (and other cheap Chinese brands) at such places. Most of the times, these vehicles have a solid chassis and I "test feel" the drive and steering system to make sure they're in probable good order. Typically they are missing the battery and the controller, but who cares? At my local Goodwill, they typically sell for about $5.00 USD, which is a bargain. These toys have more than enough power to tackle grass and the outdoors. Just take the body off, hack the on-board driver circuitry (or strip it out and add your own), and you're all set.

Lastly - if you want a bigger challenge - hack a bigger toy: Find a cheap, used PowerWheels (or similar) kid's ride-on toy; these can be picked up (usually) for $200.00 or less, and can easily carry over 200 pounds of weight. You'll have to add/figure out how to control the steering (a little mechanical challenge - my advice would be to use a geared 1/4 scale servo from ServoCity, or a 12 volt linear actuator), plus the motor driver for the motor(s) will be a lot beefier (you need something to handle about 30 amps or so for the drive motors), but you'll get one heck of a platform, if you have the storage space (I'm slowly building something like this - storage is an issue to consider if you go this route).

:slight_smile:

  • send / receive telemetry data ( wireless XBEE up to 1km ? )
  • have small camera onboard ( images to be sent via telemetry )
  • have enough power to perform some simple image detection (like follow the color, ... )

These two requirements don't fit the Arduino (or the XBee, for that matter).

Excuse me replying to everyone instead of doing a per-person reply, but i think this would be more clear.

Here are few things that i would like to point out before doing any shopping :slight_smile:

You say i should go with 'per part' ordering - buy one thing, master, buy another - this is great idea but i don't want to spend money on something that later on won't be used - i just don't know what to buy - and would like not to buy two arduino boards - but start with the most powerful and work on it with other boards.

It would be really great if someone would point me what exactly should i buy so after i master the devices i can use them in the project - instead of throwing them away and order other boards.

The thing is that i would really like to know which board units will 'fit' the requirements, so i can buy today 1 in few weeks another part, then when I'll get the 'hearth' of the car working i can 'connect them together' into one 'brain' of the car.

PaulS - you said that image recognition / image sending don't go with arduino, what exactly do you mean? Can you explain please..?

What i meant by saying 4x4 - is a 4 wheels car ( i was unclear, i am sorry ).
I will probably buy a 'ready to ride' bigger size R/C car and put an arduino 'brain' on top of it - but i really need those camera/gps/telemetry components to work with arduino..

Thanks guys - hope you can help me out with the shopping..

It would be really great if someone would point me what exactly should i buy so after i master the devices i can use them in the project - instead of throwing them away and order other boards.

There is little chance that anyone around here could perform that task for you. Only you can do that with proper research on what is avalible and what your specific requirements are. Determining exactly what parts you are going to need is not a trivial part of the overall project. I'm just of the opinion that you are being a little too impatient, one really needs to learn to walk before running. A wise man once said the journey is the reward.
Once again, can I get you to at least consider starting projects of a smaller scale and nature and then build from there?

Lefty

retrolefty - you might be right saying that, but at least it would be nice to hear which of those required components will work with arduino ...

I'll take into consideration that this can be too hard for a beginner like me, and choose the other path to teach something.

  1. I would like to order Arduino Mega 2560 with XBEES, GPS and a CAMERA - this will allow me to learn how to connect this, and try my luck with coding.
  2. Next - after i teach myself to read from the devices and finish telemetry protocol i would like to place that all onto a ready-to-go platform from r/c car - but this is different story.

So what i really need now is -

  1. Arduino Mega 2560 ( i have chosen this one as it seems to have plenty of 'room' for future extensions )
  2. Pair of XBEES
  3. GPS
  4. Camera

And of course a small help from you guys, how to connect this - so i can focus on developing the code.

Instead of running and buying all the things I'll do as you guys suggested ( thanks for that ) - i will learn - but i need to order few parts to learn.

Is it possible to connect those 4 things to Arduino Mega 2560?

I think #4, the camera may very well be impossible for an arduino. What kind of interface would the camera use to wire to an arduino?

Lefty

The best way to handle the camera requirements is to use the Arduino as an interface controller, connected up to a some other computer to handle the processing. This computer can be on-board or external via some wireless means. If on-board, you could use a stripped down 802.11b/g/n router, then interface one or more IP cameras to the router; command control would come from a remote PC with custom control software.

Alternatively, this on-board computer could be something like a BeagleBoard or a MiniITX (or smaller) PC, running some kind of stack for control (in my system, it will be a LAMP stack, with the webserver on-board - no off-board processing or interface required). In this case, you could still use an IP camera - or you could use a USB camera (cheaper).

Machine vision software can be completely homebrew (not reccommended, unless you are really wanting to learn how to do it yourself - note, entire multi-volume books have been written on the subject - be prepared for an education), or you can use an existing interfacing package. On the open source front, there's OpenCV (http://opencv.willowgarage.com/wiki/); on the closed source front (for Windows) there's RoboRealm (http://www.roborealm.com/). These aren't the only options, but they both are among the most popular.

Something to think about out of the gate (before you even build your robot) is how to implement safety shutdown in an emergency (this is especially needed if your machine is large, heavy, fast, or some combo of all three). This is just like critical system software development: Design the security in at a low level, because it is really difficult to patch in (and get working correctly) after everything else is in place. No - this part isn't fun, but neither are property damage or injury. Think about how you will gain control of the robot (or shut it down) should a steering linkage fail, for instance.

When you are testing your control routine, test the system in stages, and test with the wheels off the ground (especially when testing speed/direction control and steering).

Finally - on the topic of a four-wheel car: If you're wanting something powerful yet fairly inexpensive (though you'll have to work out your own method of steering), a 6 volt PowerWheels ride-on toy can be a good option. These can be found used on Craigslist, Ebay, and at thrift stores and yard sales for around $25.00-50.00 USD (depending on condition).

You'll have to think about your platform choice and design carefully; I had originally planned to use a New Bright Toys Raminator platform (large 2WD monster truck), but due to a variety of reasons things quickly shifted to a PowerWheels H2 ride-on, not the least of which was that I didn't feel I could put the battery power needed for running a mini-ITX based LAMP stack, with hard drives, the camera, servos for pan/tilt, LIDAR, the motors, Arduino, etc - the platform was too small for any good run time. The PowerWheels, though, can easily carry 200 lbs - all that stuff is a pittance, and a couple of extra 12 volt SLAs won't make a big weight difference.

retrolefty,
does that mean there is no camera at all for arduino ? nothing like a rs232 camera or any other?
I would be happy having even a 320x240 camera onboard..

BTW let's start from GPS:

  • which one should i choose / how can i connect it to mega 2560?

I think it would be easier for all of us if we go with piece by piece here, instead of thinking about 'all pieces at once'.

pees:
retrolefty,
does that mean there is no camera at all for arduino ? nothing like a rs232 camera or any other?
I would be happy having even a 320x240 camera onboard..

Some potential options, if you absolutely must have image processing on-board and you don't like the idea of including an on-board PC or low-power SBC:

http://www.jrobot.net/Projects/AVRcam.html
http://cmucam.org/

I have no idea what the AVRcam costs (the shopping page doesn't work on that site) - but I do know that the CMU cam is fairly pricey.

Note that the specs for the AVRcam seems to indicate that you could potentially implement it using an ATMega328 (it uses an ATMega8).

One other potential option:

I would be happy having even a 320x240 camera onboard.

Suppose that the camera is black and white. Only one bit per pixel is required. 320 columns by 240 rows is 76,800 pixels or 9600 bytes of data. Even a Mega has only 8K of SRAM. Where are you going to store 9.6K of data.

A color camera is completely, unequivocally out of the question.

PaulS:

I would be happy having even a 320x240 camera onboard.

Suppose that the camera is black and white. Only one bit per pixel is required. 320 columns by 240 rows is 76,800 pixels or 9600 bytes of data. Even a Mega has only 8K of SRAM. Where are you going to store 9.6K of data.

A color camera is completely, unequivocally out of the question.

While I agree that a full-color (or even b/w) image is impossible @ 320x240 - if the OP is willing to drop the resolution by quite a lot, like the AVRcam does - color blob tracking becomes possible, with the proper camera sensor interfaced, of course. Heck - the AVRcam (ATMega8) source code is available (GPL) - so it probably wouldn't take too much to get it working on an ATMega328...