Author Topic: Need help building a robot car  (Read 1789 times)

0 Members and 1 Guest are viewing this topic.

Offline rahulpwnsTopic starter

  • Jr. Member
  • **
  • Posts: 28
  • Helpful? 0
Need help building a robot car
« on: September 08, 2011, 08:01:15 PM »
hey guys,
i am new to robotics (this will be my first real robot) and i am planning on building a robot car.
i do not want to spend more than $200 on this project.
basically, this robot will be a 4 wheeled car that will be able to detect cars in front of it and change lanes and overtake that car.
it will operate on it's own ans will start to work as soon as i turn it on.
i would also like the robot to be able to turn left and right. i would also like it to be able to accelerate to different speeds.
i will be running parallel processes (the car will have multiple commands to complete at the same time).
what is the best micro controller for this project (i will want it to be able to control 3 servo motors, and 5 infrared sensors.)?
what are some good wheels that i can use for this project (i am looking for something under $3 per wheel, but would like them to be rubber)?
thanks,

Rahul

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Need help building a robot car
« Reply #1 on: September 09, 2011, 01:09:00 AM »
i am new to robotics (this will be my first real robot) and i am planning on building a robot car.
I hope You are talking about the toy car and NOT the real one  ;D

basically, this robot will be a 4 wheeled car that will be able to detect cars in front of it and change lanes and overtake that car.
For detection I believe You need combination of IR Sensors and Ultrasonic ones. For lane changing You need modified line following circuit (set up) and distinctive lines on the road (path of your car).

i would also like the robot to be able to turn left and right.
For that You need car steering system as found in real life cars as differential steering would likely not suite Your needs.

i would also like it to be able to accelerate to different speeds.
Shaft encoder circuit (set up) will allow You to know and control speed of Your car.

i will be running parallel processes (the car will have multiple commands to complete at the same time).
You need multiple uC to run processes in parallel. You might need one master uC and few slave uCs. Or different microcontrollers taking care of different data/areas if synchronization is not required. However I believe that one uC will do the job as they are quites fast and can handle events in series so fast that it looks parallel for analog world.

what are some good wheels that i can use for this project (i am looking for something under $3 per wheel, but would like them to be rubber)?
Why don't you gen an RC car, hack it, change internals with Your own circuit and sensors. That way You already have body, wheels and chassis. In many cases it might be cheaper than assembling car body from the scratch.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline rahulpwnsTopic starter

  • Jr. Member
  • **
  • Posts: 28
  • Helpful? 0
Re: Need help building a robot car
« Reply #2 on: September 09, 2011, 11:08:54 PM »
haha... it will be a toy car.
thank you for the advice.
how would i hack the rc car to be a robot? (explain in simple terms, this will be my first robot)
what is a good uC for this project? (you said that i would only need one)
also, can you explain how a uC works... how many processes can they generally run at the same time (for example, i would like it to be able to change speed, turn, and do other tasks at the same time)? (simple terms please!)
thank you soooo much!


Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Need help building a robot car
« Reply #3 on: September 10, 2011, 01:27:14 AM »
Hi,

what is a good uC for this project? (you said that i would only need one)
It's hard to find a microcontroller that can't handle the job.

also, can you explain how a uC works...
It's nearly impossible to correctly describe how a controller works in simple terms, but to oversimplify it, it "calculates" based on a predefined list of "orders" (the program).


how many processes can they generally run at the same time
1 (one) per core and most controllers have only got one.


(for example, i would like it to be able to change speed, turn, and do other tasks at the same time)? (simple terms please!)
That's impossible with a single core, but hey, it only have to make you think that it performs several things at once.

To put it in perspective...
It's usually said that something may happen in a blink of an eye.
I bet you a dime to a dollar that you cannot blink even close to 10 times a second.
In a tenth of a second, 100'000 instruction will be executed per MIPS the controller are capable of.
Assuming each thing you want it to perform takes 1000 instructions (it won't, I'm exaggerating grossly to drive the point through), it could still handle at least 100 different tasks in that blink.

You actually have to program delays and/or wait for signals from the external hardware, telling the controller that it's ready for the next action - Mechanical hardware is extremely slow in comparison.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline rahulpwnsTopic starter

  • Jr. Member
  • **
  • Posts: 28
  • Helpful? 0
