Home > News & Updates > Electronics News Updates > Motion activated lighting without a Micro-Controller

Motion activated lighting without a Micro-Controller

Summary of Motion activated lighting without a Micro-Controller


### Summary The author built a motion-activated hallway lighting system to solve the issue of entering from an unlit middle section. Instead of using a microcontroller like Arduino, they utilized a standalone HC-SR501 PIR sensor with a 2N3904 transistor and a 12V relay to control LED strips. This approach eliminates unnecessary components, reducing cost under $20 while effectively powering 12V LED lights with minimal standby power consumption.

Parts used in Motion Activated Hallway Lighting:

  • HC-SR501 PIR Sensor
  • 2N3904 Transistor
  • 12V Relay
  • 5050 SMD LED Strip (2.4 meters)
  • 12V 1.5A Wall Wart Power Supply

In my home I have a fairly long hallway that has light switches at either end but 99% of the time we enter the hallway from the middle where there is no switch. So I decided I needed to do something about this as walking down a dark hallway all the time was annoying.

I have seen a fair number of people use an arduino or even a standalone ATTiny85 with a El cheapo HC-SR501 which can be found on ebay for about $1.25 each and I find these things work fantastic, they have an excellent range and detection spread.

Motion activated lighting without a Micro-Controller

However since the HC-SR501 has a built in timing circuit it is very unnecessary to use any sort of micro-controller with them and they can be hooked up easily to whatever it is you want to power and wasting a $4-$30 micro-controller for such a simple task when a Transistor or Mosfet could be used seems counter intuitive.

The great thing about the HC-SR501 is that they have a voltage regulator built in so will work from 5v-20v(I tested one at 3.3v and it worked although I didn’t test range) when the unit is in standby the power draw is 70uA(.07mA) or 0.000839 watts. My completed circuit with 2.4 meters of 5050SMD LED Strip lighting had a power draw of 1.2 amps or 14watts.

Since the LED Strips use 12v power I just ran the whole circuit using a 12v 1.5amp wall wart. I would have preferred to use a logic level power mosfet like the IRLZ44N but didn’t have one around so used a 2N3904 transistor(as the trigger output from the PIR sensor is 3.3v) and a 12v relay.

The entire project including the LED Strip, HC-SR501, 2N3904 Transistor and 12v Relay cost under $10 add to that a 12v 1.5amp wall wart and it would be under $20.

 

For more detail: Motion activated lighting without a Micro-Controller

Quick Solutions to Questions related to Motion Activated Hallway Lighting:

  • Why did the author avoid using a microcontroller?
    The HC-SR501 has a built-in timing circuit making a microcontroller unnecessary for this simple task.
  • What voltage range does the HC-SR501 sensor support?
    The sensor works from 5v to 20v due to its built-in voltage regulator.
  • How much power does the sensor draw in standby mode?
    The unit draws 70uA or 0.000839 watts when in standby.
  • What component was used instead of a logic level MOSFET?
    A 2N3904 transistor was used because the trigger output is 3.3v and a MOSFET was unavailable.
  • What type of power supply was used for the project?
    A 12V 1.5A wall wart was used to power the entire circuit including the LED strips.
  • What is the total estimated cost of the completed project?
    The electronics cost under $10 and the total project including the power supply is under $20.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top