Threshold activated circuit

I'm trying to create a circuit that will pulse out (short pulse) whenever it passes a certain threshold going upwards and another one to detect going downwards. I was thinking of using delay to achieve this... but I dont know how to really go about it.

Any help would be appreciated, thanks in advance!

-
 comparator and a 555? – kenny Mar 29 '11 at 11:21 Is the threshold the same going up as it is going down? – endolith Mar 29 '11 at 14:46

Use a comparator to detect the treshold crossing. Apply this signal to both inputs of an XOR-gate, one directly, the other delayed. You can use a few gates to create the delay. The output of the XOR-gate will give a short positive pulse each time you cross the treshold. The width of this pulse is determined by the delay introduced by the gates. If you use slow logic like standard CMOS (CD4000 series) you'll get a few tens of nanoseconds per gate. If you need much longer pulses, then use this short pulse to trigger an MMV (monostable multivibrator).
Use an XNOR instead of an XOR-gate if you want negative pulses.

-
 Use an RC to create the delay on one input. electronics.stackexchange.com/questions/495/… – endolith Mar 29 '11 at 14:42 @endolith - If he uses a CD4030 for the XOR gate he has three spares which he can use for the delay. Saves a resistor and a capacitor! :-) – stevenvh Mar 29 '11 at 15:49 Resistors and capacitors are cheaper and smaller, no? They let you easily choose any pulse length you want, not just multiples of nanoseconds, and no need for external multivibrators. – endolith Mar 29 '11 at 18:56

Here is the circuit made out of two opamps:

Here is the simulation for Vthreshold = 1V

The width of the pulse can be set by value of C1 (the bigger, the longer). Output should be followed by something with high input impedance (CMOS logic, or another opamp), otherwise it will distort the pulse.

-

I'd use a small MCU, like a PIC, which has a comparator. The software will be quite trivial. It has the advantage that it's a one-chip (and two resistors) solution, and should be cheaper than the other proposed techniques. It would also be a lot more compact, if one of the tiny PIC10F200 six-lead devices was used.

-
 Why the down vote? It's a viable approach. – Leon Heller Mar 29 '11 at 14:56 I agree - this is not a "not useful" answer. Compensatory upvote. – JRobert Mar 29 '11 at 15:49 It's an idea. I don't think it will be cheaper than a comparator + a CD4030, but it will be smaller like you said. Anyway, I didn't downvote it! :-) – stevenvh Mar 29 '11 at 15:52 Given the price of that PIC, it may actually be cheaper (production, not development). – Jaroslav Cmunt Mar 29 '11 at 16:14 The 10F200 costs 0.48 (one off). The CD4030 costs 0.55 and the comparator will cost about the same! By the time they are put on a PCB the cost will be much greater. Those small PICs are often used to replace the old 555 timer, these days. – Leon Heller Mar 29 '11 at 16:15