Shop OBEX P1 Docs P2 Docs Learn Events
Boe-Bot's IR Sensors — Parallax Forums

Boe-Bot's IR Sensors

arnoldgallowsarnoldgallows Posts: 3
edited 2015-01-02 07:34 in Robotics
I need help with my IR Sensors! After running the TestLeftIrPair.bs2 on my Boe-Bot, the terminal says "irDetectLeft = 1" and it stays 1 no matter what I put in front of them. I've rechecked the program and all the breadboard connections and they all look correct.

Has this happened to anyone else? Any help will be appreciated.


Thanks,
Arnold

Comments

  • Steph LindsaySteph Lindsay Posts: 767
    edited 2010-06-14 19:59
    Hi Arnold, and welcome to the Forums.

    Yes this has happened to others! Here's a few things to check, that I've seen happen at Educator's Courses.

    Seeing a constant 1 in the Debug Terminal means the IR receiver is not seeing the infrared light flashing at 38.5 kHz.

    Wiring recheck: You can check your wiring easier if you look at the book PDF online, it is in color and you can zoom in. It's a free download: go to www.parallax.com/downloads and click on the Stamps in Class link. It's the second book shown.

    Resistors: Make sure you are using the correct resistor value on the IR emitter on that side. If you accidentally use a 10K (brown-black-orange) instead of 1K (brown-black-red) the IR emitted will be very weak, and the system will seem very nearsighted.

    Make sure you have 38500 and not 3850 in your FREQOUT statement.

    Swapping components: Did you modify the program to see if you are getting a 0 reading on the right IR pair? If you are getting a 0 on the right, you know that both those components and those circuits are working. Now, try switching the two IR receivers. If the circuit on the left now works and the one on the right stops working, the problem is likely a damaged IR receiver. You can do a similar test by swapping IR LEDs too. If the swapping of components makes no difference, as in it still doesn't work on the left and does work on the right, the problem is likely in the circuit wiring on the left.

    Did you possibly put the IR LEDs in backward? That's easy to do once the LEDs are in their little black light shields and you can't see the flat spot anymore.

    Give these things a try and let us know how it goes.

    -Steph
  • arnoldgallowsarnoldgallows Posts: 3
    edited 2010-06-14 20:13
    Okay, I did everything you listed, but it's still doing the same thing. I tested the right pair and it too reads a constant 1. Is there a way to test if the LED's are flashing or not? Or if the IR Detectors are detecting?
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-06-14 20:47
    Yes. If you look at them with a digital camera, you can see the IR-LED's lighting up (if they ARE lighting).
  • ercoerco Posts: 20,255
    edited 2010-06-14 20:57
    Test your sensor: point almost any (known good) IR TV remote at your bot's sensor and see if you get an "irDetectLeft = 0" . You should get a random stream of 0s and 1s if your sensor is working. If that's the case, then focus on fixing your IR LED.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • arnoldgallowsarnoldgallows Posts: 3
    edited 2010-06-14 21:44
    Whoa the remote thing worked! So I guess the LED is fine?
  • ercoerco Posts: 20,255
    edited 2010-06-14 23:48
    No, that just proves that your sensor works and your IR LED is the problem. NOW try Steph & allanlane's suggestions to fix your IR LEDs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • KebooneKeboone Posts: 3
    edited 2015-01-02 06:00
    i 've had a similar problem with Testirleftpair not working. I was getting the IRdetectLeft = 1 unchanging in the Debug window. problem was that the IR LEDs were blinking white light. Thought this was strange as the text mentioned that the light shouldn't be visible to the eye. So I tested the IR sensor with the tv remote. it worked. the 1 changed to a 0 each time I moved my hand in front of it. Then I tried two other IR LEDs. One of them worked the other didn't. hmph. Possibly LEDS made into my kit. don't know where from though. Is it possible that the IR LEDs have gone bad?
  • PublisonPublison Posts: 12,366
    edited 2015-01-02 07:34
    Welcome to the forums!

    The Boe-Bot kit comes with four LEDs, two are IR, and two are Red LEDs. I don't remember there being a White LED in the kit. Maybe the wrong one was packed with the kit. I'm sure Parallax would send a replacement.
Sign In or Register to comment.