The following PIR LED lamp circuit was designed by me for one of the followers of this blog Mr.Deepak upon his request.
The circuit is a LED driver which responds to ambient light as well as to the presence of a human, person or intruder, and varies its illumination accordingly, let's know more.
Technical Specifications
"I was looking to drive 20 LEDs of 0.06 watts.
So total Output voltage is 12-17 volts and total current is 0.08 amps
to drive 4 strings of 5 LEDs each
each led is 3.4 volts and 20 mA.
Can you help with this?
Also I would like to have an ambient sensor to switch on and off and a proximity sensor to switch to full brightness if some one approaches and to switch to half or 30% brightness after 30 seconds.
I need this for commercial use. I need a simple cost effective circuit. I have been following the blog and am sure that you know the subject. Please get back to me."
Simple PIR Controlled LED Lamp Circuit
Before solving the above request, let's first see how we can build the design in its simplest form using a PIR module and some LEDs.
The following circuit shows a simple PIR sensor which activates the connected LEDs in response to the presence of humans within the specified area.

As you can see I have not used any voltage regulator here, since the 1K at the positive works good to limit the current and the voltage to the PIR. This also avoids the base resistor for the transistor.
I have used 16 LEDs, however upto 64 EDs can be used.
For the power supply you can use any cheap 12V 1 amp SMPS
Parts List for the above circuit:
- PIR Module - 1
- 1K 1/4 watt - 1
- Transistor 8050 - 1
- LEDs 5 mA, 20 mA, 3.3V - 16nos, or upto 64 nos


Light Intensity Transition
As requested, the 30% light transition in the absence of a human can be implemented by simply adding a 1K or some other calculated resistor with the negative line of the LED as shown below:

Video Demo
Design# 2
The next two PIR based sensor LED light circuits is similar but has an added feature of detecting the ambient light conditions also. Therefore the circuits will respond based on whether the atmospheric light is sufficiently dark or not and also whether the premise is occupied by a human.

Let's try to understand the PIR based LED lamp circuit functioning from the following points:
The IC 555 is configured as a comparator, the LDR and R8 values are compared for generating an appropriate output.
As long as there's enough light over the LDR, pin#2 of the IC remains high and this keeps the output pin#3 of the IC high as well.
The high output at pin#3 keeps the transistor and the LED switched ON, until the ambient light falls below a predetermined value set by P1.
This means during night or in the absence of light the LEDs too get switched OFF.
The upper section is a proximity sensor circuit. The transistors T2 and T3 are configured as high gain amplifier and is able to sense even minute voltages from the PIR sensor.
In the presence of any human or animal in the specified vicinity, the PIR becomes active and triggers T3, which in turn switches ON T2.
T2 instantly shorts R1, such that the supply voltage reaches the LEDs directly instead of via R1.
This situation brightens up the LED illumination, indicating the presence of a passer by (as stated in the request).
The capacitor C1, ensures the LED brightness stays alive for many seconds, even after the PIR is deactivated.
Parts List
- R1 = 100 Ohms,
- R2,R4 = 100K,
- R3,R5, R6 = 10K,
- R7 (at IC 555 pin2) = 2M2,
- R7 at PIR positive = 10K
- R8 = 2M2,
- C1 = 470uF/25V
- LED resistors = 100 Ohms each,
- T1, T3 = BC547,
- T2 = BC557,
- D1 = 4.7V zener
- LDR = any standard type.
- PIR sensor = any standard type.
- IC1 = 555
Darkness Activated PIR Circuit
The following circuit can be used for automatically detecting human presence, and activating the lights during night time.





