LED flash once while button is pressed using 555?

Thread Starter

Battou

Joined Jun 4, 2016
9
Hi. Can someone help me? I need to make a circuit using 555 timer so that after button is pressed LED flashes once for a certain amount of time and dont flash any more until button is released and pressed again. Any thoughts? Tried to modify monostable circuit, but cant achieve needed effect.(

Will be grateful for any thoughts. Thanks!
 

Thread Starter

Battou

Joined Jun 4, 2016
9
Ops... I made a mistake. I need LED to flash when button is released. More speciefic - when photoresistor is blocked from IR diode light. It have 200-300Ohm when lit, and jver 100kOhm in the dark. I made a circuit simulation for pressing button, but now I nedd to invert it to Flash when releasing button. Any ideas? T_T Im sorry for confusing you. And thank you for help!
 

Thread Starter

Battou

Joined Jun 4, 2016
9
Here is my schematic. Two resistors and a switch at the bottom are a representation of a phototransistor in lit and blocked states. It works in the way that when transistor goes from blocked to lit - LED blinks. But I need to make so that LED blinks when transistor goes from lit to blocked.
 

Attachments

dl324

Joined Mar 30, 2015
16,845
Here is my schematic.
Why do you have a 4K resistor in parallel with the 1K? Swapping those two resistors with the LDR should do it. When the LDR is in light, the left side of the 3μF cap will be higher than 1/3 Vcc. When the LDR is blocked, you'll get a negative pulse below 1/3 Vcc that will trigger the one shot.

The 3μF cap can be smaller. Is your timing cap really 1.08mF? It could be significantly smaller if you used a larger timing resistance.
 

ScottWang

Joined Aug 23, 2012
7,397
after button is pressed LED flashes once for a certain amount of time and dont flash any more until button is released and pressed again.
What your described seems didn't match the circuit?

Is that you want to press the key to make led flashing for a certain amount of time, during these time that the key always pressed?

But in the circuit that the key just press and it lost the function as released, this is a quite normal application.

Maybe you need a NE556(two 555) or two 555, the first 555 is to setup the timer for led flashing, that is one shot timer function and the second 555 is the oscillator to flashing the led, you can setup or adjust the flashing frequency.
 

Thread Starter

Battou

Joined Jun 4, 2016
9
The first scheme, the one without transistor, is almost perfectly what I need! Thanks! But it still have two problems. If switch opend and closed fast then trigger pulse dont reach neded 1/3 of control voltage. And the second problem is spaike up to 12v with 5v source when switch released. But overall effect is exactly wht I need, no output when button pressed and output pulse once when buttot released. Ny way to adapt it for fast switch state change?
 

Thread Starter

Battou

Joined Jun 4, 2016
9
I think I managed to adapt it for fast switching. I lowered max voltage on Trigger pin, so I can dip it lower then 1/3 of Vcc with smaller capacitor. What do you think? (two resistors and a switch in the upper left corner - photoresistor representation)
 

Attachments

GopherT

Joined Nov 23, 2012
8,009
In the first circuit, when the power up then the pin 2 could be triggered by 10nF and 1K to ground, have you try the circuit?

The second circuit also has the same problem, because the pin 2 is a negative trigger input.
It definitely triggers on power-up. Was no triggering on power-up a requirement? I'll wait for the OP to discuss.
 

AlbertHall

Joined Jun 4, 2014
12,345
Ops... I made a mistake. I need LED to flash when button is released. More speciefic - when photoresistor is blocked from IR diode light. It have 200-300Ohm when lit, and jver 100kOhm in the dark. I made a circuit simulation for pressing button, but now I nedd to invert it to Flash when releasing button. Any ideas? T_T Im sorry for confusing you. And thank you for help!
Looking at the circuit in this link:
http://www.doctronics.co.uk/555.htm#triggering
At the left hand side you will see a 10k resistor and a Vin label. To get what you want, move the resistor to the Vin location and connect your switch where the resistor was connected.
If the switch is closed at switch on there will be no flash as required. When the switch is opened the LED will flash.
 

GopherT

Joined Nov 23, 2012
8,009
The first scheme, the one without transistor, is almost perfectly what I need! Thanks! But it still have two problems. If switch opend and closed fast then trigger pulse dont reach neded 1/3 of control voltage. And the second problem is spaike up to 12v with 5v source when switch released. But overall effect is exactly wht I need, no output when button pressed and output pulse once when buttot released. Ny way to adapt it for fast switch state change?
The button press time on a simulator is different than a button press in real life. The time constant of the RC network on the circuit should be one millisecond. Your finger is not fast enough to press and release before it charges.


You can add a small-value resistor in series with the trigger pin to protect it. The chip can handle 18 volts (depending on specific model of the 555). You can also add a diode (reverse biased) from pin 2 to Vcc) but that can cause some mis-firing on button press. You can add a 100 to 1k in series with the diode to eliminate mis-firing with the diode. (I, personally, wouldn't worry about the low current spikes until it is a problem)
 

Thread Starter

Battou

Joined Jun 4, 2016
9
I think that Ive came up with proper scheme. Will try to build it tomorrow and will post results here.

Yet again needed algorithm:
1) while there is nothing between IR diode and phototransistor - LED do not powered.
2) when something blocks IR from reaching phototransistor - LED turns on.
3) LED flashes once for certain amount of time, no matter if obstruction is remover right away, or if it stays between IR diod and photoresistor.
4) LED can be powered again only after flash ends and obstruction removed.

One-flash obstruction sensor so to say. Thanks everyone for help, suggestions and schematics! Still opend for suggestions.) Will post my results tomorrow.)
 

AlbertHall

Joined Jun 4, 2014
12,345
2) when something blocks IR from reaching phototransistor - LED turns on.
There is one other consideration when replacing the switch with the opto-sensor. Might the obstruction move very slowly? If it moves slowly enough it won't trigger the '555.
 
Top