Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

avoider robot with ultrasonic sensor

Status
Not open for further replies.

knk89

Newbie level 4
Joined
Jun 15, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
hi all.... right now i am trying to make an avoider robot..i am using dc motor and ping sensors the problem is i don't know how to communicate the dc motor and ping sensor, also
i don't have any reference about the program coding :sad::sad::sad: can anyone help me??? especially about the programs...
i'm using microcontrollers atmega8535 with code vision AVR...
 

Si.

Newbie level 6
Joined
Jun 11, 2011
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,368
Hi,

Well, you need to get to grips with the basics first. It sounds like you need to run trough a through tutorials.

If you are a beginner and not tied to that hardware, then you may find Arduino easier. Especially as you can buy a motor shield that plugs on to the top, so you don't have to make your own h-bridges.
 

knk89

Newbie level 4
Joined
Jun 15, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
thx for reply... i have known how to make the motor dc move manually (without input from sensor)...
the problem is i want to communicate the motor with ping sensor... so the signal come from sensor to move the dc motor...
 

mehtadhaval

Member level 3
Joined
Sep 15, 2010
Messages
56
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,288
Activity points
1,616
Look at the datasheet of the Ping Sensor here :

http://www.parallax.com/Portals/0/Downloads/docs/prod/acc/28015-PING-v1.6.pdf

Interfacing this sensor with uC is easy. Apply Vcc and GND to designated pin and then apply a pulse of 5 uS using the uC on the SIG pin. After applying pulse, stop for 750 uS. Then, there will be a pulse on the SIG pin, whose time duration is proportional to the object distance. So, all you have to do is to measure after how many uS (or mS) the SIG pin goes low. And based on that, you can measure the distance.

For avoiding objects, you will have to put sensors in each 4 directions. When the car is running, check the front sensor. If no object is detected within certain distance, then it will continue going in the forward direction. But, if any object is detected in forward sensor, then check all other sensors and move car in the direction where there is no object.
 

knk89

Newbie level 4
Joined
Jun 15, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
Look at the datasheet of the Ping Sensor here :

http://www.parallax.com/Portals/0/Downloads/docs/prod/acc/28015-PING-v1.6.pdf

Interfacing this sensor with uC is easy. Apply Vcc and GND to designated pin and then apply a pulse of 5 uS using the uC on the SIG pin. After applying pulse, stop for 750 uS. Then, there will be a pulse on the SIG pin, whose time duration is proportional to the object distance. So, all you have to do is to measure after how many uS (or mS) the SIG pin goes low. And based on that, you can measure the distance.

For avoiding objects, you will have to put sensors in each 4 directions. When the car is running, check the front sensor. If no object is detected within certain distance, then it will continue going in the forward direction. But, if any object is detected in forward sensor, then check all other sensors and move car in the direction where there is no object.
i need the code...would mind to share with me???
 

mehtadhaval

Member level 3
Joined
Sep 15, 2010
Messages
56
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,288
Activity points
1,616
i need the code...would mind to share with me???
I haven't tried the sensor, so, I haven't written any code. But, the code is very simple. All you have to do is send a pulse on any one line, wait for the return time and according to the return pulse duration, control car direction. If you know basics on any controller, than you should be able to make such code in one week.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top