Re: Need help building a robot car
« Reply #4 on: September 10, 2011, 12:12:19 PM »
thank you for clarifying how the processes on a microcontroller work.
i still have some more questions...
what is a good microcontroller that is under $50? ... please give specific model names.
should i look into dual core microcontrollers? (i would like the robot to be able to blink an led light while turning...2 tasks at exact same time.)
should i hack an rc car to do this project or should i start from scratch?
how can i model this robot before i actually buy the parts? with a 3d rendering software?

thank you!

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,941
  • Helpful? 98
Re: Need help building a robot car
« Reply #5 on: September 10, 2011, 01:55:58 PM »
Quote
what is a good micro-controller that is under $50?
There are many micro-controllers that can do what you need for under $3 each but these are just the micro-controller. Do you mean a micro-controller board with Voltage regulator, bypass caps and connectors?
A good one is the Axon or Axon II, another is the Audriuo , any of these are more than capable to control a small robot car. There is no need of a dual-core processor, even a low end PIC (~0.80 each) can control two motors, read sensors, turn and blink an LED. The program/processor can run several 'tasks' as Soeren explained.

If you are going this way and considering your experience (from the questions you ask) then consider the user base rather than just the cost. The three boards I mentioned have a large user base on this forum so there are a lot of people who use these boards and can answer questions. There are free programming environments available so always consider the development tool costs. There are less expensive boards (mainly engineering development board) but very few hobbyist use these and the development tools can be rather expensive.

From the questions you have been asking you need to do a good bit of reading. Start with the Robot Tutorials found under the title of this page. The tutorials and articles will help you learn the basics of robots and using micro-controllers plus the other related electronics required.

Offline rahulpwnsTopic starter

  • Jr. Member
  • **
  • Posts: 28
  • Helpful? 0
Re: Need help building a robot car
« Reply #6 on: September 10, 2011, 02:39:05 PM »
thanks for the help. also, what's a good microcontroller board with all the standard equipment?
also, can you tell me what a good ir sensor is? what is a good ultrasonic? (i want one that is accurate, but not too expensive)
for the rc car to robot conversion, how would i connect the uC to the motors, power unit, and steering?
thanks bro!

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,941
  • Helpful? 98
Re: Need help building a robot car
« Reply #7 on: September 10, 2011, 08:27:16 PM »
All of these questions have been asked and answered within these forums. A little searching and reading will find them.

Offline zachsradios

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: Need help building a robot car
« Reply #8 on: September 11, 2011, 11:39:10 AM »
I'm using a power wheels as my car base why dont you just use the same there are little modifications that will have to be done thought such as steering and pushing the gas pedal down. definitely the steering because i havent found a servo that is strong enough to turn the front tires.

Offline rahulpwnsTopic starter

  • Jr. Member
  • **
  • Posts: 28
  • Helpful? 0
Re: Need help building a robot car
« Reply #9 on: September 11, 2011, 01:45:54 PM »
wow!
i'm not planning to do it on that big of a scale.
i was thinking more along the lines of a 15 inch long car.
i decided that i'm going to use the arduino uno board as my motherboard/microcontroller.
it only has 14 digital I/O pins and 6 analog...
would that be a enough for the motor, the steering mechanism, a servo, 5 ir sensors, 5 proximity detectors, 2 line following sensors, and one ultrasonic sensor.
i have no idea how many pins i would need for that many sensors...
thanks!

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: Need help building a robot car
« Reply #10 on: September 11, 2011, 02:22:55 PM »
Hard to say really since you don't say how many of those sensors are analog vs digital. However, you can look at the hardware specs for the Arduino on the Arduino site. Click on the Hardware link at the top, and you can compare the various kinds. You might want to go for the Mega, I don't know.

Joe

Offline rahulpwnsTopic starter

  • Jr. Member
  • **
  • Posts: 28
  • Helpful? 0
Re: Need help building a robot car
« Reply #11 on: September 11, 2011, 03:42:49 PM »
yea... i think i might need a mega.
is this the one you were talking about... http://www.beboxx.com/coen/arduino-mega-atmega1280.html?track=feedgCrS
how do i tell whether my sensors are analog or digital?

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: Need help building a robot car
« Reply #12 on: September 11, 2011, 04:27:48 PM »
how do i tell whether my sensors are analog or digital?
Read the data sheet, or at least read the description of the product before you buy it.

