ohmio

Circuits / Sensors

Laser tripwire with a KY-008 and an LDR-LM393 module

The laser's light adds to the room's for the light sensor; cut the beam and only the room is left: DO goes high, the transistor conducts and the LED lights (with the trimmer at 0.1 it only works in a room under about 410 lx; the figure depends on the photoresistor)

Laser tripwire with a KY-008 and an LDR-LM393 module, simulated on a breadboard

Tap a part to see its voltages and currents. It is a model, not a measurement.

What do you need?

The AliExpress links are affiliate links: if you buy through them ohmio.dev gets a commission, at no extra cost to you. Affiliate links

This page is a guide: the numbers come from a simulation, and real parts vary. Check your parts before you power the circuit. Safety and responsibility

How does a laser tripwire notice that the beam was cut?

The KY-008 laser shines on the photoresistor of the LDR-LM393 module. With the beam on, the photoresistor drops to about 120 Ω, AO sits at 0.06 V, under the 0.50 V the trimmer sets, and DO is low. Cut the beam and only the room's 50 lx is left: the resistance rises to about 4.8 kΩ, AO climbs to 1.63 V, the LM393 comparator flips and DO goes high, 3.66 V. That feeds a 2N3904 through R1 (22 kΩ): the base takes 0.13 mA, the transistor saturates and the red LED lights at 6.7 mA. With the trimmer at 0.1, the model switches at about 410 lx, so a brighter room hides the cut, and a real photoresistor moves that figure. Adjust the trimmer in the room where you will use it. Never point the laser at eyes, or at mirrors that could send the beam there.

Values from the Protoboard ISO simulation: a model, not a bench measurement.