Pages: [1] 2   Go Down
Author Topic: RC Car with proximity sensor  (Read 3187 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys! I'm a college student who is doing a project on making a car that can slows down automatically when it senses an obstacle in front. Basically I will fit a proximity sensor at the front of a small/mid sized RC car. The power of the RC car will be cut off to simulate braking in real life when the sensor detects an object in certain distance.

Since I'm new to Arduino, is it possible for me to do this project using Arduino?

Suggestions are welcome smiley
Logged

0
Offline Offline
Shannon Member
****
Karma: 117
Posts: 10106
:(){:|:&};: TOX id: fcb8e918bef08581e23f6ddf9d4dba77697c25b217bf372736ed959a95fde36df5b8c5b90fbb
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes, it is realy easy. take a look at some tutorial using a sonar sensor (PING).
Logged

my Arduino code: https://github.com/lestofante/arduinoSketch
sei nuovo? non sai da dove partire? leggi qui: http://playground.arduino.cc/Italiano/Newbie

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have a look at http://www.instructables.com/id/Getting-started-with-the-Maxbotix-sonar-sensor-q/
Logged

Follow my projects - http://www.begerk.co.uk

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

even if I connect the arduino to the circuit board found in an electric-driven RC car?

Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11159
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think you'll find it easier to use an RC car with an RC system made up of discrete receiver, servos and speed control rather than the all-in-one thing that cheap toys tend to use.

You can either feed the PWM signal for the speed controller through the Arduino (have it measure the pulse width and then generate its own output) so that you have full control over the speed, or just put a relay in the line to the motor so that the Arduino can cut it off when it wants to. Full control seems more elegant but would need more code. Nothing especially difficult either way.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 21
Posts: 1670
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

that car has a simple chip that provides on off control of the motor only. You could build your project as simply as connecting an op amp acting as a comparator on the sensor output. Basically you could use the comparator to keep the car running as long as the sensor reads above or below a threshold value.

If you want to go the route of a full blown proportional rc car, check out my blog for some ideas of how this can be interfaced with arduino.

rcarduino.blogspot.com

Duane B
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi DuaneB,

pardon me for my lack of knowledge in electronic area, but what you meant was the comparator can cut off the power supply if the sensor's reading is below a threshold value (a critical distance where the car has to decelerate when its distance from the obstacle is lesser than the threshold) ?
Logged

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 21
Posts: 1670
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Yes, thats basically the idea.

Here is a link I found that is close to my understanding of what you are looking for -

http://www.technologystudent.com/elec1/opamp3.htm

Duane B

rcarduino.blogspot.com
Logged


Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

even if I connect the arduino to the circuit board found in an electric-driven RC car?



That chip in the lower-left corner of the receiver board is the RX2 half of the TX2/RX2 chipset pair; a very commonly used and documented chipset for low cost (non-hobby grade) R/C toy cars.

You can do your project fairly easily with this chip; really you only have to take a few voltage measurements, and refer to the documentation of the chipset, to interface with it (well, actually, you don't interface -with- it, you actually bypass it - in fact, the chip can be completely removed, and actually should be, from the circuit). See the following lengthy thread on how to do this:

http://arduino.cc/forum/index.php/topic,86883.0.html

As DuaneB has noted, though, you can go the route of using a fully proportionally controlled R/C car (hobby-grade); this route has advantages to the "hack a cheap R/C car method"; namely, interfacing is much simpler (you just need to interface using the Servo library). The disadvantage to the method, though, is the fact that such a car tends to be much more expensive (and complex, mechanically - depending on if you have to completely assemble it from a kit) than a cheap R/C car. The cost difference is even greater, of course, if you already have the cheap R/C car (which you apparently do) or if you purchase one from a resale/thrift store (where many of these kinds of cars can be found for very little money).

So, this route you would gain ease of interfacing (Servo library) and proportional control of steering, in exchange for a higher up-front cost. While with the former method, you have to do more work on the interfacing end (write your own control routines, and do some soldering, etc), and no proportional steering (because most of those cars only have left/right/center control of steering), in exchange for a lower up-front cost.

Since your project doesn't -seem- to need Arduino control of proportional steering, and you can effect proportional control (ie, speed) of the h-bridge you would interface to on the cheap R/C car via PWM control, then the only benefit with going with the higher-cost option is ease of interfacing. Also note that if you absolutely had to have proportional steering of the cheap R/C car, you might find it cheaper to do a "hybrid" approach, and simply replace the simple actuator of the cheap car with an R/C servo, while continuing to use the R/C receiver board's on-board h-bridge to control the speed of the drive motor; versus buying an entire hobby-grade R/C car.

Finally - DuaneB: Help me out here in these discussions; you were a part of the TX2/RX2 chipset discussion that I linked (and provided a ton of assistance in) above - in the future on discussions about this kind of interfacing, especially if it is easily apparent that the poster has such a vehicle, provide a link to the discussion. I understand that you have a bias toward hobby-grade R/C cars for Arduino interfacing, but many people don't have the experience or budget to afford such vehicles, depending on the project at hand. Let us both continue to give these people unbiased information about both systems, so they can decide which would be best for their application.
Logged

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

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

right now I have to decide on which method to use to build my prototype. Preferably the simplest method (coz I have close-to-zero knowledge in electronic stuff) with lowest cost.
anyway, u guys really helped a lot! Thanks! keep the comments/suggestions/opinions coming in!
« Last Edit: June 30, 2012, 12:20:07 pm by simon_h » Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

right now I have to decide on which method to use to build my prototype. Preferably the simplest method (coz I have close-to-zero knowledge in electronic stuff) with lowest cost.
anyway, u guys really helped a lot! Thanks! keep the comments/suggestions/opinions coming in!

The simplest method will be a hobby-grade R/C car; it won't be the most inexpensive, but you might be able to get something together for under $200.00, possibly less.

You'll need, of course, an R/C car kit - DuaneB could probably talk to this better; I would imagine that today, you can probably purchase anything from a "build from the ground up" kit to a "ready-to-run" kit - and anything in between. The difference will be in the amount of work you need to do to put it together (from "lots" to "none") and what kind of accessories/parts come with the kit.

Some kits will just be a bare-basic chassis - all the mechanicals, but no electrical or R/C components, which means you have to purchase the motor, the speed controller (ESC), the steering servo, the battery, a battery eliminator (BEC or SBEC), transmitter/receiver kit, etc. Others will have pretty much everything included, including (perhaps) a rudimentary battery charger.

Prices will also vary based on all of this - think of it kinda like buying a computer; you can buy all the components seperately (and get exactly what you want, spec'd out how you want), you can get a "bare-bones" kit (with a case, power supply, motherboard, and maybe memory/cpu - and add the extra parts, for a semi-customized solution), or you can go out and buy a Dell or a Mac, or some other pre-built machine (which may or may not have the spec you want, and may cost a bit more).

Regardless of which way you go, in order to do things with the Arduino, you are going to probably want use a battery eliminator to power the Arduino (if one isn't already included with your kit to power the receiver). It should provide a 5 volt regulated output so you can bypass the regulator on the Arduino. Some BECs output 6 volts to allow the powering of the servos at their max voltage ratings. If you don't know the voltage output of the BEC, or it is too high (beyond 5 volts), you can either add an extra BEC for 5 volts, or you can use a y-splice adapter to the battery (if it is a 7.2 - 9.6 volt pack) and solder on a barrel connector to plug into the Arduino's barrel jack (and the Arduino's on-board regulator will be used - to use this regulator, the input voltage must be 7 volts or more, but not beyond 12 volts).

Control of the speed control of the R/C car, as well as the steering servo (if needed/desired) can be done using the Servo library.
Logged

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

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 21
Posts: 1670
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

There are basically Three basic approaches as follows -

1) Pure electronics - a budget rc car with additional electronics similar to the comparator circuit which will use infra red light to detect object in front of the car and cut power to the motor.

2) Mostly electronics with some microcontroller programming - a budget rc car with the either ultra sonic or Infra red lught to detect objects in front of the car and take some action. The action can be more complex than in 1) for example steer, reverse etc.

