Laser beam detector

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
+
|
-----o--------------------------------------o-----------
| |
.-. |
100K | |<----------- |
Lin | | | 10K |
'-' | ___ |\|
| '-|___|--|-\
| | >------o--------------------o Output
| o----------o-------|+/ |
| CDS In | |/| V -> LED
| 500K-3K .-. | -
| | |1K | |
| | | | |
| '-' | .-.
| | | | | 470 Ohm
| | | | |
| | | '-'
| | | |
-----o--------------o---------o-------o----o-----------
|
===
GND

(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)

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
computer.

Thanks,
Steve
 
On 5 Sep 2005 08:52:01 -0700, kasterborus@yahoo.com wrote:

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
+
|
-----o--------------------------------------o-----------
| |
.-. |
100K | |<----------- |
Lin | | | 10K |
'-' | ___ |\|
| '-|___|--|-\
| | >------o--------------------o Output
| o----------o-------|+/ |
| CDS In | |/| V -> LED
| 500K-3K .-. | -
| | |1K | |
| | | | |
| '-' | .-.
| | | | | 470 Ohm
| | | | |
| | | '-'
| | | |
-----o--------------o---------o-------o----o-----------
|
===
GND

(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)

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
computer.
---
Not if it doesn't work, it's not! ;)

How is the LDR connected in the circuit and what's the part number
of the active device?

--
John Fields
Professional Circuit Designer
 
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.

Steve
 
On 5 Sep 2005 09:49:24 -0700, kasterborus@yahoo.com wrote:

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.
---
Redrawing your schematic for convenience:

+5>---+-------------+-E1
| |R1
| [LDR]
| |
| E2-+----|+\
|R3 R4 | | >--
[100K]<---[10K]--|----|-/
| |R2
| [1k]
| |
GND>--+-------------+




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:


+5V
|E1
|
[R1]
|
[100k]<---E2
|R2
|
0V

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

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:

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

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.


--
John Fields
Professional Circuit Designer
 
Wow!

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

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

Steve
 
In article <1125935521.451969.32480@g43g2000cwa.googlegroups.com>, kasterborus@yahoo.com wrote:
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
+
|
-----o--------------------------------------o-----------
| |
.-. |
100K | |<----------- |
Lin | | | 10K |
'-' | ___ |\|
| '-|___|--|-\
| | >------o--------------------o Output
| o----------o-------|+/ |
| CDS In | |/| V -> LED
| 500K-3K .-. | -
| | |1K | |
| | | | |
| '-' | .-.
| | | | | 470 Ohm
| | | | |
| | | '-'
| | | |
-----o--------------o---------o-------o----o-----------
|
===
GND

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...
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.

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
computer.
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 :)

Bye.
Jasen
 

Welcome to EDABoard.com

Sponsor

Back
Top