Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need some help with my PIR LED night light circuit please.

Status
Not open for further replies.

davepusey

Member
Circuit:

**broken link removed**

Explanation:

Pin 2 of the PIR connector is the open-collector output. This pulls to ground when motion is detected, turning on PNP transistor Q3, which in turn produces an active HIGH signal at "TRIGGER".

This is then used to switch two on NPN transistors (T1 and T2).

T2 produces the LOW pulse for the 555 trigger pin to start the timer.

T1 shorts the timing capacitor C2 to ground, making the the time delay start from the most recent trigger pulse.

During the time delay, the 555 output turns on N-Channel MOSFET Q2, which illuminates the LED lamps.

Problem:

All of this works perfectly, except for one minor annoyance which I cannot figure out how to solve.

When a trigger pulse is present, the voltage at the Drain pin of Q2 rises by 25mV - measured on my DSO. While this doesn't seem much, it is enough to cause a visible dimming of the LED lamps.

The only way I have found to resolve this is to remove R4 and LED1 from the circuit.

R4 and LED1 are used to visually indicate the trigger pulses from the PIR sensor, which I would prefer to keep in the final circuit.
 
I'm only guessing at this point. Try adding a pull down on the base (e.g. 100 K)

This choice might work better. I modified a stereo indicator light that came on lightly that I fixed, by placing a reversed biased Zener diode in series with your LED. In your case just try one or two forward biased diodes. You might have to modify R4 accordingly.
 
If 25mV makes a noticeable difference it suggests you're driving the LEDs from a fixed voltage rather than from a constant-current source?
 
The LEDs are in connected in series... 12V / 4 LEDs = 3V each, which is the rated forward voltage.
 
You show LED1 as a single LED. That's where I was suggesting the diodes.

(R8, B) and ground for a pull down. I doubt it would work though.
 
Forgive me if I'm missing the point, but that circuit already has a pull-up (R7) because of the the active-LOW open-collector output from the PIR. Wouldn't adding a pull-down as well just create a voltage divider (+12V - R7 - R8 - Rnew - GND)

I am intrigued by alec_t's mention of a constant-current source. This is a concept i've never really understood. Would this be a better and more reliable way to connect the Lamp LEDs? The current plan was to have 4 LEDs in series to make a group, with several groups wired in parralel.
 
The LEDs are in connected in series... 12V / 4 LEDs = 3V each, which is the rated forward voltage.
3V is a nominal value. There are production variations. Because of a sharp 'knee' in the V/light characteristic a small voltage change can make a big difference in the light output. So LEDs should not be driven from a fixed voltage. For 4 LEDs it would be better to have a supply of, say, 14V and use a dropper resistor to give some headroom for variations and limit the current to the required value.
 
Usually the resistors are sized at R <= ((# leds * Vf)-Vs/Inom

Each LED has a forward drop which is specified as Min/Max and an average. Then the number of LED's and finally Vs which might be the voltage drop of your switch. This may be Vce(sat) which is about 0.6 V. The transistor datasheet also has min and max values. A FET does have Rds(on) which can be used.

Sometimes these terms are negligible and other times they matter, LED's really want to be current driven, however, you can buy LEDs specifiedfor 12 V and 5V that already contain the required resistor.

You might be better using groups of 2 in series with a resistor. Add more LEDS in similar groups in parallel with the first (resistor+LED+LED)
 
3V is a nominal value. There are production variations. Because of a sharp 'knee' in the V/light characteristic a small voltage change can make a big difference in the light output. So LEDs should not be driven from a fixed voltage. For 4 LEDs it would be better to have a supply of, say, 14V and use a dropper resistor to give some headroom for variations and limit the current to the required value.

Ok, so how would you suggest I wire them?

The supply voltage cannot exceed 12V and there will be a total of 30 LEDs in the complete lamp panel.

The LED specs are listed as...

LED / Lamp Size:5mm;
LED Colour:White;
Viewing Angle:30°;
Max Voltage Vf:4V;
Forward Current:20mA;
Opto Case Style:Radial;
Case Style:Radial;
Current If @ Vf:20mA;
MCD @ 25ma: 20000
 
Last edited:
Ok, so how would you suggest I wire them?
As KISS said above. With 2 LEDs in series per string there will be 15 strings in parallel. Each string will need a respective series resistor of (12-8)/0.02 = 200Ω minimum, say 220Ω in practice.
 
OK, Q2 turns on the LED, so ignore the voltage drop with Q2.

You really have 2 choices
1) Each LED has it's own series resistor R < (12-4)/0.020 Amps; you calculate wattage (30 of these)
2) Two LED's in series and a series resistor R < (12-(2*4))/0.020; you calculate the wattage (15 of these) ; 200 ohm resistor, 1/8 W or more e.g. (LED LED 200R) x 15 in any order.
3) A current regulator for each pair.

You could try to match Vf for each pair using your DVM. I don't know the effect of Vf with intensity. Using a resistor for each LED, would allow tweaking intensity and position.

There will be some variation with temperature and if that's bothersome the current regulator would be a lot more expensive and probably not worth it.

PS: I was looking at the wrong LED for my suggestions. Sorry about that. I was looking at the only LED I saw in the picture, your indicator and not the one associated with left/right.
 
How about 3 LEDs in series per string (with a 150R resistor), and 10 strings in parallel.

By my reckoning that would mean 5 less resistors and 100mA less current draw for the whole panel?
 
Power is constant. There is still 0.020 * 4 V across EACH LED no matter if one, two or 3 are in series and the current is 20 mA.

3 leds*4 volts = 12 leaves you no means to regulate the current at all. Just the variation of Vf.

Remember you can use SMT resistors or through hole resistors and you can put the thru hole resistors on end if you need to. The SMT components can go on the back too, if needed.
 
Talking of power, 12V x 15 strings x 20mA = 3.6W. The light will get pretty warm and will need some ventilation.
 
Status
Not open for further replies.

Latest threads

Back
Top