SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By angelsix
I'm trying to solve a simple solution elegantly with as few components as possible.

What I have is a 3V signal that when "off" is a constant 3V. When on it pulses to 0V for 100us, then back to 3V for 150us, then back to 0V over and over.

What I want is to have a constant output of 0V when the input is 3V, and 3V when it is pulsing high/low.

I can use an inverter to change the input to 0V constant, then pulsing high, and perhaps a cap at the output to then smooth that wave, but I was thinking instead of needing an inverter with 5 pin connections to perhaps something like a diode and capacitor to send the negative signals to the capacitor only, and the output in series with the cap, but I can't quite get my head around it - I sort of know what I want but not sure of its implementation.

Oh, and the output needs say 5mA but ideally 20mA output. The input provides that though if needed.
By rrpilot
Hey angelsix,

Here is a start, it at least provides the desired functionality. The circuit uses an op-amp at the end but that would just be replaced by a 74HC14 or 74AHC14 inverter, some of which can do up to 8mA in both directions (NXP 74AHC1G14GV,125 is one device that does). You could again buffer the output for more drive if necessary.

Let me know what you think.

Oh by the way, you didn't mention how quickly the output needs to return to 3V when off, the component values can be tweaked to speed the thing up a little bit.
You do not have the required permissions to view the files attached to this post.
By rrpilot
I forgot to include some more details...

The simulation shows the pulsing input as VG1 and the final output VM2 with a solid 0V. When the input is a solid 3V or "OFF" in your case, the output VM2 will goto 3V after about 1 ms. As I mentioned earlier you can tweak this a little bit if necessary.

Oh and just another side note, you're going to want a Schmitt trigger input buffer on the output of the transistor because of the slow falling time. A normal CMOS gate may oscillate while in the transition region.
By angelsix
Nice thanks. What simulation software have you used? I like the idea but its quite a lot of components I am trying to fit this into an incredibly small area and all hand soldering so want it really basic if possible.

Here is what I was thinking last night but I havent got any software to test it, and havent had the time just yet to actually put the bits together and give it a quick test, but do you think this will work?


My thoughts are that the diode D1 (which will be very low Vf so capacitor has almost all the supply voltage potential) will stop the input signals 3V from powering the LED constantly when the input is classed as off (3V), so only negative signals will get through.

So in this state the C1 cap when the input is off (3V) will see no potential to ground through there, and the LED (the output load) is 2.2Vf so the cap will be constantly charged to 0.8V potential at the state, if I am correct?

Then when the input turns on (starts pulsing 100us 0V, 150us 3V, repeated) then the 0V will be seen from the Cap to the inputs ground and so the cap will charge for 100us every 250us, at almost zero resistance (as its just a connection to a supply),and charge up to 3V - D1Vf (0.2V) = 2.8V, it should be enough to drive the load LED and hopefully carry on over the 150us until the next pulse.

I don't have enough knowledge in the area to know if my idea is flawed, so feedback anyone?
By rrpilot
I use TINA for the simulations which is free from Texas Instruments (, its sometimes not the most intuitive but I really like it.

So back to your problem... Currently your circuit has no DC path for the LED so it won't ever be able to turn on unfortunately, I'm sure there is some modification that could be made but I don't see it right now. I'll think about it for a bit and get back to you. Just to be clear, so you want an LED to turn on when the input is pulsing, and to be off when the input is sitting at 3V?
By angelsix
Yes that's correct. What I have is an LED connection that is constant high at the pos, and 3V at the neg when off, then when on it is pulsed to ground at around 10kHz. Now I don't want any pulsing I want pure 100% on time, so yes you are correct in what you are thinking. Thanks for your time.

For the circuit I can simply ignore the 3V pos connection and join the LED wherever I like, but the pulsed neg input is what I must use as it is the only indication of what the LED should be on.
By rrpilot
That definitely got me thinking about some different approaches but I can't come up with anything that avoids a buffer/amp on the output. I'm back to the first circuit I posted. These requirements make me think of configuring a 555-timer for one-shot mode but obviously that has more parts so I'm still pretty happy with the first circuit.