Fork me on GitHub

Project Notes

#488 XOR-RC Edge Detector

Dual edge detection with a 74LS86 XOR and RC circuit.


Here’s a quick demo..



A XOR gate can be used as an edge detector by feeding it with two signals:

  • the original input signal
  • a modified version of the input signal, containing delay or hysteresis

One way of doing this is to put and RC filter on the second input. That’s the circuit demonstrated here: where a 10kΩ and 1µF RC filter yields a 10ms time constant. Increasing the time constant will increase the minimum ouput pulse width, and also acts as a de-bouncing trick.

Another technique is to rpelace the RC filter with an even number of inveters, the idea being that propagation delay in the inverters produces the differential input to the XOR gate. Note: I’m using a 74LS86, and configuring some of the XOR units as inverters “works” but only very poorly as the <23ns propagation delay only produces a very weak pulse when an edge is detected.


The scope trace below shows the pulses generated on the rising and falling edge of the input.

  • CH1 (yellow) - output
  • CH2 (blue) - input signal
  • CH3 (red) - filtered input signal



I’m using a 74LS86 Quad 2-Input Exclusive-OR Gate in this demo.




Credits and References

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.