Fork me on GitHub

Project Notes

#675 LDR Data Slicer Trigger

Using a data slicer to extract a clean trigger signal from a light dependent resistor (LDR).

Build

Here’s a quick demo..

clip

Notes

LEAP#674 LDR Differential Comparator used a differential amplifier to extract a trigger signal from a light-dependent resistor.

There is a simpler way that just uses a single op-amp unit: a technique called a “data slicer”. It is described in PIC® MCU Comparator Tips ‘n Tricks.

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

The essential idea:

  • the op-amp is configured as a comparator between the input signal and a sliding reference derived from the input signal
  • the “sliding reference” is just the input signal passed through an RC low-pass filter (R3 + C1)
  • R4+R5 bias the reference low (a single resistor would have been fine - the pot just makes it convenient to experiment with adjustments)

bb

schematic

Test Results

bb_build

For the scope trace below:

  • CH1 (yellow): measuring the voltage at the base of the LDR
  • CH2 (blue): sliding reference
  • CH3 (red): output

A very nice solid pulse when the LDR is initially obscured.

scope

Credits and References

About LEAP#675 SensorsOpAmp
Project Source on GitHub Project Gallery Return to the LEAP Catalog

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

LEAP is just my personal collection of projects. Two main themes have emerged in recent years, sometimes combined:

  • electronics - 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
  • scale modelling - I caught the bug after deciding to build a Harrier during covid to demonstrate an electronic jet engine simulation. Let the fun begin..
To be honest, I haven't quite figured out if these two interests belong in the same GitHub repo or not. But for now - they are all here!

Projects are often inspired by things found wild on the net, or ideas from the many great electronics and scale modelling podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know (or send a PR!). See the individual projects for credits where due.