Connect with us

Laser beam detector

Discussion in 'Electronic Basics' started by [email protected], Sep 5, 2005.

Scroll to continue with content
  1. Guest

    I've been trying to build a circuit to detect if a light beam is broken
    falling on a CDS cell.

    I'm using the following circuit

    VCC 5V
    | |
    .-. |
    100K | |<----------- |
    Lin | | | 10K |
    '-' | ___ |\|
    | '-|___|--|-\
    | | >------o--------------------o Output
    | o----------o-------|+/ |
    | CDS In | |/| V -> LED
    | 500K-3K .-. | -
    | | |1K | |
    | | | | |
    | '-' | .-.
    | | | | | 470 Ohm
    | | | | |
    | | | '-'
    | | | |

    (created by AACircuit v1.28.6 beta 04/19/05

    In theory I should be able to tweak the pot so that the LED goes off -
    does this look right? Trouble is I can't get the LED to go off. It
    stays on...

    Also I'm assuming that the output of this circuit is suitable for
    attaching to Digital IO board and sensing the state of the pin with the

  2. John Fields

    John Fields Guest

  3. Guest

    It's connected between +5V and the CDSIn connector.

    The opamp should be part of an LM3900 IC - but all radio shack had was
    an LM324.

    I do have a 741 as well.

  4. John Fields

    John Fields Guest

    Redrawing your schematic for convenience:

    | |R1
    | [LDR]
    | |
    | E2-+----|+\
    |R3 R4 | | >--
    | |R2
    | [1k]
    | |

    With a +5V supply, the LM324 has a common mode range of from 0V to
    (V+) -2v, which means that you've got to keep both inputs between
    0V and +3V for the thing to work right. With an LDR low resistance
    of 3k and R3 equal to 1k, the voltage on the non inverting input of
    the opamp will be:

    E1R2 5V * 1kR
    E2 = --------- = ----------- = 1.25V
    R1 + R2 3kR + 1kR

    with the LDR fully illuminated and its resistance at 3k ohms.

    With the LDR less than fully illuminated its resistance will always
    be less than 3000 ohms, and the voltage on the + input of the opamp
    will always be less than the common mode limit, so you'll be
    unconditionally safe there.

    Now, in order to trip the circuit, all you have to do is to adjust
    the pot to provide an output somewhere between 0V and less than
    1.25V, 1.25V being the point where the LED will never turn ON and 0V
    being the point where it will never turn OFF.

    In order to get a greater range of control and to keep the output of
    the pot below the common mode limit, you might want to increase the
    value of R2 to where E2 will be just under 3V with the LDR at 3k.
    For 3V that value would be:

    E2R1 3V * 3kR
    R2 = ------- = ---------- = 4500 ohms
    E1-E2 5V - 3V

    so a good choice would be something less than that, and I'd use a
    3.9kohm +/- 5% carbon film just to make sure I stayed well below
    the common mode limit.

    Also, to limit the range of the pot while increasing its
    sensitivity, (angle of rotation) you could do this:


    For E2 to be less than the common mode limit, 3V, R1 would have to

    R2(E1-E2) 100kR (5V - 3V)
    R1 = ----------- = ----------------- = 66.667k ohms
    E2 3V

    To make sure that you don't go over 3V out you should make R1 a
    little larger than 66,667k, and the next largest 5% value is 68k, so
    that would probably be OK. You might want to go back and check all
    the numbers with the tolerances of the various components in mind.

    So, your final circuit comes out looking like this:

    | |
    [68k] [LDR] +---[1M]--+
    | | | |
    | +----+---|+\ |
    | | | >--+---->OUT
    [100K]<--[10K]---|--------|-/ |
    | | LM324 [1.5k]
    | [3.9k] |A
    | | [HLMP4700]
    | | |

    I've added a little hysteresis to keep the output from chattering as
    the + input goes through the trigger point, and also used a
    high-efficiency LED to allow more output current from the opamp into
    whatever OUT is feeding.
  5. Guest


    Thanks for your time - I really appreciate the detail of your answer.

    I'll let you know how I get on...

  6. Guest

    That works!

    Thanks again.

  7. Jasen Betts

    Jasen Betts Guest

    you need to connect the other terminal of your CdS cell to the +5V
    (or connect the 1K resistor between +5 and the input)

    also ensure you have an op-amp that's suitable for 5v (or +/- 2.5v)
    operation (many aren't including the popular LM741) fortunately the LM324 is
    and they're common as dirt. so you shouldn't have much trouble getting one.
    No. at certain light levels the op-amps output can be an undecided voltage
    between the the two desired states (and that can be bad for some digital
    circuits), to cure this connect a 220K resistor from output the to the
    op-amps non-inverting input, this will introduce hysterisis making the
    output snap from "off" to "on" and vice versa instead of meandering
    with that modification it should be fine to attach to a digtital input.

    you don't need a special IO board, you can hook this up to one of the the
    joystick port's fire button terminals (if it's vacant) there's even a
    handy +5v supply there... just don't short circuit the 5V supply it tends to
    ruin the ribbon cable behind the socket :)

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day