Comments
hello sir,
im interested in building the design #2 circuit, but only want the upper portion of the circuit (PIR, two transistors, cap, and resistors) with only the LED bank, i do not need the 555 timer. i have attempted to build twice without success. does design#2 require the 555 timer? why does the “top” portion of the circuit not work when i build it as shown in the schematic? application i want this for is for a closet where the light will go on when the door is opened.
thanks
ge
Hello Geeee,
It can be difficult for me to troubleshoot your circuit, unless I check it practically. However using a 555 is absolutely not required. The LDR function can be added even without IC 555, as indicated in the following article:
https://www.homemade-circuits.com/darkness-activated-pir-lamp-circuit/
In dark activated pir circuit I think first dark or night should be detected and if night then only pir should be activated so that power consumption can be minimised… Just my views..
Thank you, that is a good suggestion…
Thanks.. please enable date and time of post so that viewres can find it easy for responding and can know how older post is.
BTW you are doing very good job of explaining the things in much greater details. Thanks again for your good efforts.
Hi my dear friend, lets say that im using a 10w led for about a 800 lumens light and a 3.7v battery, my cuestion is: What exactly i have to modify in the first desing to make solar using a 10w led and 3.7v instead of 12v. thanks..
Hi, you can use the following set up:
https://www.homemade-circuits.com/wp-content/uploads/2013/03/UPS-for-modem.jpg
replace the adapter with solar panel, connect the output with the PIR supply input, adjust the zener diode value to get 4.2V across the battery, R1 can be calculated to limit the current to the battery according to its rating.
what size solar panel do you recomend sir?
7V 3 amp should be fine.
MY FRIEND IM TRYNG TO BUILD BUILD A LAMP THAT GIVE ME 1000 TO 1500 LUMENS USING 3.7 OR 12 VOLT. CAN I USE THE SAME SQUEMATIC? OR WHAT MODIFICATIONS , LED TYPE AND COMPONENTS I NEED
My good friend, You can change the 8050 in the first design to TIP122 and connect the desired high watt LEDs. However the 10 ohm resistor will need to be calculated appropriately.
Hi Swagatam, are the emiter, base and collector of the tip122 in the same orientation of the 8050, if not can please tell me the right one? thanks
Hi Julio, I have updated the 8050 pinouts in the above article, for the TIP122 pinout you can quickly Google it and get the details.
got it!!!!!!!! thanks
YOU ARE THE BEST!!!!!!!!
It’s my pleasure!
I HAVE TWO QUESTIONS MY FRIEND: 1) CAN I ADD THE LDR ISDIDE THE PIR SENSOR ?( THIS PARTICULAR PIR HAS CAPABILITY TO ADD AN LDR INSIDE LENS). 2) THE VOLTAGE OF THE LEDS (4 IN SERIE) WILL BE 13.2 VOLTS. WON’T BE A PROBLEM BY USING A 12 VOLTS POWER SUPPLY.
You can add the LDR inside the PIR lens, just make sure it doesn’t block the PIR signals, or doesn’t short anything. 12V can be used for a 3.3V LEDS 4 in series.
thank you my friend. i did it already and work great. good for pir and microwave radar sensor!!!!!
You are welcome!
Utterly stupid design. So many mistakes .
Hi Swag,
I have a LED matrix with 21 LED’s all connected in paralel.
What changes do I need to do in order to connect this matrix to the circuit?
Best Regards.
Nélio Abreu
Hi Neilio,
If they are not power LEDs then you can connect the module directly to any DC source having the same voltage output as specified for the LED module. This voltage should be constant.
However if the module has power LEDs then you may have to employ a current controller also along with a constant voltage, and the LED module will need to be mounted over a suitable heatsink
Hi,
So I don’t have to change the transístor at the LED array in the Darkness Activated PIR Circuit?
The LED’s are all white 5mm standard (not high power) but high bright.
Best Regards,
Nélio Abreu
Hi Nelio,
OK if you want to use it with the last circuit then you must use 5V as the supply and not 12V, because your LEDs are connected in parallel so they are supposed to be rated at 3.3V / 0.42 amps combined. Also for safety put a resistor of 5 ohm 1 watt in series with the module.
For T1 you can use 2N2222 or 8050.
Hi,
Ok. As for the rest of the circuit? The resistors at the 555 IC? Don’t I need to change it?
I presume that R8 controls the sensitivity of the LDR. If so I can replace it with na ajustable resistor, right?
Best Regards.
Nélio
Hi, yes The rest of the circuit can be as is. R8 can be replaced with a 1M pot for achieving the required sensitivity control.
Hi Swagatam,
The PIR sensor described in this circuit is a module or is it a 3 pin device similar to a transístor?
Best Regards.
Nélio Abreu
Hi Neil, it can be either the raw 3 pin sensor or a readymade module, both should work.
The circuit I have used is the following, and it does not respond to anything:
https://flic.kr/p/24J3C2k
Hi again Swag,
I’m still having issues getting the PIRs to work at all. I am trying your second schematic and have built it without the zener as I am using a 5v power supply. The PIR is a RE200B on its own with a 100K resistor connecting the out and – pins. I have built it without the panel of LEDs, only using one.
The trouble is, I have a bag of about 10 RE200B sensors, and they ALL have the same issue, so I think it is not the sensors but how they are connected. Reading with my multimeter from the OUT pin and negative, I am always getting around 0.8v, this barely changes when I move my hand close to the sensor.
Is the PIR in your diagram a RE200B or a ready made unit such as a HC SR501?
Do you have the 100K resistor across the OUT and – pins?
It doesn’t seem to matter what I do, testing the PIRs by connecting any PIR with + connected to the pin closest the metal tab on the unit, the – connected to the pin that is not insulated from the PIR body and the OUT connected to the middle pin, I do not get results.
Am I missing something?
Thanks
Hi Nathan, if you are not getting a varying output from your PIR that simply means the devices may be all faulty. You must first validate the working on your meter, because the transistors in the circuit will respond exactly as your meter responds, so unless the output is verified with a meter you cannot proceed with any circuit integration.
If your PIRs are OK then the meter has to be faulty or may be the testing procedure, the fault will need to be determined before connecting it to any circuit.
The specification of the PIR does not matter all PiRs will behave in the same manner.
I would recommend buying a brand new PIR and get it tested right in the shop itself with a meter, and then bring it home for the remaining procedures
please test by connecting as shown below while testing with meter
https://www.homemade-circuits.com/wp-content/uploads/2018/04/pir-sense.png
I did remove the PIRs from the circuits and tested them for the same result, that was the issue all along. I’m not getting different results either on circuit or off circuit, and the results are not as they are supposed to be…
I have published the datasheet of the device, you can have a look at the details and try to figure out the possible issue and see if you can solve it.
https://www.homemade-circuits.com/pir-sensor-datasheet-pinout-specification-working/
Thanks,
I tested the PIR while it was attached to the HC SR505 and HC SR501 for the results I mentioned above.
So perhaps that is why it is giving incorrect results, you may have to remove and check the sensor separately.
Hi Swag,
I have tried some experiments on HC SR505 and HC SR501 units, measuring the voltage on the RE 200B itself with my multimeter from the source and ground pins. Moving my hand in front caused the modules to trigger and light the LED I had between the GND and OUT pins. However there was little to no change in voltage on the PIR in any case. How is this working on the module, as it reacts with almost no change in the voltage from the PIR itself? This has been the same with those RE 200Bs I have tested on the breadboard, same voltage from the source pin (around 0.5-0.6v).
Also, the delay times in HC SR501 is about 2 seconds minimum. Can I reduce it to 0.5 seconds or less?
Thanks!
Nathan
Hi Nathan, According to one of the datasheets of a similar kind of PIR, the output is supposed to be around 3.5V in response to human presence. Not sure why your sensor is not working without an attached circuit. You can see the datasheet below:
https://www.homemade-circuits.com/wp-content/uploads/2018/04/D204B-PIR.pdf
The delay time can be perhaps adjusted by checking which capacitor inside the module is responsible for this, and then replacing it with a smaller one, however I am not entirely sure about this tweak.
Hello Norman. with transistors the illumination thresholds can never be sharp, you can try a 555 IC instead as shown in the above article, or use another transistor as shown in the following design, this will help reduce the slow glow effect:
https://www.homemade-circuits.com/2011/12/simple-led-automatic-daynight-lamp.html
Hi Swagatam,
I would like to design a PIR activated night light. I am using a PIR sensor, a LDR along with a transistor. I have included a resistor in the output from the PIR to the base of the transistor. The LDR ties the base of the transistor to ground. The size of this resistor increases the amount of darkness before lighting the led. This of course reduces the signal to the base of the transistor which causes the transistor not to fully saturate and the led glows dimly. My problem is I only want the night light to activate when it is totally dark and I want it to provide full power at that point. Right now it starts to glow dimly and gets brighter when the room gets darker. Is there a device like a transistor, FET or other device that will switch to full power completely when receiving a small signal. I don't know how to include a copy of my circuit into this comment. I hope you can follow my reasoning. Thanks!
Can we use this circuit using 6 vol 4.5ah battery supply? Some modification as light illuminating for 11 hour with intensity reduce after 5,hour? Circuit also same function as per your blog.
if possible I'll do it soon…
Sir I can't get it! Can you send any hand drawing?
you can make the second last circuit separately and the 4060 timer circuit with relay separately.
power the 4060 circuit from T2 collector, but the relay coil from direct 12V supply
connect LED assembly through the relay contacts. center pole to T2 collector, N/C…N/O to the LED positives. N/C directly connected while N/O through a resistor.
the value will need to calculated with some trial and error.
That Means as resister value increase intensity decrease? Ok what will be min and max resister value? Any rough drawing where resister will place?
yes that's possible, you can try the second last circuit and integrate a 4060 timer with a relay such that its relay contacts swaps a resistor in series with the LED to reduce the LED intensity after a predetermined delay period
Dear Swagatam,
Thank you for your always fast reply and help.
That did the trick.
You are welcome Henrik!