3) Mostly microcontroller programming with some electronics - if you choose a hobby quality rc car, you will need to do lot more programming to interface between the receiver and the motor, you can find all the details on my blog. This approach could allow you to do much more in the future, for example i have traction control and yaw control projects underway in cars that hit 60km/h. As Crosh has mentioned, the car, battery, charger etc will be a lot more expensive.

As we do not know what course you are taking or at what level, it might ge best to discuss the  options with your professor to judge which is most appropriate for your class.

lets us know which you choose.

Duane B

rcarduino.blogspot.com


Logged


0
Offline Offline
Shannon Member
****
Karma: 117
Posts: 10106
:(){:|:&};: TOX id: fcb8e918bef08581e23f6ddf9d4dba77697c25b217bf372736ed959a95fde36df5b8c5b90fbb
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

right now I have to decide on which method to use to build my prototype. Preferably the simplest method (coz I have close-to-zero knowledge in electronic stuff) with lowest cost.
anyway, u guys really helped a lot! Thanks! keep the comments/suggestions/opinions coming in!

The simplest method will be a hobby-grade R/C car; it won't be the most inexpensive, but you might be able to get something together for under $200.00, possibly less.

25$ + expedition from hobbyking (4 and 6 channel).
Logged

my Arduino code: https://github.com/lestofante/arduinoSketch
sei nuovo? non sai da dove partire? leggi qui: http://playground.arduino.cc/Italiano/Newbie

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

