Robot with infrarred sensor

AVEAE

New Member
Hello guys I´m new her I´m sorry If you can´t understand
me sometimes I´m from México and It´s good can be her. I´m building a robot using
picaxe 18x I want a litlle help please with the code for the sensor.
my firs questios is. Is possible build a robot that can avoid obstacles with this picaxe using a infrarred sensor?
I tried to do this but I cant´t. I conected in a output 3 (pwm) a transmitter infrarred
because using pwm i could get a frecuency of 38 khz, and in a input I conected the receptor
sharp this works with 38 frecuency but my problem is how Can I send the code when the robot detects an obstacle?
Because the receptor just detect the signal but not the code. How can I send it?
this a little example with words

output3 just signal
transmitter-----------------receptor
code ?????

Or if you have some other ways about this please help me to build it

thank you so much axel
 
Last edited:

BeanieBots

Moderator
Welcome to the forum.

Most robot enthusiasts use analogue sensors for obsticle avoidance for many reasons.
Sensors like this
http://www.parallax.com/dl/docs/prod/acc/SharpGP2D12Snrs.pdf
are the most popular.
It provides an analogue voltage which you can read with "readadc" and then determine how far you are from an object. By using several sensors or a moving "head", you can also tell in which direction the object is.
 

AVEAE

New Member
Thanks

Thanks to both for help me now I have the analogue sensor, please could you help me to design the code for the program using this sensor?
I have a idea but if you show me some tips I would understand better
thank you
 

BeanieBots

Moderator
It's an analogue sensor so you will need to use ReadADC to read it.
If one sensor gives a different value to the other, you will know which side of your robot is closer to the object and you can steer away.
If both sensors indicate the object is very close, then back away.
 

cactusface

Senior Member
IR obstacle detector.

Hi,
Here's a link to the first IR detector that I build for my buggybot.. It was my first time, and I would do it a bit different now. Hopefully you will get to see the schematic too. Or take a look at my website at http://www.btinternet.com/~melvynsaunders , under electronics, don't forget the http:// bit or you get my BT-Yahoo which is rubbish and I don't use it.. Let my know if you have any problems..

http://www.picaxeforum.co.uk/showpost.php?p=114340&postcount=1

Kind regards
Mel aka Cactus
 
Top