10
\$\begingroup\$

I purchased a cheap night light that plugs directly into a 240V wall outlet. It has three color changing LEDs.

The problem was, those LEDs were way too bright. I decided to modify that night light a little, so they're not as bright.

The reverse-engineered schematic is a little strange in that when the light is off (during daylight) it actually draws a considerable amount of power - about as much when the LEDs are turned on.

Night light schematic

(Value of C2 is just the default value for caps the schematic tool I used assigns to those components. I don't know the actual value. LDR1 is red, because it was the selected item when I took the screenshot, it has no significance)

As you can see in the schematic, at night, the current drops through the LEDs (they have no current limiting resistor.)

As the ambient light gets brighter, the resistance through LDR1 drops, and the transistor Q1 starts conducting current.

During daylight, the LEDs are effectively shorted through the resistor. As more and more light gets on LDR1, the LEDs will be less and less bright.

I tried to limit the maximum brightness of the LEDs, by introducing a current-limiting resistor (red circle in the schematic, just above D1). I noticed that I had to use a quite large resistance, around 180k, to have any effect.

The brightness was limited alright, but I also noticed, that when LDR1 was fully covered, i.e. the entire current dropped through the resistor and the LEDs, a buzzing sound emanated and after about two minutes the device broke and is now completely broken. I don't know what part broke as of yet, but I assume Q1 failed open.

LDR1 had a maximum resistance of around 33kΩ - 38kΩ; it was difficult to measure in complete darkness without any light bleeding onto the LDR.

C2 is a tiny 0402 capacitor of unknown value, I assume it's a tiny little bypass capacitor that probably doesn't do much to begin with.

Unfortunately, I don't know the current draw after the bridge rectifier. It was difficult to get a reading with a multimeter as the color-changing RGB LEDs constantly kept changing the voltage drop through them. I seem to have measured a voltage drop of around 9V. Taking the bridge rectifier diodes into account, I'd assume a 10V drop: \$ 10V \times \tfrac{1}{\sqrt2} \approx 7V_{RMS} \$

The capacitive dropper has an impedance of \$ X_c = \tfrac{1}{2\pi f C} = \tfrac{1}{2\pi \times 50Hz \times 100 \times 10^{-9}F} \approx 31.8kΩ \$. Together with R1 this must therefore drop \$ 240V - 7 = 233V \$.

\$ \tfrac{233V}{32.36kΩ} = 7.2mA \$, now that to me, seems really low.

Now here are my questions:

  1. This circuit seems very weird to me, especially how the LEDs are shorted to turn them off and the entire voltage is dropped via the transistor. I'd understand using the transistor as a low-side switch in line right after the LEDs, but using them like that seems just wrong. Am I misunderstanding something? Is this preferred for some reason?

  2. Why did the circuit break when I introduced a resistor right in front of the LEDs? Where did it most likely fail?

  3. How would I actually go about dimming the LEDs such that the whole thing doesn't break?

I'm assuming for point 3, that I should simply have made the resistor R1 a higher value, further limiting the current through the rest of the circuit.

\$\endgroup\$
9
  • 1
    \$\begingroup\$ The LED's clamp the voltage post rectifier. By adding a resistor, voltage probably went up so high as to kill the transistor and/or something else. \$\endgroup\$ Commented Jun 30, 2021 at 18:33
  • 8
    \$\begingroup\$ I’m getting an bigclive-esqe feeling from this schematic. \$\endgroup\$
    – winny
    Commented Jun 30, 2021 at 18:43
  • 2
    \$\begingroup\$ Increase R1 or decrease C1 to dim it. \$\endgroup\$
    – winny
    Commented Jun 30, 2021 at 18:44
  • 2
    \$\begingroup\$ With a (white) night light exhibiting similar behaviour, I dimmed it with insulation tape on the outside (the case looked like a pain to get into). \$\endgroup\$
    – Chris H
    Commented Jul 1, 2021 at 8:40
  • 1
    \$\begingroup\$ @winny That could be Trying to blow up a Chinese night light - and failing (with schematic). \$\endgroup\$ Commented Jul 1, 2021 at 15:00

4 Answers 4

6
\$\begingroup\$

Most likely you did not measure the power, but rather the current. The power when the LEDs are off is low but the current will be almost unchanged. Trying to interrupt the current would require a high voltage semiconductor which would be more costly and probably less reliable.

When you added the resistor you increased the voltage that the transistor has to block. At some point the transistor will fail. It's rated for about 45V (knock-offs may be slightly different rating).

To dim the LEDs you could try shunting the LEDs with a resistor- that's not ideal because it will have other effects.

Better would be to replace C1 with a lower value than is there currently, suitably rated for that 'X' service.

Keep in mind that this circuit is not isolated from the mains and any contact while powered could result in a (possibly fatal) electrical shock.

\$\endgroup\$
12
  • 1
    \$\begingroup\$ @CristobolPolychronopolis Yes, but the power dissipation of that resistor will be much higher than the current one. R1 is only there to limit the turn-on current, the capacitor is what does the work. \$\endgroup\$ Commented Jun 30, 2021 at 18:39
  • 1
    \$\begingroup\$ Thanks for pointing that out, I see what you mean. Logic still holds, though...decrease the value of C1 to limit the current further. \$\endgroup\$ Commented Jun 30, 2021 at 18:45
  • 2
    \$\begingroup\$ If you remove everything after the bridge the voltage goes up to the mains voltage (assuming the bridge doesn't break down) which is about +/-330V peak in your case, so with the bridge just +330V peaks at double the frequency. You can think of it as (sort-of) a constant current supply. Short it out and the voltage goes down to zero and the LEDs extinguish. Since most of the voltage is dropped in C1 the current is out of phase with the voltage and very little power is lost. \$\endgroup\$ Commented Jun 30, 2021 at 19:00
  • 1
    \$\begingroup\$ 7mA is quite a bit of current as far as LEDs go. The capacitor rating, apparently like the rest of your device is dubious. What damage could it cause if it happened, say, to burst into flames when nobody is awake or perhaps nobody is home? \$\endgroup\$ Commented Jul 1, 2021 at 3:23
  • 1
    \$\begingroup\$ @TooTea: Getting a resistor hot enough to open like a fuse is creating a quite dangerous condition. \$\endgroup\$
    – Ben Voigt
    Commented Jul 1, 2021 at 16:05
6
\$\begingroup\$
  1. Yes, that is a very common arrangement. Nowhere is it said that if the LEDs are off that device must conserve power. It just works best like that, because when the transistor is off, the LEDs limit the voltage to about 9V which in turn prevents the transistor from seeing overvoltage and it does not get damaged. Since the voltage is limited, it will also limit current via the LDR so it does not get damaged.

  2. It failed because the absurdly large resistor of "around 180k" only limits the current to LEDs, but the downside is that it prevents the LEDs from clamping the output voltage from the bridge rectifier to 9V. The voltage output from the bridge rectifier to the LDR and transistor were too much and they got damaged. If it was a BC817, it can handle voltage only up to 45V.

  3. Yes, making R1 higher might work, but it is really the 100nF dropper capacitor that is important. Lowering the capacitance will allow less current to pass. But beware that not just any capacitor will do, it has to be a special safety type of capacitor with enough voltage handling for safe and proper operation.

\$\endgroup\$
2
\$\begingroup\$

The LEDS were acting as a voltage limiter for Q1 and BR1, but your added resistor stopped that and Q1/BR1 will have been over-volted.

It probably failed shorted. given that the supply current is limited it's probably still a short-circuit.

enter image description here

Add a resistor or capacitor at the red e circle. about 180k or 100nF is probably good.

a capacitor will be more energy efficient. the capacitor needs to withstand your AC voltage.

\$\endgroup\$
3
  • \$\begingroup\$ 180k? Did you mean 180 ohms? \$\endgroup\$
    – abligh
    Commented Jul 1, 2021 at 6:14
  • 1
    \$\begingroup\$ The original poster has experimentally determined 180k to be a suitable series resisitor, \$\endgroup\$ Commented Jul 1, 2021 at 10:14
  • 2
    \$\begingroup\$ One can quickly see why 180k of resistance would be in the right ballpark. The reactance of a 100nF capacitor at 60Hz is (1 / (2 * pi * 60 * 1e-7)) = about 26k. But increasing the reactance (by lowering C1 or putting a lower value capacitor in series with it) is a better approach than increasing the series resistor R1, because the reactance doesn't dissipate energy and get hot. \$\endgroup\$
    – Ben Voigt
    Commented Jul 1, 2021 at 17:04
1
\$\begingroup\$

TREAT ALL PARTS OF THIS CIRCUIT AS BEING AT MAINS VOLTAGE AT ALL TIMES

As others have said - adding series R to the LEDS caused the voltage to rise.
This is self defeating as the increased voltage tends to maintain LED brightness.

You could:

  • Decrease series cap as others have suggested,
    or add another in series with the origonal.
    This can be anywhere in either supply lead.
    USE AN X OR Y RATED CAPACITOR.

  • Add a zener diode across the LEDs.
    This would limit brightnes and also optionally allow a series LED resistor to be effective.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.