Shop OBEX P1 Docs P2 Docs Learn Events
IrHeadlights question — Parallax Forums

IrHeadlights question

Erik632Erik632 Posts: 5
edited 2010-05-08 00:21 in BASIC Stamp
Hey I was wondering what resistor to use if I want the object to be pretty close close as I can without hitting when it turns thx in advance

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-05-04 01:54
    You would make that change in the code, not with a resistor. The code knows how far away you are so you decide when the bot should turn.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Erik632Erik632 Posts: 5
    edited 2010-05-04 02:57
    What changes would I make? Sorry I'm very new at this
  • Spiral_72Spiral_72 Posts: 791
    edited 2010-05-04 15:05
    What are you using for the receiver and emitter?

    If it's an actual tuned detector device, you'll probably have to consult the datasheet. If it's component stuff, in my experience the amplitude (voltage) was a rough corresponded to distance the Ir traveled..... and the Ir reflectivity of the material it bounced from, power output of the emitter...etc.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "puff"...... Smile, there went another one.
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-05-04 17:30
    Somebody very clever once discovered -- if you're building an IR-LED to IR-detector circuit, it has maximum sensitivity when using FREQOUT IR_Pin, 1, 38500. If you use FREQOUT IR_Pin, 1, 40000 then there's less IR energy in the 38500 band, and the detection distance is less. This is sometimes called "off-tuning the emitter", because the LED isn't putting out exactly the frequency you want anymore -- which is good, that lowers the detection distance, which is what you want.

    So, do an experiment where you try 20K, 30K, 38.5K, 40K, 42K -- and see how the ranges change.
  • ercoerco Posts: 20,256
    edited 2010-05-05 08:15
    Per the first responders here, it's much more flexible to make a change in software than hardware. But to answer your original question, yes you can decrease your triggering range by increasing the series resistor to your LED emitter. The exact value for your situation will have to be determined by experimentation, but try twice the original value, then 50% more than the original value, to get a feel for it. You could also add a series potentiometer to the original resistor to make it adjustable.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2010-05-05 21:43
    You can see step-by-step examples of how to do what allanlane5 is talking about in Chapter 8 of Robotics with the Boe-Bot, (a free download) using an infrared LED and IR receiver. You can also take a look at Appendix G· - Tuning IR Distance Detection to figure out what the frequency sensitivity is of your particular receiver.·

    You can see an example that uses difference resistance values as erco mentions, in the Stamps in Class Mini Project "Better IR Distance Detection" which is posted here:

    http://forums.parallax.com/showthread.php?p=561496

    I hope this helps get you on your way!

    -Steph
  • Erik632Erik632 Posts: 5
    edited 2010-05-08 00:21
    thanks
    hop.gif
Sign In or Register to comment.