Pulse stretcher circuit needed

So I have a SPLC that's infrequently outputting ~ 100uS positive-going pulses on a few pins, and on two of the lines I'd like to stretch that pulse out to blink an LED for the user to confirm activity.

Here is my nice-to-have constraint, I have four comparators in the device (GreenPAK) that aren't currently being used for anything.

The non-inverting inputs are on a pin with configurable pull-up/pull-down/float, and the inverting input voltages can be adjusted, along with selectable hysteresis from a couple low mV-range values. And the outputs can be configured open-drain or push-pull, and out to a pin, also with configurable pull-up/pull-down/float.

Unfortunately it's not possible to configure them as inverting so easily so if this task can be done with just passives and non-inverting comps with those constraints and put those comps to a purpose, that'd be awesome, any suggestions appreciated!

Reply to
bitrex
Loading thread data ...

One approach would be to hang a parallel RC on one of the comparator's + input pin, drive the LED from its output to ground, and turn it on by transiently pulling the input high (use a second tristate pin if you can't make the comparator input a logic output once in awhile).

...

3state (cap discharged) output HIGH (100 us) 3state (cap discharges, LED ON) 3state (cap reaches threshold, LED OFF) 3state (cap discharges) ...

Cheers

Phil Hobbs

Reply to
Phil Hobbs

tirsdag den 28. november 2023 kl. 20.47.00 UTC+1 skrev bitrex:

diode into cap with pull-down, on comparator's + input

Reply to
Lasse Langwadt Christensen

Yeah, that's a neat idea! I hadn't thought of twiddling with the 3 state pins. Pins can be configured as analog IO or digital IO but not analog in/digital out, but I think I have some spare 3 state digital IO lines I can abuse for that purpose.

There are two-comparator solutions that I've seen that first use an open drain output to discharge a series RC but this saves some parts

Reply to
bitrex

You can do a bunch of semi-analog things like that by bodging the pull up/down and 3state controls.

It’s sort of like the uC equivalent of the 555. ;)

Cheers

Phil Hobbs

Reply to
Phil Hobbs

A hack I've used a couple times to squeeze a bit more logic out of these (they don't have much, and AFAIK there's no VHDL-like compiler for most of the chips so you're sometimes on your own on the minimization front), is use the 3 state control as some extra decode logic between a state machine and an open-drain output; the way these chips are if the product-of-sums equation for the active-high formulation of the logic has an isolated term, you can send that one to the the 3-state control and then make that term a "don't care" for some inputs of the active-low truth table.

Reply to
bitrex

Or rather toggle the pin from an open-drain output to an input, which effectively also just makes it high impedance, if nothing is actually connected to the input internally

Reply to
bitrex

Crude approach: use the positive pulse to charge a capacitor (through a diode), and bleed a microamp of capacitor current through a resistor to a darlington base (emitter grounded). The darlington collector then drives your LED until the capacitor goes flat (base resistor to GND recommended).

Obviously, if V_pulse is high enough, the darlington could be an NMOS, or if it's low, the darlington could be one of those 1000-beta transistors that are in the catalogs but never useful.

Reply to
whit3rd

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.