Fork me on GitHub

Project Notes

#674 LDR Differential Comparator

Using a differential amplifier to extract a clean trigger signal from a light dependent resistor (LDR).

Build

Here’s a quick demo..

clip

Notes

LEAP#034 LDR Comparator used a Wheatstone Bridge to measure changes in ambient light and provide a signal that could be used as a low/high light trigger. While the Wheatstone Bridge allows the output signal offset to be independently set, it is a sensitive signal and prone to “bounce” if used as a trigger.

The circuit I’m testing here filters out much of the noise by measuring the first order derivative of the LDR. It comprises:

  • first op-amp stage configured as a differential amplifier
  • seconds op-amp stage configured as a comparator, to exclude changes below a preset threshold

The circuit is based on electronut.in’s notes: Designing an Op-Amp Circuit to Detect LDR Pulses

Circuit Design

I’m using LDR 5528 which is specified as dark: 1MΩ, light: 8-20kΩ.

bb

schematic

Test Results

bb_build

For the scope trace below:

  • CH1 (yellow): measuring the voltage at the base of the LDR
  • CH2 (blue): differential amplifier output
  • CH3 (red): comparator output

A nice solid pulse when the LDR is initially obscured.

scope

Credits and References

About LEAP#674 SensorsOpAmp

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

Project Source on GitHub Return to the LEAP Catalog
About LEAP

LEAP is my personal collection of electronics projects - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know or send a pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader