4

I have a signal that changes from high state to low every few minutes, after changing state it will remain constant, all level changes are clean.

I'm looking for the smallest possible circuit that can detect a rising edge and falling edge (could be two different circuits) and will output a pulse when the edge is detected.

Ideally, I'm looking for a single circuit that will output a positive pulse when one type of edge is detected and a negative pulse when the other type is detected.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
user34920
  • 1,872
  • 2
  • 22
  • 44

5 Answers5

7

The simplest circuit that meets the stated requirements is an R-C differentiator:

schematic

simulate this circuit – Schematic created using CircuitLab

input and output waveforms

Dave Tweed
  • 168,369
  • 17
  • 228
  • 393
  • How can one suppress the pulse on the falling edge? -- I tried adding a diode, but the simulation still shows a negative pulse. – A Sz Nov 24 '16 at 11:21
  • @ASz: If an ordinary diode does not work well enough for you, you could try an active [precision half-wave rectifier](http://electronics.stackexchange.com/q/162940/11683) circuit. – Dave Tweed Nov 24 '16 at 12:29
  • @ASz if you add another resistor (e.g. 10K) after the diode, across the output, the negative spikes disappear. There needs to be some current flowing through the diode. – tcrosley Dec 20 '16 at 00:20
  • @tcrosley Ah, thanks! I was not aware how exactly the measuring points in the simulation work. Makes sense! – A Sz Dec 21 '16 at 07:57
  • How can I then convert the negative pulses to positive ones? – matteo Feb 13 '20 at 19:52
5

A CD4098 dual one-shot will meet all your stated requirements and is very cheap and available. It can operate from 9V, trigger on either the rising or falling edge, and provides positive or negative going pulses. An R-C pair sets the pulse duration for each half of the chip.

enter image description here

Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842
  • Note that you have not fully answered the question. You can trigger one section on the rising edge, and the other on the falling, but the two need to be combined. If you don't address this, the poster may think he can do both functions with a single section, and that won't work. – WhatRoughBeast Jun 18 '16 at 15:05
  • @WhaRoughBeast That interpretation makes no sense to me- how can the output idle high and low at the same time? So I assume two outputs. OP can comment if that is incorrect. – Spehro Pefhany Jun 18 '16 at 15:10
  • You stated "trigger on either the rising or falling edge", and since the OP clearly hasn't much experience, he might think this means that a single section could trigger on either FOR TJHE SAME CONFIGURATION. It doesn't make sense to you, but that's because you know what you're doing. It's the difference between inclusive or and exclusive or. And speaking of which, why not suggest an XOR gate with an RC on one input? – WhatRoughBeast Jun 18 '16 at 15:16
  • 1
    @WhatRoughBeast Thanks for assuming I don't understand. – user34920 Jun 18 '16 at 15:37
  • @user34920 - No offense intended, but there was no way to be sure, and I just wanted Spehro to avoid the possibility. And, by the way, did you think that a singe section could be configured to trigger on either edge polarity? – WhatRoughBeast Jun 18 '16 at 15:42
2

Search for flip flops. They do exactly what you want and can be very small and cheap.

If you put 5V on the D wire, your signal that changes every few minutes on the clk and Q on the reset, Q will give a 5V pulse when a rising edge has been detected.

That is ofcourse if your signal is around 5V.

Flip flop

Casper Vranken
  • 575
  • 5
  • 16
0

You could use a flip flop of course but if you want a "pulse" you can try a high-pass circuit in series with a monostable multivibrator implemented with a schmitt trigger.

Simus994
  • 152
  • 6
  • How can this generate two types of pulses fitted for the two edges? – user34920 Jun 18 '16 at 10:02
  • For the rising edge it does work. For the falling one you have to build an other circuit in parallel that sums 5V to the negative spikes, and in series you could use an inverting ST... Then, you can OR the two sources of pulses – Simus994 Jun 18 '16 at 10:08
0

Positive edge with relay.

schematic

simulate this circuit – Schematic created using CircuitLab

Marko Buršič
  • 23,562
  • 2
  • 20
  • 33