TTL Compatible Momentary Toggle Switch Circuit with NE555 Timer

One of my friends asked me for a help. He wanted to turn on light in a room whenever one enters it and then turn off the light when he gets out. I thought about using an NE555 timer for that, simply because that will keep the circuit simple. I searched the web and found the following circuit (yeah, it's a nice thing to search the web before doing something)

ne555 toggle switch

NE555 based toggle switch

The concept is simple; use a capacitor to store the state of the output and use it to toggle the current output state with a momentary push-button. Thanks to the three 5K resistors.

But we wanted to use a PIR module's output to drive toggling circuit. Solution; replace the push-button with a transistor. Here is how it's done.

ttl compatible toggle switch with ne555

TTL compatible toggle switch with NE555

So it is now TTL compatible and you can use any digital TTL output to toggle it. But when we connected the PIR module to this circuit, it didn't work. Then I found that the PIR sensor's logic uses 3.3V instead of 5V. The module had an on-board LDO 3.3V regulator.

The output of the PIR module will go HIGH (3.3V) if it detects any movement. The output will stay HIGH for about 200mS, then driven LOW. So we wanted the circuit to be toggled each time there is a LOW to HIGH transition (positive edge) from the output of the PIR. Following is a 3.3V compatible circuit for doing that.

3.3V input toggle switch

3.3V input toggle switch

This circuit works perfect with the PIR sensor we have. You can use the output of the 555 to drive a relay to control a high current load.

PS: There are other ways to do the toggling, like the following.

mosfet toggle switch

MOSFET based toggle switch


  1. - where the circuit is from
  2. NE555 Datasheet


Date published : 12:15 AM, 31-05-2015, Sunday
Last updated : 11:56 AM, 01-04-2016, Friday


Made with for Open Source
Copyright © 2014 - 2021  Vishnu M Aiea
Site last updated : IST 11:38 PM 20-01-2020, Monday
Page rendered in 0.0092 seconds. Version 1.2.7