Go Down

Topic: Autonomous Car (Read 6148 times) previous topic - next topic

chizzad

Hey guys.  For a school project this year I want to make an autonomous car.  As of right now I am in the very early stages.  I registered here hoping to post my progress along with any questions I have.  I plan on ordering an arduous board (right now I am looking into the uno but I am open to suggestions.)  I also plan on buying three of these sensors ( Ultrasonic Range Finder - Maxbotix LV-EZ1 ) one for front, left and right.  Also I plan on getting the large servo from spark fun.  I am hoping all of this will go in a cheap radio shack car so that it can roam the school halls knowing when it can turn left and right or continue straight.

Considering I have such a long period of time to complete this I plan on starting out same possible copying code others have written so similar type projects and altering it in ways to adapt more to my needs.

I will be checking back here with progress and questions and I am open to any comments or critiques.  

Thanks.

biocow

#1
Oct 01, 2010, 05:00 pm Last Edit: Oct 01, 2010, 05:01 pm by biocow Reason: 1
Sounds like you're on the right track. Good luck!

I'm planning a similar project that I'll start hopefully in early November. But I was planning on using just one distance sensors and mount it on a servo, then have it check left, front, right, front, left, etc..... every half second to a second. Doing this for 2 reasons. 1: it's less expensive and 2: it's more of a challenge.

I look forward to seeing what you come up with.
10 PRINT CHR$(7)
20 GOTO 10

chizzad

That is a pretty smart idea I didn't think about that.  Thanks for the reply though and I hope to see progress from you too.

fkeel

hey. I had similar plans. if you want to check out what I had in mind, follow this link, it might give you some ideas:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1273063240/0

I ended up not building it for lack of time, and currently the project is postponed, as I am really bad at multi tasking ... but yeah, eventually I will get this done as well...

p.
http://embodimentlabs.tumblr.com/
http://paulstrohmeier.info/

zitron

This is my robot from ages ago, with code and stuff:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1173623665/8

chizzad

#5
Nov 24, 2010, 04:49 pm Last Edit: Nov 24, 2010, 04:49 pm by chizzad Reason: 1
hey guys! i haven't been on here in a while but i ran into a little wall. i was wondering if you guys could help me with some test code to run my motor through my h bridge. i used this schematic.  i do not need exact code but any help would be appreciated.

oh and dont mind the gps part. i am not using one.

jada

looks like a l293d ;) well if you set the pin high and low it spins in one direction and low and high it spins in the other direction
Code: [Select]
#define m1p1 8 //motor one pin one
#define m1p2 9 motor one pin two
void setup()
{
 pinMode (m1p1,OUTPUT);
 pinMode (m1p2,OUTPUT);
 }
void loop()
{
 digitalWrite(m1p1,HIGH);
 digitalWrite(m1p2,LOW);
   // drive motors forward set  delay
 delay(10000);
 //now drive motors reverse both
 digitalWrite(m1p1,LOW);
 digitalWrite(m1p2,HIGH);
   delay(10000);

jada

i copied and pasted a part of the code i was currently using  change the pin no to 3 and 4 according to your setup

cr0sh

Quote
I plan on ordering an arduous board


Heh, heh - just noticed this - sometimes it can feel that way...

;D
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

TurboLs1

Not sure how familiar you are with cars, but I would suggest getting a car with drive by wire throttle. If that isnt possible, you can buy a drive by wire throttle body off ebay from like a Chevrolet Silverado or many other cars and adapt it to your vehicle (easiest way is to have someone make an adaptor from aluminum, not hard at all). This way you wont need a servo for the throttle input, you just wire the throttle body input motor to the arduino. Drive by wire cars have multiple throttle position sensors mounted in the throttle body and elsewhere, they monitor these sensors in realtime, and if any of them are more than a few percent different than the others, the ECU will react accordingly (either shut down the throttle input, the engine, or eliminate the non-matching sensor and monitor the remaining operational sensors). The reason I mention this, is that safety is paramount in any object capable of motion, especially when it is capable of high speed and weighs a couple thousand pounds.

Good luck and keep us posted!

zoomkat

#10
Nov 25, 2010, 05:33 pm Last Edit: Nov 25, 2010, 05:33 pm by zoomkat Reason: 1
Quote
This way you wont need a servo for the throttle input, you just wire the throttle body input motor to the arduino.


So what does the arduino output to control the throttle body?
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

dude45342

What would be extremely cool, and difficult to do, is to make the car aware of which room it's in and be able to set a room for it to go to.

Set a default room for it to start in, (and obviously log which position it's in at all times, etc. etc.), have like a few buttons to set its destination room (maybe put all the rooms in some arrays or however you feel like doing it), and have it navigate there. Use its direction to find which way it needs to turn, etc.

Maybe I'm crazy, but it seems like a cool thing if you can make it work. Tons of work, but just imagine a teacher's face when a car comes in with a paper saying "From <Your name>, here's my make-up work from yesterday -- Keep me in a safe place until <Your name> comes and picks me up!".

TurboLs1

Nevermind, I just realized you were talking about an r/c. When I read your post about a car I thought that was what you meant, a car. I recently read about a college project involving controlling cars and was thinking this project was the same idea. Good luck though.

chizzad

thanks everyone, dude45342, that does sound really cool and if everything goes smoothly i will try this.

newbie thanks for the code, you said to change to 3 and 4 for me but why would it be 4 instead of 6 for the motor?

jada

Sorry a small Error
Quote
copied and pasted a part of the code i was currently using  change the pin no [glow]to[/glow] 3 and 4 according to your setup

That to shouldn't have been ther i wanted to say .......
copied and pasted a part of the code i was currently using  change the pin no's 3 and 4 according to your setup

Go Up