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

#### 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

#### Ian0

Joined Aug 7, 2020
2,234
What is supposed to happen when the second toggle switch is on but the first is off?

#### Irving

Joined Jan 30, 2016
1,531
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:

#### dl324

Joined Mar 30, 2015
12,871
Welcome to AAC!
I have tried a lot, but I am unable to do this
Show what you've tried.

#### AnalogKid

Joined Aug 1, 2013
9,257
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:

#### Irving

Joined Jan 30, 2016
1,531
OR ...

Switch 1 (SPST, NO) connects power to circuit.
Switch 2 (SPST, NO) connects Reset input to Vcc. Resistor connects Reset input to GND.

ak
That works too, though does depend on whether 555 sinks or sources current in LED.

#### AnalogKid

Joined Aug 1, 2013
9,257
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.

ak

#### crutschow

Joined Mar 14, 2008
27,225
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.

#### Irving

Joined Jan 30, 2016
1,531
For Low-side LED

OR
For High-side LED

#### eetech00

Joined Jun 8, 2013
2,363
The resistor should be no more than about 600Ω to insure the 555 is in the Reset state.
Even if reset only requires 400uA?

#### eetech00

Joined Jun 8, 2013
2,363
Even if reset only requires 400uA?
Nevermind....could be as much as 1.5mA

This circuit add 50% duty cycle (regardless of change in frequency) if desired.

Last edited:

#### crutschow

Joined Mar 14, 2008
27,225
This circuit add 50% duty cycle if desired.
The TS wants the LED continuously on when power is applied, so connect the LED to V+ instead of ground.

#### AnalogKid

Joined Aug 1, 2013
9,257
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

Last edited:

#### Ian0

Joined Aug 7, 2020
2,234
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?

#### eetech00

Joined Jun 8, 2013
2,363
The TS wants the LED continuously on when power is applied, so connect the LED to V+ instead of ground.

Corrected in #11. Thanks.

#### Irving

Joined Jan 30, 2016
1,531
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!

#### AnalogKid

Joined Aug 1, 2013
9,257
This circuit add 50% duty cycle (regardless of change in frequency) if desired.
As of 3:29 pm., LED is backwards.

ak

#### Ian0

Joined Aug 7, 2020
2,234
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.

#### eetech00

Joined Jun 8, 2013
2,363
As of 3:29 pm., LED is backwards.

ak
Already changed as of 12:25 pm per crutschow.

#### AnalogKid

Joined Aug 1, 2013
9,257
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