Difference between revisions of "Self-Guided RC Car AI"

From Hive13 Wiki
Jump to navigation Jump to search
(Fleshing out page for new Self-Guided RC Car 2 project)
m (Controller)
Line 21: Line 21:
 
=== Controller ===
 
=== Controller ===
  
In all honesty I've been procrastinating with this project waiting to find a spare couple dollars to buy an [[Arduino]] to control it with, but earlier today my girlfriend somehow lead me to remember that quote "'''You go to war with the army you have'''," so I'm not waiting anymore (we were actually talking about this very project if you can believe it).  I just happen to have a [http://www.rabbit.com/products/bl1800/ Z-World JackRabbit] laying around, and I even know where the programming cable is.   
+
In all honesty I've been procrastinating with this project waiting to find a spare couple dollars to buy an [[Arduino]] to control it with, but the girlfriend somehow lead me to remember that quote "'''You go to war with the army you have'''," so I'm not waiting anymore (we were actually talking about this very project if you can believe it).  I just happen to have a [http://www.rabbit.com/products/bl1800/ Z-World JackRabbit] laying around, and I even know where the programming cable is.   
  
  
Line 27: Line 27:
 
* No pulseIn() function.  This means I'll need to do the timing for my accelerometer readings  the hard way.
 
* No pulseIn() function.  This means I'll need to do the timing for my accelerometer readings  the hard way.
 
* The headers are difficult to work with and I only have one (1) ribbon cable for I/O.  Not really a big deal, except of course that the digital I/O and the ADC pins are on seperate headers (did I say "of course" ?).
 
* The headers are difficult to work with and I only have one (1) ribbon cable for I/O.  Not really a big deal, except of course that the digital I/O and the ADC pins are on seperate headers (did I say "of course" ?).
 
  
 
=== H-Bridge ===
 
=== H-Bridge ===

Revision as of 11:12, 11 September 2009

This is the wiki page for the Self-Guided RC car that TP is working on.

SGRC2 Early Forward.jpg

Overview

Background

This project is a continuation of my Self-Guided RC Car project, but enough [has changed / is changing] that I felt it deserved a new page.


The Vehicle

"Standard issue cheap piece of junk from Radio Shack."


The car had two simple DC motors. Rear drive motor has High/Low gear box; steering assembly is spring-loaded to return to center when steering motor is not powered.


Control

Controller

In all honesty I've been procrastinating with this project waiting to find a spare couple dollars to buy an Arduino to control it with, but the girlfriend somehow lead me to remember that quote "You go to war with the army you have," so I'm not waiting anymore (we were actually talking about this very project if you can believe it). I just happen to have a Z-World JackRabbit laying around, and I even know where the programming cable is.


The biggest disadvantages the JackRabbit has against the Arduino I can see are:

  • No pulseIn() function. This means I'll need to do the timing for my accelerometer readings the hard way.
  • The headers are difficult to work with and I only have one (1) ribbon cable for I/O. Not really a big deal, except of course that the digital I/O and the ADC pins are on seperate headers (did I say "of course" ?).

H-Bridge

Each motor is controlled by a transistor H-bridge, which allows a logic signal from a controller or something to turn the motor in either direction. I had meant to use power MOSFETs, but the nearest surplus electronics store was out of the parts I wanted so I ended up with BJT Darlingtons.

Chuck's Robotics Notebook has a nice tutorial on this kind of H-bridge, and my bridges are exactly as shown on his page except for the different transistor parts (I'm using TIP30 for the PNP's and 2N6387 for the NPN's). Since I'm now going to be using a controller I actually care about, my complete lack of motivation to use opto-coupling has waned considerably.


Sensors

Obstacle Avoidance

I am switching from two fixed IR sensors to a single sensor mounted on a hobby aircraft servo. I got a box of these servos from Hobby King super cheap (under $4 a piece?!), but the shipping costs from HONG KONG kinda necessitate a large order to really be worth it. Since I won't be able to use the ADC pin of my controller without a second ribbon cable, I'll still be using the op-amp comparators from the old project, but in a slightly different way. Before I had one (1) trigger level on two (2) sensors - now I'll have two (2) trigger levels on one (1) sensor, so I can distiguish between Close(11), Medium(01), and Far(00).

Learning Feedback

With the goal of creating an AI decision-making routine, the car is going to need a source of pain. A 2-axis accelerometer (pulsed output... argh) I bought years ago will providing this crucial learning element. No Pain No Gain


Decision Making

"Probably the only thing making this project unique in any sort of way is that at this point I'm not using a microcontroller." - Quote from old Self-Guided RC Car project.


Oh well. Trying to make it AI is my attempt to keep some unique-ness. At this point I only know that I'll be using a Back-Propagation Neural Network with an accelerometer providing the error signal. The car's general happiness will be determined by:

  • Moving - Very Happy
  • Not Moving - Uncomfortable
  • Suddenly Changing from Moving to Not Moving - Severe Pain


I can't help but think of the super-happy little flying robot following Ford around in the Hitchhiker's Guide. Don't panic if you're not familiar with this classic series of novels, but you really should leave your house this very moment and go buy a copy right now - and NO, just seeing the movie doesn't count. While the movie was a great tribute that I proudly own a (legal) copy of, you really do have to read the books to fully appreciate the genius of Douglas Adams (may he rest in peace).


Current Status - Active

  • Project breadboarding underway. Still wiring.


Log

Sept 10, 2009

Created new project page.

Mounted IR sensor to servo and then servo to vehicle.

Made reference to HitchHiker's Guide in wiki page.

Began re-wiring H-Bridges, but got wrapped up in updating this wiki page and only got one bridge done. I felt it was important to take a shot showing the difference between the two:

SGRC2 Bridge Diff.jpg
(New bridge on left)

The black lead on the new bridge enables it to be used with a PWM signal (active low), although I'll most probably tie the enable on the steering bridge to ground since PWM is completely worthless with that motor.


Current Issues

  • Tendency to spend too much time updating wiki pages.
  • Project refuses to wire itself.