There are basically Three basic approaches as follows -

1) Pure electronics - a budget rc car with additional electronics similar to the comparator circuit which will use infra red light to detect object in front of the car and cut power to the motor.

2) Mostly electronics with some microcontroller programming - a budget rc car with the either ultra sonic or Infra red lught to detect objects in front of the car and take some action. The action can be more complex than in 1) for example steer, reverse etc.

3) Mostly microcontroller programming with some electronics - if you choose a hobby quality rc car, you will need to do lot more programming to interface between the receiver and the motor, you can find all the details on my blog. This approach could allow you to do much more in the future, for example i have traction control and yaw control projects underway in cars that hit 60km/h. As Crosh has mentioned, the car, battery, charger etc will be a lot more expensive.

As we do not know what course you are taking or at what level, it might ge best to discuss the  options with your professor to judge which is most appropriate for your class.

lets us know which you choose.

Duane B

rcarduino.blogspot.com




I'm currently studying Mechanical Engineering, and the method I will use can be the easiest method, as long as I can achieve my objective (which is the prototype will decelerate when it senses an obstacle). Therefore, the first approach would be the ideal approach for me as it consists of the easiest method and low budget. Would like to know more in-depth details regarding this method smiley
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

25$ + expedition from hobbyking (4 and 6 channel).

Got a link for that? The closest thing I could find (I didn't do an extreme depth search, but I did look at all cars, plus the discount/discontinues/scratch-n-dent areas):

http://www.hobbyking.com/hobbyking/store/__19955__TURNIGY_1_4_Scale_Brushless_GoKart_Alloy_Chassis_kit_.html

That's just mechanicals for about $30.00 USD; you'd still need to purchase the motor, esc, rx/tx, servo, battery, charger, etc to make it a complete kit. Not only that, but being that it is a "go-kart" it has a very low clearance, so it would limit you to running on fairly smooth surfaces.

If you can find a complete hobby-grade R/C car kit, with everything included (kit, almost-ready-to-run, or ready-to-run), that is large enough to mount a standard Arduino on, for under $100.00 - I would certainly love to see it.
Logged

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

Pages: [1] 2   Go Up
Jump to: