IR Leds and sensors

Obviously, not all IR leds and IR sensors are not the same.
In particular, I would like to know the specs on the ones Parallax sent me as follow:
IR LED
voltage rating
Maximum forward current rating
Output (in ? - watts, or someother quantity)
Any effective optical focusing (some have a reflective material inside and the front may act as a lens)
IR Sensors
These seem to be rated by a particular frequency with 38500hz being most common and apparently most useful (because it is about double the 19,200 serial baud and can work with such serial input), but there are others.
Sensitivity, Hyper-sensitivity
Also, it seems the metal covered sensors are better (tend to get less interference from unrelated sources).
Lock up problems
Can the sensor overload and latch its output
Thanks in advance
·
In particular, I would like to know the specs on the ones Parallax sent me as follow:
IR LED
voltage rating
Maximum forward current rating
Output (in ? - watts, or someother quantity)
Any effective optical focusing (some have a reflective material inside and the front may act as a lens)
IR Sensors
These seem to be rated by a particular frequency with 38500hz being most common and apparently most useful (because it is about double the 19,200 serial baud and can work with such serial input), but there are others.
Sensitivity, Hyper-sensitivity
Also, it seems the metal covered sensors are better (tend to get less interference from unrelated sources).
Lock up problems
Can the sensor overload and latch its output
Thanks in advance
·
Comments
IR RECEIVER: Panasonic PNA4602M (data sheet attached)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
I am trying to figure out how to program the BS2p-40 for IR remote control and this is so much easier that guessing.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
You do a much better job of helping the learner, not just trying to sell product.
Originally, I got into the IR remote control project from one of your competators projects, but their information is not as clear or comprehensive.· The deep I looked into things, the more confusion.
Your article·cleared up the fact that NOT ALL Ir sensors have the same pin out arrangement (I had thought some documents I read were in error, but now I see that their are indeed at least two configurations).
Also, I don't have to do all that conversion of the competators program to PBASIC.
Thanks again
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
G. Herzog in Taiwan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
"Just keep in mind that code was written a few months ago and I’ve updated the
BS2sx/BS2p IR input routine. If you’re a BS2/BS2e user and are chomping at the bit (so
to speak) to use an IR remote with your project, download the file “IR LED & 40 KHZ
DETECTOR.PDF” from Parallax. This document was written by Andy and is full of
great IR stuff for the BS2. You can find find it on the Parallax web site."
I am looking for that file it mentions, I looked all over the parallax website but couldnt find it.
I am wanting to control my BOE bot (equiped with a BS2) with my TV remote, but I cant find any info on exactly how to do it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
The only thing I am still trying to figure out how to do is make the BS2 execute a command (or block of commands) when a button on the TV remote is pressed.
Ive got down the decoding the signals part, but I dont know what to do with the data once its been decoded.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Ill mess around with it later and if I cant get it to work ill let you know.
This is the code I am using, maybe you can fix it up for me so my BOE-bot will move around smoother.
By the way, I tried using branch, on...gosub, on...goto, case...select etc. but I couldt get any of them to work right, thats why I went with IF...THENs.
'{$STAMP BS2} '{$PBASIC 2.5}
FREQOUT 4, 2000, 3000
'=================================IR remote=========================== declarations:
IR_det_pin CON 8 active_low CON 0
IR_detect VAR IN8
IR_pulse VAR Word(8) counter VAR Nib type VAR Nib pulse_delay_time CON 2
IR_message VAR Byte active_high CON 1
runtime VAR Word
'---------------------------Main IR Routine----------------------- main:
IF IR_detect = 1 THEN main: GOSUB find_start_pulse GOSUB process_IR_pulses GOSUB convert_to_binary GOTO main '----------------------------Find Start Pulse--------------------- find_start_pulse:
FOR counter = 0 TO 15 PULSIN IR_det_pin,active_low,IR_pulse(0) NEXT
RETURN '---------------------------Process Ir pulses--------------------- process_IR_pulses:
check_for_stop_bit: PULSIN Ir_det_pin,active_high,IR_pulse(0) IF IR_pulse(0) > 1400 AND IR_pulse(0) <> 0 THEN continue GOTO check_for_stop_bit
continue:
PULSIN IR_det_pin,active_low,IR_pulse(0) PULSIN IR_det_pin,active_low,IR_pulse(1) PULSIN IR_det_pin,active_low,IR_pulse(2) PULSIN IR_det_pin,active_low,IR_pulse(3) PULSIN IR_det_pin,active_low,IR_pulse(4) PULSIN IR_det_pin,active_low,IR_pulse(5) PULSIN IR_det_pin,active_low,IR_pulse(6) PULSIN IR_det_pin,active_low,IR_pulse(7)
RETURN '---------------------------convert to binary------------------------ convert_to_binary:
FOR counter = 0 TO 10 LOOKDOWN Ir_pulse(counter), < [noparse][[/noparse]400,800], IR_message.LOWBIT(counter) NEXT
'=========BOE bot manuevers from here on============================
IF IR_message = 00144 THEN GOSUB t_center IF IR_message = 00146 THEN GOSUB t_right IF IR_message = 00147 THEN GOSUB t_left IF IR_message = 00148 THEN GOSUB fire
IF IR_message = 00129 THEN GOSUB forward IF IR_message = 00135 THEN GOSUB back IF IR_message = 00131 THEN GOSUB left IF IR_message = 00133 THEN GOSUB right
IF IR_message = 00128 THEN GOSUB pivot_left IF IR_message = 00130 THEN GOSUB pivot_right IF IR_message = 00134 THEN GOSUB back_pivot_left IF IR_message = 00136 THEN GOSUB back_pivot_right
RETURN '---------BOE bot manuever subroutines------------------------------ forward:
FOR runtime = 1 TO 20 PULSOUT 13, 830 PULSOUT 12, 650 NEXT
RETURN '---------------------------------------------- back:
FOR runtime = 1 TO 20 PULSOUT 13, 680 PULSOUT 12, 850 NEXT
RETURN '--------------------------------------------- left:
FOR runtime = 1 TO 10 PULSOUT 13, 650 PULSOUT 12, 650 NEXT
RETURN '----------------------------------------------- right:
FOR runtime = 1 TO 10 PULSOUT 13, 850 PULSOUT 12, 850 NEXT
RETURN '---------------------------------------------- pivot_left:
FOR runtime = 1 TO 10 PULSOUT 13, 750 PULSOUT 12, 650 PAUSE 20 NEXT
RETURN '---------------------------------------------- pivot_right:
FOR runtime = 1 TO 10 PULSOUT 13, 850 PULSOUT 12, 750 PAUSE 20 NEXT
RETURN '---------------------------------------------- back_pivot_right:
FOR runtime = 1 TO 10 PULSOUT 13, 650 PULSOUT 12, 750 PAUSE 20 NEXT
RETURN '----------------------------------------------- back_pivot_left:
FOR runtime = 1 TO 10 PULSOUT 13, 750 PULSOUT 12, 850 PAUSE 20 NEXT
RETURN '----------------------------------------------- t_right:
FOR runtime = 0 TO 1 PULSOUT 14, 300 PAUSE 10 NEXT
RETURN '----------------------------------------------- t_center:
FOR runtime = 1 TO 10 PULSOUT 14, 750 PAUSE 20 NEXT
RETURN '----------------------------------------------- t_left:
FOR runtime = 0 TO 1 PULSOUT 14, 1200 PAUSE 10 NEXT RETURN '---------------------------------------------- fire:
LOW 15 FREQOUT 4, 1000, 4000 HIGH 15
RETURN
Post Edited (jakjr) : 8/11/2004 9:22:56 PM GMT
Ive messed with this a good 5 hours (at least!) today and have come to the conclusion that A. I just dont know what im doing or B. the jumpiness in movement is being caused by the time its taking to go through the whole program again (its called program overhead right?.
Again if anyone knows how to get rid of the jumpiness (or at least how to shorten up the code) let me know.
· On the software side...from what I can recall from my boebot days(I have the original boebot...I remember picking it up at a Parallax booth at some convention ages ago) when you do this:
·forward:
FOR runtime = 1 TO 20
·PULSOUT 13, 830
·PULSOUT 12, 650
NEXT
RETURN
·I think you are supposed to do this:
forward:
FOR runtime = 1 TO 20
·PULSOUT 13, 830
·PULSOUT 12, 650
pause 10
NEXT
RETURN
I believe that a pause of more than 10 is not necessary to get the timing right, but the pause is supposed to be included after the pulseouts to the servos. Any more than 10 and you are just adding time that the servos are doing nothing. It's real late and I hope I didn't muff this post up...good luck!
··
Post Edited (cabojoe) : 8/10/2004 11:38:15 AM GMT
I think I might upgrade to a BS2p, the added processing speed should help with the jumpiness problem.
Oh by the way, when I add the pause 10 to that code block it cuts down on the jumpiness but it makes the servo run longer therefore making the BOE-bots movement less accurate.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
forward:
FOR runtime = 1 TO 20
·PULSOUT 13, 830
·PULSOUT 12, 650
pause 10
NEXT
RETURN
try:
forward:
FOR runtime = 1 TO 10··' or less
·PULSOUT 13, 830
·PULSOUT 12, 650
pause 10
NEXT
RETURN
As for separate power supplies, the boebot I have has a·6 volt supply for servos, and a 9 volt supply for the boe. Simply connecting wires up to these for the servo controller will work fine.
Post Edited (cabojoe) : 8/10/2004 10:01:23 PM GMT
Ill keep working with it, Ill try out what you suggested. I have the pivots like that on purpose, it turns faster since the servos run longer per execution.
Post Edited (jakjr) : 8/11/2004 4:55:54 AM GMT
I now have more free ram, and I reconfigured what button does what.