Autonomous 1:10 car

My aim for these holidays (ending at the start of March) is to automate a remote control car.

It's got an electric motor, battery, servo, reciever, and ESC (electronic speed control). I'm hoping to be able to replace the reciever with my mbed (and some electronics & sensors)


Parts so far:

Microcontrollers:

Display:

  • Winstar WH1602A LCD module ($20)

Sensors:

  • Accelerometer - Crodnet KXPS5 - 3 axis over i2c ($~50? I bought it a while ago)
  • Distance - 3x Devantech SRF-2 Ultrasonic Range Finder ($20.95 each)
  • Soon to come: Direction - Devantech CMPS03 Magnetic Compass ($49.50)

Other:

  • 12 button Keypad ($9)
  • 4wd HSP racing R/C car ($349)
  • Breadboards + jumpers ($60)

Wireless:

  • 1x KBee Module 1mW Wire Antenna ($28.50) (Need to buy another)

Total so far: $~850

Parts


The plan:

  • 3x distance sensors to avoid objects & map environment
  • accelerometer to detect rolls/collisions
  • compass to assist with tracking position
  • display to show debugging information
  • keypad for changing settings/modes on the fly
  • wireless module and usb i/o card for
    • recieving/sending data
    • and controlling via laptop

The Logic:

Keep heading in a straight line (using compass) until distance sensors show objects ahead. Slow down as objects get closer. Turn towards the furthest object (prefer turning towards last found object, if car is past it). Map out a rough 2d array of the terrain. Display on laptop.

Stop if out of range of wireless signal.

Slow right down if accelerometer registers sudden acceleration in any direction (either hit something or fallen), or sudden direction change in compass direction (collision/sliding - rough terrain). Try turning one direction, see if compass shows change. Continue if it does, stop and display warning if it doesn't.


Future additions:

  • Auditory feedback - siren or speaker with prerecorded sounds ("I have fallen over!", "You're in my way, move!", etc)
  • GPS - for position tracking in large areas (park across the road, etc).
  • Camera - for avoiding objects, remote navigation

Current progress:

  • Control steering servo (Demo)
  • Read keypad (See above demo)
  • Read accelerometer (Demo)
  • Print to display (See above demo)
  • Read from a distance sensor (Demo)
  • Read from multiple distance sensors at once (See above demo)
  • Control motor - forwards & reverse (smoothly and steadily) & braking (Demo with camera outside in a week)
  • Gear down car - start slow & carefully (no slower gears or boxes available - use PWM instead)
  • Mount sensors & electronics on car (see photos below)

Currently working on:

  • Write basic program to control motion

Soon to come:

  • Buy IR sensors, distance & proximity
  • Buy compass
  • Read from compass
  • Add compass navigation into program (as per logic section above)
  • Investigate storage of data onto SD card or similar - build up map of environment & store
  • Keypad button input to alter program in runtime

Fancy wireless stuff: (for later)

  • Buy 2nd wireless module
  • Connect laptop via USB to i/o board & wireless module
  • Write program (VB / C / C++ ?) to control i/o board & wireless module

Photos:

With the shell:

With cover

Bare:

Bare

Mounted electronics:

Front - ultrasonic sensors:

Top view:


Trials:

Basic forwards/backwards & steering

Problems

Motor

  • Movement is jerky and inconsistent at low speeds.
  • Full speed is too fast for inside. Try park? Waterproof electronics
  • Neutral at 0.5. Forwards threshold is at around 0.53. Backwards is at around 0.43. Scale neutral down so forwards is more accurate?
  • Smooth acceleration?

Steering

  • Steering servo whines when held still - issue?
  • Steering limits not at 0 and 1, but around 0.75 and 0.25. Test exactly.

Sensors

  • Ultrasonic sensors jumpy and unreliable at close range. Additional distance sensors required.
  • Won't detect objects < ~20cms. Proximity switch/beam required
  • Range sensors individually or use same beam?
  • Mounting centre sensor off centre a problem?
  • Sensor behind for reversing?

Solutions

  • Buy 3 IR distance sensors - no interference with existing sensors, 2 for front, 1 for behind.
  • Try mounting sensors on servos & pan for more accurate object avoidance
  • Store data of environment so won't repeat mistakes


4 comments

08 Dec 2009

Love the fact that this is tagged with 'awesome'!

09 Dec 2009

nice to see you haven't started with anything too ambitious ;-)

So the hardware will take a day.. but I don't envy you the software.

How about leaving the RC receiver on the car.. and passing the instructions from the receiver through the mbed.

mbed could either modify, or completely ignore the instructions and issue its own. i.e. make your RC car still RC,.. but it has automatic object avoidance.

Or.. it PWM's the motor to 90% at all times. but when you wiggle the wheels 5 times..it lets it have the full banana's.

or goes into crazy mode, which reverses the steering..

I suppose I'm saying you could make your car fly by wire ! I did it with scalextric recently.. was easier than you might think, as you are just letting the mbed into an already existing circuit.

Then you you can add stuff to your fly by wire as you go.. implementing a fully automatic mode when you have everything fitted.

 

 

09 Dec 2009

Dan - Me too :)

David - I was hoping to achieve something similar, but by using the KBee and the laptop instead of the 2 axis transmitter/reciever (with poor range and a dodgy throttle)

Thanks for the input guys!

09 Dec 2009

it looks like im not the only one doing this project then..... im doing pritty much the exact same thing for my undergrad degree project. got mine moving, detecting objects and turning out the way but as for now it will keep going untill it gets stuck or runs out of batt.

i would like to see how you get on.

 

You need to log in to post a comment