creating a pulse on state change with a comparator - Page 1
Forum section: electronics / beginners

author: Simon
author_rank: Unknown
timestamp: November 27, 2010, 12:30:47 pm
content: Hi guys, I'm trying to generate a pulse, so when a signal goes high a pulse of "x" ms is produced, preferably using a comparator. Any ideas ?

author: Hypernova
author_rank: Unknown
timestamp: November 27, 2010, 12:47:09 pm
content: On your mcu:-rising edge interrupt on input,-on trip turn output high and start a timer, set over flow interrupt when timer counts to your desired time.-on trip of overflow interrupt turn output off.Gives you guaranteed timing to within microseconds even when in multi threaded environment.

author: Simon
author_rank: Unknown
timestamp: November 27, 2010, 01:30:08 pm
content: yes but I don't want an MCU in the design, this is strictly non MCU I've already designed an MCU version but feel like flexing the analogue muscles

author: Zero999
author_rank: Super Contributor
timestamp: November 27, 2010, 01:45:58 pm
content: I don't know why anyone would use an MCU for such a simple task when it's likely to be more expensive.I'd probably use the CD4013 or its HC equivalent, a resistor, diode and a capacitor.It should be possible to use a comparator though.A hex inverter logic IC is another possibility.

author: Simon
author_rank: Unknown
timestamp: November 27, 2010, 02:13:12 pm
content: erm forgot to specify I am talking about a single impulse, which would need to reset and got again should another high to low transition occur

author: DaveW
author_rank: Frequent Contributor
timestamp: November 27, 2010, 02:36:48 pm
content: How accurate does the pulse need to be? A 555 monostable can be triggered with a midpoint comparator, and can produce ms second pulses (think it can go down to 10uS or so)?If not, putting the pulse into the set input of an RS FF, and then a delayed pulse into the reset can work well-can use a series of not gates to provide a delay down to very high accuracy/repeatability. Although you'll probably get more drift that using an MCU with a good xtal oscillator

author: Simon
author_rank: Unknown
timestamp: November 27, 2010, 02:42:53 pm
content: Well accuracy is not problem as it's to trigger a latch relay so 30-50 ms range is fine. my intention was to keep it very simple but perhaps that's not possible.I have the MCU design (but yet to be verified) but wanted to see if I could do it all in discrete parts.

author: armandas
author_rank: Frequent Contributor
timestamp: November 27, 2010, 03:03:09 pm
content: Quote from: Simon on November 27, 2010, 02:42:53 pmIt is possible. You can do it with three components: monostable multivibrator, resistor and a capacitor.

author: Simon
author_rank: Unknown
timestamp: November 27, 2010, 03:12:58 pm
content: right, basically the total operation I'm looking for is as follows: two pulse generator circuits (single shot) when the voltage transitions from low to high I will get a pulse from one circuit, when it transitions from a high to low I will get a pulse from the other one.I'll have to have a think and a tinker I think, as I'm already using comparators I was hoping to use a stage from a quad chip

author: Time
author_rank: Frequent Contributor
timestamp: November 27, 2010, 07:13:57 pm
content: Monostable multivibrators that I have used only send pulses on rise or fall edges and not both. Something tells me there is something in AoE that would help with this though.

author: oPossum
author_rank: Super Contributor
timestamp: November 27, 2010, 07:39:26 pm
content: I think the 74HC123 dual retriggerable monostable multivibrator can do what you need.http://www.nxp.com/documents/data_sheet/74HC_HCT123.pdf

author: qno
author_rank: Frequent Contributor
timestamp: November 27, 2010, 09:49:44 pm
content: You could do this by putting the pulse on the + input of the comparator and use an RC network to delay the pulse. Feed the capacitor voltage back to the - input.You have 2 problems.You need a pulse lower than the supply voltage of the comparator. Or else your comparator will never switch back, or you could divide down the pulse voltage or clip it with a zener or bandgap.Your pulse must remain high during the complete delay time.If you have a short pulse you do AM or Peak detection.Put the pulse voltage in a capacitor via a diode and feed this in the +of the comparator.Put a ref voltage on the - and adjust it for the right time. You can also use a discharge resistor over the capacitor or over the diode.

author: Zero999
author_rank: Super Contributor
timestamp: November 28, 2010, 10:04:05 am
content: Quote from: oPossum on November 27, 2010, 07:39:26 pmAgreed, that looks like the simplest solution so far. Also note the price, it's much cheaper than even the cheapest MCU and is why such components are still used for simple circuits.