Logic gate using 555 timer(toggle switches and led circuit)

Thread Starter

meepmorp

Joined Apr 24, 2021
1
I wish to have a circuit such that, when the first toggle switch is on, led turns on continuously, and when both are on, it blinks, when both are off, it is off. I have tried a lot, but I am unable to do this
 

Irving

Joined Jan 30, 2016
3,843
Switch 1 (SPST, NO) connects power to circuit.
Switch 2 (SPDT, CO) common connected to LED, NC contact (off) connects LED to output of switch 1, NO contact (on) connects LED to output of 555.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,986
OR ...

Switch 1 (SPST, NO) connects power to circuit.
Switch 2 (SPST, NO) connects Reset input to Vcc. Resistor connects Reset input to GND.
LED (and current limit resistor) anode to Vcc; cathode to 555 output.

ak
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,986
Switch 1 (SPST, NO) connects power to circuit.
Switch 2 (SPDT, CO) common connected to LED, NC contact (off) connects LED to output of switch 1, NO contact (on) connects LED to output of 555.
Please add "anode" and "cathode" to the LED descriptions.

ak
 

crutschow

Joined Mar 14, 2008
34,281
Switch 1 (SPST, NO) connects power to circuit.
Switch 2 (SPST, NO) connects Reset input to Vcc. Resistor connects Reset input to GND.
That works too, though does depend on whether 555 sinks or sources current in LED.
Yes, the LED would be need to be connected between V+ and the 555 output for that to work.
The resistor should be no more than about 600Ω to insure the 555 is in the Reset state.
 

AnalogKid

Joined Aug 1, 2013
10,986
First pass at circuit for post #5. R1-C1 set the flash rate. To reduce parts and clutter, this circuit has a fixed 50/50 on/off ratio. C2 is power supply decoupling. It is a bit larger than normal because the 555 is switching the full LED current.

As above, R2 is less than 600 ohms for the bipolar 555. For the CMOS 555 in this schematic, it can be increased to almost anything. for example, it can be whatever value the R1 timing resistor is. With the CMOS 555, LED current must be limited to 50 mA max.

ak
555-Osc-Switch-1a-c.gif
 
Last edited:

Ian0

Joined Aug 7, 2020
9,667
Eleven replies later and we still don't know what is supposed to happen when the second toggle switch is on but the first is off?
 

Irving

Joined Jan 30, 2016
3,843
Eleven replies later and we still don't know what is supposed to happen when the second toggle switch is on but the first is off?
If the LED is off its a don't care condition... Or so everyone has assumed, since there's not many obvious alternatives!
 

Ian0

Joined Aug 7, 2020
9,667
If the LED is off its a don't care condition... Or so everyone has assumed, since there's not many obvious alternatives!
He could have meant that if one switch is on (either switch) then the LED is illuminated continuously but if both switches are on it flashes.
 

AnalogKid

Joined Aug 1, 2013
10,986
When you changed the LED-555 connectoin for the correct steady-state logic polarity, you forgot to reverse the LED because the current direction changed. The LED cathode is tied to Vcc.

ak
 
Top