Author Topic: Alternative to sharp IR sensor for 50$ robot  (Read 3286 times)

0 Members and 1 Guest are viewing this topic.

Offline 007Topic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Alternative to sharp IR sensor for 50$ robot
« on: January 04, 2010, 08:39:01 AM »
Can I use a SINGLE TSOP SENSOR MODULE as an alternative to the SHARP IR SENSOR??

http://robosoftsystems.co.in/roboshop/index.php/sensors/sensor-modules/single-tsop-sensor-module.html

It also uses a 3 pin output and supports a range upto 15cm to 20cm

Offline little-c

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 1
Re: Alternative to sharp IR sensor for 50$ robot
« Reply #1 on: January 04, 2010, 09:23:46 AM »
theoreticly yes. however, you are asking the question so probably no.

the sensor outputs a single response. object is there or its not.
the sharp IR sensor says how far away the object is.

if you created an algorithim that ran on having an object there or not it would work. but the sharp IR sensor code would be useless. and any algorithim using it won't work.


you would need somthing like,

if no object go foward.
if object turn (left/right) for (movement that works best)

but it only uses digital in's so its not too hard if you can program in assembler.

Offline Pratheek

  • Contest Winner
  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 3
Re: Alternative to sharp IR sensor for 50$ robot
« Reply #2 on: January 04, 2010, 10:40:29 AM »
the sensor outputs a single response. object is there or its not.
the sharp IR sensor says how far away the object is.
Thats right.

With modifications to the code you can use the TSOP sensor instead of the Sharp IR sensor. The code will infact become much more simpler as the TSOP gives you 0 to indicate an object and 1 otherwise.

But why do you want to use the TSOP sensor?
« Last Edit: January 04, 2010, 10:43:34 AM by Pratheek »

Offline 007Topic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: Alternative to sharp IR sensor for 50$ robot
« Reply #3 on: January 04, 2010, 11:22:33 AM »
But why do you want to use the TSOP sensor?

Cause its more cheaper than the IR sensor

but can this sensor be used for obstacle detection?
if yes, wht wud i hav to change in the code?

Offline little-c

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 1
Re: Alternative to sharp IR sensor for 50$ robot
« Reply #4 on: January 04, 2010, 11:43:55 AM »
not using the smae micros as everyone else(well I can get pics for free, so I just put up with horrible compilers)

the basic bit would be,


read pin (the one the device is conected to)
if pin is 1
{
   left motor foward
   right motor back
}
else
{
  left motor foward
  right motor foward
}

you can take the same code for controling the motors as the sharp IR robot.

you only need to conect up a digital in, and code the micro to read from the digital in. as well as do an if else statement. the if else should be in the sharp IR code, and digital in is realitivly easy to set up.

as for values and timings. chuck something in and see what happens. make a guess. then revise the guess based on if its too slow or too fast. or turns too far. 

Offline 007Topic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: Alternative to sharp IR sensor for 50$ robot
« Reply #5 on: January 06, 2010, 11:08:00 AM »
Picaxe is not available in my country (India)

So, I am using the ATmega8

Can you please give me an example of the code for it?

Thank you...............................................................

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Alternative to sharp IR sensor for 50$ robot
« Reply #6 on: January 06, 2010, 12:16:50 PM »
Hi,

If you wanna use a TSOPxxxx, you need more hardware. You need an IR-LED of the wavelength of the TSOP and you need an oscillator to modulate it at the carrier frequency the TSOPxxxx needs.

Further, not all TSOPxxxx's will do, as many have a noise cancelling scheme that makes the AGC turn the gain of the TSOPxxxx all the way down when it sees a continuous signal and as such won't work - you need to get one of the types used for IR curtains.

Alternatively, your oscillator could be made more complicated, to make burst patterns and irregular breaks to fool the noise cancelling circuitry.

Given the cost of extra hardware and the time you need to get it working, perhaps a Sharp sensor is worth the higher cost after all?
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 007Topic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: Alternative to sharp IR sensor for 50$ robot
« Reply #7 on: January 07, 2010, 04:23:07 AM »
Hi,

