Shop OBEX P1 Docs P2 Docs Learn Events
Help please !!!! — Parallax Forums

Help please !!!!

SelvesterSelvester Posts: 2
edited 2009-02-06 22:25 in Robotics
Please advice me on how to increase LDR sensitivity in Boe-Bot. I am actually trying to make my robot pause whenever a light is detected in normal lightning environment. I have tried reducing the 2KOhm Resistor in the attached circuit photo 470Ohm with not much of a difference, the light has to be too close to the LDR for it to indicate light detection.

I would highly appreciate any help.
bmp
210K
a.bmp 209.6K

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-04 21:50
    LDRs have a higher resistance in lower light levels. The resistance drops when the LDR is illuminated. What you have is a voltage divider and the upper and lower legs need to be in the same ballpark to get best sensitivity since the Stamp's switching threshold is about 1/2 Vdd. You need to increase the value of the fixed resistor, not decrease it. Get an inexpensive multimeter if you don't have one. RadioShack sells a variety of these and they don't have to be expensive with all kinds of bells and whistles. It only has to measure resistance (and, to be useful, voltage and current). Measure the resistance of the LDR in the sort of environment that you want to use it in and choose a fixed resistor roughly the same value. That should help.
  • UghaUgha Posts: 543
    edited 2009-02-04 22:09
    Another option would be to use a capacitor and RCTIME to get a more exact reading on the CDS cell.

    I believe this is mentioned in the Robotics with the BOE-BOT book.
  • ercoerco Posts: 20,256
    edited 2009-02-04 22:44
    To increase your resolution and useable range, use your photocell (LDR is a pompous and unnecessary acronym) with a 0.1 uF or smaller cap in an RCtime circuit arrangement instead of using the photocell as a voltage divider. You'll get a variable that you can compare to a threshold value of your choosing. This is far better than trying to adjust a voltage divider to trigger at the stamp's ~1.3V switching threshold. For even better electrical and directional sensitivity, use a phototransistor instead of a photocell. Even the "Shack" carries high-sensitivity phototransistors that work well. But unlike photocells, they are semiconductors and have a polarity to follow. See http://www.seas.upenn.edu/~robo2005/Electronics%20Lab%202%20v6.doc·for good info on hooking up & using several different sensors, including a phototransistor..

    Edit: Good call, Ugha. You·beat me to it while I was momentarily distracted!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."

    Post Edited (erco) : 2/4/2009 11:29:53 PM GMT
  • ercoerco Posts: 20,256
    edited 2009-02-05 00:31
    If you are determined to stick to your original voltage divider arrangement, you could try one or both of these methods to increase your sensitivity and useable range:

    1) Invert your voltage divider; swap the photocell and fixed (2K) resistor. Now you can increase the value of the fixed resistor (now connected to Vdd) to drive the divider voltage down closer to the transition voltage (1.3 volts). Now your high/low transitions will be reversed, so you will have to modify your software.

    2) Try different photocells that may be more sensitive. You can also put two or more photocells in series to achieve a larger resistance range to a given light range, which also yields higher sensitivity.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-02-05 00:53
    In the future please try to use a descriptive subject line for your posts. This will help others determine if they can help you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • SelvesterSelvester Posts: 2
    edited 2009-02-06 22:25
    Mike, Ugha and erco; thank you very much guys for your contributions. I really appreciate you kind, useful and fast response. I will modify the current circuit as per your suggestions and choose the best suitable.
    Chris, please accept my apologies, I assure you that it will not happen again.

    Regards
Sign In or Register to comment.