Shop OBEX P1 Docs P2 Docs Learn Events
Ch 8 IR Distance Range — Parallax Forums

Ch 8 IR Distance Range

bmcnichobmcnicho Posts: 40
edited 2014-01-26 12:55 in Learn with BlocklyProp
I am going through the Robotics with Boe-Bot book to prepare for teaching a class at our homeschool co-op. My knowledge of electronics is very limited and very rusty. My EE college classes seem so long ago....

I am getting ranges from 13" to 20" for zones 0 to 5 on the left IR LED, and 11" to 36" on the right IR LED. From the text in the book, it seems that these distances are too great. Is this a problem? What about the large discrepancy between left and right?

I am using a 1k resistor.

Thanks for your help,
Diane

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-12-31 09:33
    There are often differences between sensors. The IR LED are very sensitive to the angle where they are pointed are you sure they are both at the same angle?

    The "distance" isn't really "distance" but brightness. So a white item which reflects IR well will appear closer than a dark item (if I'm remember the sensors correctly).

    You can always adjust the distance readings with software if they are causing a problem with navigation.
  • edited 2013-12-31 12:18
    The robot following application does not require much precision. In fact, a vague notion of the distance is all we really get, and that seems to work well. The easiest way to equalize forward distance measurements for directly in front of the Boe-Bot is to point the farsighted IR LED further to the right (or left), and point the nearsighted one more straight ahead. That's usually good enough to make the Boe-Bot follow your hand, or a box, book, or other robot. Another option would be to try a 470 ohm resistor in series with the 1 k on the side that's farsighted. Last resort would be to sweep different frequencies on different sides. This can be really time consuming because the response to a small change in frequency isn't as linear as you'd expect. So finding the right frequencies for each given distance takes a lot of experimentation.

    That said, it would still be interesting to find out which part is the culprit. Here are some things you could try if you'd like to narrow down the search:

    First try swapping left and right resistors, then left and right IR LEDs, then left and right receivers. Make sure to cut power during each swap, and re-test between each swap. That can help narrow down whether one of the resistors is smaller than the other, if one of the LEDs happens to be brighter, or if one of the sensors is more sensitive.

    If the same side is still more sensitive after all the swaps, try running VDD and VSS (GND) wires directly to each IR detector power input. In other words, instead of having the right IR detector powered in series after the left, make sure they are both getting parallel power with wires directly to VDD and VSS. This will help equalize any effect switching noise might have on the detectors through their power inputs.

    The other cause if the sensitivity did not follow any part would be that one I/O pin driving one IR LED has more output resistance than the other for some reason. Testing this would involve disconnecting the resistor to the IR LED and connecting an 220 ohm resistor between that I/O and VSS, and then sending a high signal and measuring the I/O pin voltage. A 220 ohm resistor should pull the I/O pin's high output voltage down measurably. If the voltage is lower on the I/O pin that's driving a more nearsighted circuit, that could explain it.
  • bmcnichobmcnicho Posts: 40
    edited 2014-01-17 08:49
    It sounded like this would not affect the program, so I just ignored it and went ahead. Thanks for your help!
  • John KauffmanJohn Kauffman Posts: 653
    edited 2014-01-26 07:46
    I've taught about 20 classes with BoeBot. Ir emit/sense are almost always different. Andy's ideas above will solve.
    Check out www.BoeBotTeacher.com for some videos that might help your students with understanding turns and the corner-escape problem.
    Getting a kit of assorted resistors gives you some finer adjusting of Ir in hardware. They are also useful for students that want some more experiments with RCTIME. Sample: http://www.amazon.com/Metal-Film-Resistor-Assorted-112ValuesX10pcs/dp/B006CEY8F6 Or I am glad to send you a few each of 20 kinds.
    I find the line-following activity difficult because of physical location of sensors. I only use if extra time. However, I am designing a paper template that folds and fits on the front like a bumper and has holes to mount the sensors right down near the paper. I was stuck on a cheap, easy, solder-less way to connect leads back up to breadboard. Now P'lax has item of jumpers so easy to get http://www.parallax.com/product/800-00048
  • edited 2014-01-26 12:55
    Thanks for the tips John. About skipping the line following in Chapter 8, Activity #3, I developed an activity to replace it: http://forums.parallax.com/showthread.php/153264-Fine-tuning-Boe-Bot-line-maze-(ch-8)?p=1237223&viewfull=1#post1237223. The tentative plan is to remove that activity and add this one near the end of Chapter 7. In your next Boe-Bot class, and if time permits, we'd certainly appreciate your, bmcnicho's and other teachers' feedback on how it went with the students. We'll also post a notice to this forum as soon as more detailed instructions for track following have been posted to learn.parallax.com.
Sign In or Register to comment.