If you wanna use a TSOPxxxx, you need more hardware. You need an IR-LED of the wavelength of the TSOP and you need an oscillator to modulate it at the carrier frequency the TSOPxxxx needs.

Further, not all TSOPxxxx's will do, as many have a noise cancelling scheme that makes the AGC turn the gain of the TSOPxxxx all the way down when it sees a continuous signal and as such won't work - you need to get one of the types used for IR curtains.

Alternatively, your oscillator could be made more complicated, to make burst patterns and irregular breaks to fool the noise cancelling circuitry.

Given the cost of extra hardware and the time you need to get it working, perhaps a Sharp sensor is worth the higher cost after all?


KINDLY OPEN THE LINK I SPECIFIED IN MY 1st POST.............

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,941
  • Helpful? 98
Re: Alternative to sharp IR sensor for 50$ robot
« Reply #8 on: January 07, 2010, 11:38:09 AM »
I designed and built a distance detector similar to the one the OP linked to.
The one in the link uses a 555 to generate the 38kHz for the IR LED modulation and either detects or not detects an object within a fixed distance. This works fairly well for a non-contact collision detector.

My design used a PIC12C505 to drive a combination of resistors to the IR LED. These lit the LED at different brightnesses and the PIC read whether the reflection was detected at each brightness levels to determine near, medium, far or too far distances. Two pins of the PIC encoded the detection distance to be read by the Bot control processor. While it is not an analog value of distance, which is desirable for mapping, it was useful.

Offline little-c

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 1
Re: Alternative to sharp IR sensor for 50$ robot
« Reply #9 on: January 08, 2010, 01:39:11 AM »
mind putting up some schematics for that?

sounds useful.

Offline 007Topic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: Alternative to sharp IR sensor for 50$ robot
« Reply #10 on: January 08, 2010, 04:45:50 AM »
mind putting up some schematics for that?

sounds useful.


The schematics are on this site itself  ;).........

http://www.societyofrobots.com/schematics_infraredemitdet.shtml

Offline little-c

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 1
Re: Alternative to sharp IR sensor for 50$ robot
« Reply #11 on: January 08, 2010, 09:05:08 AM »
cringe. now to go and read it.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,941
  • Helpful? 98
Re: Alternative to sharp IR sensor for 50$ robot
« Reply #12 on: January 08, 2010, 11:09:44 AM »
The schematic linked to by 007 is not what is being discussed. That is just an IR photodetector not the 38kHz IR detector.

I would like to post the schematic and code but have never figured out to put an image in here. I sure its simple so maybe some can get me a hint (please PM).

The detector I use, and is functional the same as the one in the link the OP first posted, is the Panasonic PNA4602.
http://www.solarbotics.com/products/pna4602/

Schematic is really simple. +5V to IR LED, other end of IR LED connects to three resistors, 1.8k, 1.2k & 390. Each of these resistors then connects to a PIC output pin. When all three PIC outputs are low the LED current is maximum at about 15mA. Change the PIC pin that should not be low to an input reduces the number of resistors in parallel and thus the LED current and brightness. The combinations are:
1.8k || 1.2k || 390 = 252, ~14.3mA
1.8k || 390 = 320, ~11mA
1.8k || 1.2k = 720, ~5mA
1.8k, ~2mA
Allowing four maximum detection distances.

The PIC code has a timing loop to pulse the active pins with a 38kHz square wave. Once this loop runs for the PNA4602's detection time (600us) the PIC input pin from the PNA4602's output is sampled. The code then loops through the resistor (LED current) combinations and sets the two PIC output  pins to the detection distance code.

Offline 007Topic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: Alternative to sharp IR sensor for 50$ robot
« Reply #13 on: January 09, 2010, 01:39:00 AM »
Can any one please explain me how to program the $50 robot using this sensor for obstacle avoidance?

Please reply fast.....

Thanks in advance... ;)
« Last Edit: January 09, 2010, 06:23:55 AM by 007 »

 


Get Your Ad Here

data_list