You'll probably be better off if you decide what you're going to be controlling before you get a controller. List out all the things you want it to do, in detail. For example it's not enough to say you want it to turn, you have to decide what you're going to use to make it turn. If you're hacking a toy car the mechanism is probably there already, so you have to decide exactly what it will take to control it.

For example, if you decide you're going to hook up a servo to the existing steering mechanism, you know you need a power, ground and signal line for the servo. So that's one digital pin capable of PWM, with some way to get power and ground to the servo. Do this for all the components you decide you'll need. You may change this list later, that's ok.

Make the most detailed list you can, then try to work out how many digital pins vs analog pins you need, how many digital pins need to do PWM, how many ADC inputs you need, how you're going to get enough power to all the components (you probably won't be able to just run power from the arduino, it's not likely to be able to supply enough current).

If you don't know what all of that means, don't worry about it. Just make the list of what you want it to do, and research the components needed to do those things. Then come back with questions when you get stuck and we can probably help you go from there. At this point, Google is your friend.

Joe

Offline rahulpwnsTopic starter

  • Jr. Member
  • **
  • Posts: 28
  • Helpful? 0
Re: Need help building a robot car
« Reply #13 on: September 15, 2011, 06:40:57 PM »
here is the list of things i want the robot to do...

Turn left/ right (using steering mechanism and servo already built into rc car)
Accelerate/decelerate (using motor of rc car and pulse width modulation)
Detect objects near robot and be able to decelerate or turn left/right (infrared sensors… I will be using 6 of these sensors)
Drive in the middle of two white lines (using two line following sensors [one on each side of the car])


i also found out that my sharp ir range sensor is analog.

list of things connected to microcontroller...

6 ir sensors
1 sharp ir range sensors
2 line following sensors
dc motor
servo (controlling steering)


how much processing power will i need to do all of these tasks? will the arduino mega be enough?
how do i route the power from 5AA batteries to the sensors and motor (through the micrcontroller)?
what ports (i/o pins, pwm, etc.) do i need to plug in these sensors to?
i want the car to drive between two white lines... how do i do this? do i use line following sensors? do i need two sensors?





Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: Need help building a robot car
« Reply #14 on: September 16, 2011, 04:41:23 AM »
list of things connected to microcontroller...

6 ir sensors
1 sharp ir range sensors
2 line following sensors
dc motor
servo (controlling steering)


You don't say, so I'm assuming all these sensors are analog, meaning you'll need 9 ADC channels for sensors.
You don't say, so I'm assuming the dc motor requires a couple PWM outputs (+ enable, + ???).
The servo will require PWM output
So you need 9 ADC, and at least 3 PWM outputs.
If that's not right, then adjust accordingly when you figure out what each requires.
Quote
how much processing power will i need to do all of these tasks? will the arduino mega be enough?

If you look at the specs for the mega you'll see that it has enough PWM and ADC available.
Quote
how do i route the power from 5AA batteries to the sensors and motor (through the micrcontroller)?

You will not be able to get power from the mega. Again, look at the spec page I gave you to see how much power it can deliver per pin.
Quote
what ports (i/o pins, pwm, etc.) do i need to plug in these sensors to?

You have a bunch of them available. Pick the ones you want to use.
Quote
i want the car to drive between two white lines... how do i do this? do i use line following sensors? do i need two sensors?

I haven't done any line following, so I'll let someone who has advise you about this. Or you can look at the Arduino site, the Interfacing with hardware page might have some information about it. Also look at the libraries page to see what libraries might already be available to do this.

Joe

Offline rahulpwnsTopic starter

  • Jr. Member
  • **
  • Posts: 28
  • Helpful? 0
Re: Need help building a robot car
« Reply #15 on: September 18, 2011, 08:48:48 AM »
You don't say, so I'm assuming all these sensors are analog, meaning you'll need 9 ADC channels for sensors.
You don't say, so I'm assuming the dc motor requires a couple PWM outputs (+ enable, + ???).

my bad...
sharp ir range sensor - anolog
high intesity ir led - digital
line following sensor- digital

how do i route the power from 5AA batteries to the sensors and motor (through the micrcontroller)?
You will not be able to get power from the mega. Again, look at the spec page I gave you to see how much power it can deliver per pin.

i think the arduino can supply enough power for the sensors, but how do i send power to the dc motors (one for steering and one for acceleration)?
will i need a motor shield? i still want to be able to control the speed of the car and the steering, but i can't use pwm on the arduino. will the power shield have a pwm port on it?

 


Get Your Ad Here

data_list