How can I send a single pulse when the input is a constant ON?

Hi @titanium,
This is the Timeout bit i17 diagram:


1 Like

WoW man…
You are a REAL life saver…
How could they put all that stuff in that little piece!
Is the 555 IC under the board?

Thanks man :+1:

1 Like

Thanks @titanium,
Indeed the 555 is the small smd (surface mounted device) version mounted under the board…

1 Like

I’m asking way more questions than I expect someone would answers…
But please guide me through this one too!
I just need the “on-off” mode. How can I simplify the circuit?
Can you please show me which parts can be omitted?
Is my modified version right?

Or I still need the 10K resistor between LV321SOT23-5 and VCC? Like this:


Hi @titanium,
I think the littlebits diagram has indeed more components than you need, the opamps are part of the standard input/output design of all the littebit bits. I will try to make a diagram with the “normal” 555 IC with less components to make a single 3 sec. pulse with the ON/OFF button as described above, but it will take me a few days, so stay tuned…

1 Like

It is very kind of you.
Ofcourse i’ll stay tuned…
Just please make sure the output pulse activates both when input switch goes ON and when it goes OFF too, exactly the way you have shown in your video…

I just tried the circuit without those opamps. No success
As soon as my hand goes near the Trigger wire LED goes on!!! Even I haven’t touched it…


1 Like

Hi @titanium,

After a few tryouts and failures I found a nice solution…
As you also noticed the NE555 trigger input is very very noise sensitive…

I recreated the Littlebits timeout bit without the opamps and added the differentiator as discussed earlier. The differentiator is connected to the trigger input from the NE555 via a capacitor (100nF) and a variable resistor (P1, 50kOhm).
You must set this resistor appr. halfway (30/50) to get a stable trigger.
To adjust the output pulse duration you can vary the values of the capacitor C1 and the resistor R1.

The output LED flashes 3 seconds when the switch changes from OFF to ON (and stays ON). When the switch is released (changing from ON to OFF and staying OFF) the LED flashes again 3 seconds.

I think this answers your question (I hope)… :grinning:

1 Like

Enthusiastically three times a day I was checking & waiting for your precious reply.
You left me speechless… :no_mouth:
I really don’t know how to thank you…

I’m short in a few of elements in the circuit. I’ll obtain them and will inform you of the result, hopefully tomorrow…
Regards :rose:

PS: I’m short in 100nf but I couldn’t wait until tomorrow, so I tried to assemble them using what I had and managed to make & try the circuit with 190nf (instead of 100nf)
But unfortunately I do not get the LED ON upon press and I just get it ON for 3 secs upon release!!
Probably that capacitor is the culprits. I’ll try the circuit tomorrow this time with the exact elements and post the results ASAP.

1 Like

The variable resistor P1 is crucial. After setting it I measured the setting and replaced this part by two normal resistors, 33kOhm from the middle connection to VCC and 22kOhm from the middle connection to GND. Then it also worked as it should.

1 Like


1 Like

Please share your final project when ready…



And Final Project:



Hi Alex.

Love this project you’ve done. I am planning on using this to trigger a switch that only has a push button so this will work ideally for me as the switch will be either on or off and the push button is temporary. So each time the switch status is changed from either on to off or off to on the circuit will send a single pulse through. Will you please advise me what is needed so this circuit will work off 3.3V input and give a positive 3.3V output (trigger).

Thanks in advance

1 Like

Hi @Michael266911,
The general specification of the 555 IC mentiones a minimum operating voltage of 4.5 Volt. I checked the trigger at 3.3 V and it worked without changing any component, although the output voltage on pin 3 of the 555 is 2.75 Volt without the Led and 2.05 Volt with the Led connected.
I do not think this output voltage can be increased, I suppose it is caused by the internal setup of the 555 IC.
Hope this is what you need,

1 Like

Hi Alex,

Can you please guide me How I can get the inverted output from this 555 IC circuit.

Hi @Mukesh_1896,
An inverted output can be done with an additional transistor BC547, see attached diagram.
I did not test this but I think it should work.

Hi, i found this handy circuit and the very helpful Alex Pikkert when searching for a solution to my problem. im trying to trigger a wifi connected switch when the house current is interrupted. i have a ups to run the circuit from (12v output) and the input of the wifi switch is a momentary switch (a longer press puts it into setup mode)

so, your circuit which takes an input state change, and outputs a pulse is ideal.

i have modified a mains sensing circuit i used before, which has an optoisolator and a big resistor for sensing mains current. its been working fine in the current circuit for almost a year, and i have spares.

the output needs to drive a small relay to keep things nice and seperate from the wifi switch.

i have built what i think should be a version of your circuit, with my optoisolator on the input, and a transistor output to drive the relay in LTspice, but it basically just doesnt work.

i get nothing on the output for the first 2.5 seconds, then the output latches, and stays latched. input doesnt affect anything.

i need to figure out how to upload a screengrab of my ltspice simulation, but i hope i can get some advice from the horses mouth so to speak.

going on holiday in a week and it seems the power drops out every time we go on holiday and we come back to a smelly fridge!


edit:hm. new user, cant upload an image :frowning:

Hi @robinlawrie,
The transistor output should work when connected to my circuit.
Try to use a relay contact as input signal.
adjusting the variable resistor P1 might help.


Hi @robinlawrie.
I have a few questions here.
What does your wifi switch do ?
If power breaks, how long is the power out ?
Is there enough power for the rest of the circuit when power fails ?
How is your optocoupler connected to the power dedection and 555 circuit ?
A schematic would be apreciated. Can’t you post on Flickr or similar ?