Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

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...
 

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.
 

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...
 

Look at the datasheet of the Ping Sensor here :

**broken link removed**

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.
 

Look at the datasheet of the Ping Sensor here :

**broken link removed**

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???
 

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.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top