IR Reciver worrking in revers
how many lups 3 or 4
Posts: 6
[FONT="]Could you please give me some insight what Im doing wrong??With the program loaded and[/FONT]
[FONT="] wiring correct I believe when I put a block in front of the ir receiver I get just the oppisset results. [/FONT]
[FONT="]I get a (0) instead of a (1) im lost in what to try next please take a look and advise me were to go or[/FONT]
[FONT="] what to do thank in advance [/FONT]
[FONT="]How many lumps 3 or 4[/FONT]
[FONT="] [/FONT]
[FONT="] [/FONT]
[FONT="]I under stand this is what to happen[/FONT]
[FONT="]The IR receiver sends a low signal while it detects 38.5 kHz IR [/FONT][FONT="]eflected off an object, which causes[/FONT][FONT="] [/FONT][FONT="]IN9[/FONT][FONT="] [/FONT][FONT="]to store 0. When the BASIC Stamp finishes t[/FONT][FONT="]ransmitting its[/FONT][FONT="] [/FONT][FONT="]FREQOUT[/FONT][FONT="]\
[/FONT][FONT="]signal and moves on to the next command, it stops sending that [/FONT][FONT="]38.5 kHz signal. So the program has to use[/FONT][FONT="] [/FONT][FONT="]irDetectLeft = IN9[/FONT][FONT="] [/FONT][FONT="]to catch that zero [/FONT][FONT="]value before the IR receiver realizes
the 38.5 kHz signal stopped. It only takes a fraction of a millisecond for the IR receiver to realize the signal stopped, and after that, its output[/FONT]
[FONT="] [/FONT][FONT="]rebounds[/FONT][FONT="] [/FONT][FONT="]to[/FONT][FONT="] [/FONT][FONT="]high, and IN9 stores 1 again[/FONT]
[FONT="]'[/FONT] [FONT="]Test[/FONT] [FONT="]IR[/FONT] [FONT="]object[/FONT] [FONT="]detection[/FONT] [FONT="]circuits,[/FONT] [FONT="]IR[/FONT] [FONT="]LED[/FONT] [FONT="]to[/FONT] [FONT="]P8[/FONT] [FONT="]and[/FONT] [FONT="]detector[/FONT] [FONT="]to[/FONT] [FONT="]P9.[/FONT]
[FONT="]'[/FONT] [FONT="]{$STAMP[/FONT] [FONT="]BS2}[/FONT]
[FONT="]'[/FONT] [FONT="]{$PBASIC[/FONT] [FONT="]2.5}[/FONT]
[FONT="]irDetectLeft[/FONT] [FONT="]VAR[/FONT] [FONT="]Bit[/FONT]
[FONT="]DO[/FONT]
[FONT="]FREQOUT[/FONT] [FONT="]8,[/FONT] [FONT="]1,[/FONT] [FONT="]38500[/FONT]
[FONT="]irDetectLeft[/FONT] [FONT="]=[/FONT] [FONT="]IN9[/FONT]
[FONT="]DEBUG[/FONT] [FONT="]HOME,[/FONT] [FONT="]"irDetectLeft[/FONT] [FONT="]=[/FONT] [FONT="]",[/FONT] [FONT="]BIN1[/FONT] [FONT="]irDetectLeft[/FONT]
[FONT="]PAUSE[/FONT] [FONT="]100[/FONT]
[FONT="]LOOP[/FONT]
[FONT="][/FONT]
[FONT="] wiring correct I believe when I put a block in front of the ir receiver I get just the oppisset results. [/FONT]
[FONT="]I get a (0) instead of a (1) im lost in what to try next please take a look and advise me were to go or[/FONT]
[FONT="] what to do thank in advance [/FONT]
[FONT="]How many lumps 3 or 4[/FONT]
[FONT="] [/FONT]
[FONT="] [/FONT]
[FONT="]I under stand this is what to happen[/FONT]
[FONT="]The IR receiver sends a low signal while it detects 38.5 kHz IR [/FONT][FONT="]eflected off an object, which causes[/FONT][FONT="] [/FONT][FONT="]IN9[/FONT][FONT="] [/FONT][FONT="]to store 0. When the BASIC Stamp finishes t[/FONT][FONT="]ransmitting its[/FONT][FONT="] [/FONT][FONT="]FREQOUT[/FONT][FONT="]\
[/FONT][FONT="]signal and moves on to the next command, it stops sending that [/FONT][FONT="]38.5 kHz signal. So the program has to use[/FONT][FONT="] [/FONT][FONT="]irDetectLeft = IN9[/FONT][FONT="] [/FONT][FONT="]to catch that zero [/FONT][FONT="]value before the IR receiver realizes
the 38.5 kHz signal stopped. It only takes a fraction of a millisecond for the IR receiver to realize the signal stopped, and after that, its output[/FONT]
[FONT="] [/FONT][FONT="]rebounds[/FONT][FONT="] [/FONT][FONT="]to[/FONT][FONT="] [/FONT][FONT="]high, and IN9 stores 1 again[/FONT]
[FONT="]'[/FONT] [FONT="]Test[/FONT] [FONT="]IR[/FONT] [FONT="]object[/FONT] [FONT="]detection[/FONT] [FONT="]circuits,[/FONT] [FONT="]IR[/FONT] [FONT="]LED[/FONT] [FONT="]to[/FONT] [FONT="]P8[/FONT] [FONT="]and[/FONT] [FONT="]detector[/FONT] [FONT="]to[/FONT] [FONT="]P9.[/FONT]
[FONT="]'[/FONT] [FONT="]{$STAMP[/FONT] [FONT="]BS2}[/FONT]
[FONT="]'[/FONT] [FONT="]{$PBASIC[/FONT] [FONT="]2.5}[/FONT]
[FONT="]irDetectLeft[/FONT] [FONT="]VAR[/FONT] [FONT="]Bit[/FONT]
[FONT="]DO[/FONT]
[FONT="]FREQOUT[/FONT] [FONT="]8,[/FONT] [FONT="]1,[/FONT] [FONT="]38500[/FONT]
[FONT="]irDetectLeft[/FONT] [FONT="]=[/FONT] [FONT="]IN9[/FONT]
[FONT="]DEBUG[/FONT] [FONT="]HOME,[/FONT] [FONT="]"irDetectLeft[/FONT] [FONT="]=[/FONT] [FONT="]",[/FONT] [FONT="]BIN1[/FONT] [FONT="]irDetectLeft[/FONT]
[FONT="]PAUSE[/FONT] [FONT="]100[/FONT]
[FONT="]LOOP[/FONT]
[FONT="][/FONT]
Comments
You are getting opposite results, or inconsistent results? Are you interrupting the beam, or reflecting off an object?
Your problem may be that 95% of IR receivers are not "continuous signal acceptable". They will only go low for a fraction of a second when a steady IR signal is received.
"Your problem may be that 95% of IR receivers are not "continuous signal acceptable". They will only go low for a fraction of a second when a steady IR signal is received" so i may have the wrong receiver or need more time delay?
I'm not aware of any IR detectors that behave the way you've described. They all idle with their output pin at high and this goes low when modulated IR is received. Some IR detectors will stop "seeing" the IR after a short time ... they don't stay on as long as the IR is present. Their output pin goes low at first, then, after a short time, goes high again even if IR is present. They'll only respond with a new pulse after the IR has been off for a little while. None of that would explain what you're describing. Changing the FREQOUT won't affect any of that.
[FONT="] [/FONT]
[FONT="]Here we go me and a friend decided to build a couple boe bot to keep are minds fresh. Do we bought couple of Basic Stamps 2 Homework boards servos and all the hardware to build two [2] Boe Bots. We started to built one first following the parallax boe bot manual Robotics with the Boe-Bot Student Guide version 3.0 Everything went well no problem was having great time. So we decide I was time to build the second one to have a little computation in the maze. So we built the second one exactly like the first one and per the manual (so we think??). We were we ready to power up for the first time using fresh 9 vdc batter and 4 c size nickel metal hydride batteries for servo power. We did use a different laptop that we download 2.5.4 stamp editor. We Loaded the IR left test program first to test thing out . program was from the manual form the manual[/FONT]
[FONT="] [/FONT]
[FONT="]' Robotics with the Boe-Bot - TestLeftIr.bs2[/FONT]
[FONT="]' Test IR object detection circuits, IR LED to P8 and detector to P9.[/FONT]
[FONT="]' {$STAMP BS2}[/FONT]
[FONT="]' {$PBASIC 2.5}[/FONT]
[FONT="]irDetectLeft VAR Bit[/FONT]
[FONT="]DO[/FONT]
[FONT="]FREQOUT 8, 1, 38500[/FONT]
[FONT="]irDetectLeft = IN9[/FONT]
[FONT="]DEBUG HOME, "irDetectLeft = ", BIN1 irDetectLeft[/FONT]
[FONT="]PAUSE 100[/FONT]
[FONT="]LOOP[/FONT]
[FONT="] [/FONT]
[FONT="]So we ran the program and while testing the Left detector were we getting a different response.[/FONT]
[FONT="]First thing was no detections unless you covered the detector completely with your finger or piece of paper. You had to be very close about 3/16 of an inch away. The second problem was the high - low was backwards. With nothing in front of the detector or too close to any object we were get a low indication (0) cover the ir receiver or detector it would go high or show a (1). Think that we had interference we ran the sniffer program.[/FONT]
[FONT="] [/FONT]
[FONT="]' Robotics with the Boe-Bot – IrInterferenceSniffer.bs2[/FONT]
[FONT="]' Test fluorescent lights, infrared remotes, and other sources[/FONT]
[FONT="]' of 38.5 kHz IR interference.[/FONT]
[FONT="]' {$STAMP BS2} ' Stamp directive.[/FONT]
[FONT="]' {$PBASIC 2.5} ' PBASIC directive.[/FONT]
[FONT="]counter VAR Nib[/FONT]
[FONT="]DEBUG "IR interference not detected, yet...", CR[/FONT]
[FONT="]DO[/FONT]
[FONT="]IF (IN0 = 0) OR (IN9 = 0) THEN[/FONT]
[FONT="]DEBUG "IR Interference detected!!!", CR[/FONT]
[FONT="]FOR counter = 1 TO 5[/FONT]
[FONT="]HIGH 1[/FONT]
[FONT="]HIGH 10[/FONT]
[FONT="]FREQOUT 4, 50, 4000[/FONT]
[FONT="]LOW 1[/FONT]
[FONT="]LOW 10[/FONT]
[FONT="]PAUSE 20[/FONT]
[FONT="]NEXT[/FONT]
[FONT="]ENDIF[/FONT]
[FONT="]LOOP[/FONT]
[FONT="]No detection found[/FONT]
[FONT="] [/FONT]
[FONT="]So back to the basic we only connected the left IR system to rule out any other problems, but we got the same results.[/FONT]
[FONT="] [/FONT]
[FONT="]Now were thinking we got the program messed up and we decided to load the first boe bot with the same program and see what happen. Using the first built Boe Bot everything worked correctly high with no interference and low when object place in front of IR detector.[/FONT]
[FONT="] [/FONT]
[FONT="]So that’s my kinder garden version of what we did and with correct voltage on the 9 vdc and nothing but the left IR installed we still get low with no detection and high with detection. [/FONT]
[FONT="] [/FONT]
[FONT="]I hope this is a better explanation of what going on and hope u can help I enjoy the parallax system[/FONT]
Edit: After reading the rest of your last post I do not think it is software related.
Yes, it would.
I do not think it would be the laptop. The more likely cause would be the program itself.
I like to thank everyone for there help and bearing with the poor grammar thanks again
Happy Holidays