Don't Miss

Day Light Switch Repair

By on February 6, 2019
power supply repair












I got a simple device from a customer who told me does he bought several of them and after a while they start to die. These devices are some sort of light detectors with a relay inside, and serves as an automatic light switch when the darkness falls.

These devices are working on main voltage, here in my region it is 220VAC. So please take care if you work with such of voltages, it could really badly harm or even kill you.

The problem is does the device won’t any more switch when the darkness fall. I never repaired such of device before. Here is a picture how it looks like:

light detector repair

The device inside is not a complicated think, but I was really surprised when I discovered the power source part. I mean, how they made it. That is really crap would I say. Theoretically that is a solution to transform 220VAC to some sort of 24VDC in this case, but I’m not really happy to have this kind of power unit in my device.

Actually, they made a so called “capacitive power supply”. That means, it is a transformer less power supply with a capacitor and a resistor in series with the main live wire. Must not be to feed the live wire to the cap but it is recommended to do so.

capacitive power supply

The main problem in this circuit is the PSU (Power Supply Unit). I will a bit describe this part of the unit with a circuit diagram.

capacitive power supply schematic

The C1 is a voltage dropping capacitor which is connected in series with the phase line. The R1 will serve to empty the C1 when you interrupt the main line. The R2 serves more like a fuse resistor.

Why I hate this type of circuit? I hate this because the DC part is not isolated in any way from the main power source. There are very big chance does any point of the circuit in the DC section is under high voltage and this can be very dangerous. Somebody would say I’m wrong, because the C1 is actually galvanic isolating the AC side from the DC side, this is true but who can guaranty does no AC leakages is still present ? I wouldn’t mess to tap with my fingers around the DC side. No way!

Wait a moment, recommended is to connect the live/phase wire to the C1 and the neutral wire to the R2. Ok, but is it possible to make a mistake and connect the live to the R2? Of course it is, the device will also work for sure, but you have the main voltage traveling through the R2 and through the bridge rectifier too without the minimal galvanic decoupling from the C1. Your chance is much higher to die in that situation.

Oh! Can you imagine what kind of case/housing does this kind of electronic need? Yea, a really good sealed and non conductive housing would be the best. There are many more problems with this PSU.

Here is a short list of drawback:

– very low current output, maybe 30-50mA

– the AC side is not galvanic insulated from the DC side of the circuit

– the output will be completely unstable if the main side is fluctuating

– very dangerous to use such of device

– if something goes wrong in the device a big chance is exceeded does the whole unit will burn down

power supply board

I think this is enough explanation in a really nutshell, and if you hesitate even a bit how this is working a better way is to step back and forget to deal with such of device, before it is too late.

Back to the repairing. As I described my methods of part checking in some of my previous writings, here I do the same. First I searched for shortened parts or circuits. And in the first minute I found the problematic area. A 1N4749A Zener diode was killed. I also checked the area where the Zener diode was set for some problems, but didn’t found any.

power supply zener diode faulty

After changing the diode the unit was in a working condition.





The 1:1 insulation transformer can save your life if something goes wrong and you and your device are galvanic insulated from the main voltage source. I hope you enjoy this tutorial and will save lot of repair time.


Christian Robert Adzic

This article was prepared for you by Christian Robert Adzic from Novi Knezevac-Serbia.

Please give a support by clicking  on the social buttons below. Your feedback on the post is welcome. Please leave it in the comments.

P.S-  If you enjoyed reading this, click here to subscribe to my blog (free subscription). That way, you’ll never miss a post. You can also forward this website link to your friends and colleagues-thanks!

Note: You can check his previous post in the below link:




  1. Parasuraman Subramanian

    February 6, 2019 at 8:55 pm

    Your concern for novices is prominent and well appreciated. I do agree with you that I too hate such type of circuits. Nice Job and well Done!

  2. Albert van Bemmelen

    February 6, 2019 at 11:02 pm

    Nice article! You are right to warn for the dangers that live power lines may cause if not used safely. We however all use it daily without real danger! As a matter of fact I used this type of power supply in my old "How to Build a DIY Fully Automated Light Controlled Fan Regulator" article that still works for many, many years now without any need for service or repair!
    And my dear brother, his wife and 3 kids all use the toilet with the installed light controlled automated Fan many times a day without any problem after my little project was designed and installed in their toilet. In this respect even drinking hot tea or coffee is not dangerous until we get it over our sensitive skins. In fact no power supply is either 100% save or completely insulated, and never safe for outdoor use if no extraordinary measures are taken into account.

    • Albert van Bemmelen

      February 9, 2019 at 4:09 pm

      Pressing the Dislike button is so much easier than designing a working Fully Automated Light Controlled Fan Regulator! Be proud on yourself for being such a simple minded person.

      • Christian Adzic

        February 10, 2019 at 4:01 am

        Thank you Albert for your comment and supporting my article.
        For other peoples, who just sitting and pressing a dislike, I would appreciate if somebody dislike something in somebodies work, like writing on this blog, then beside of the dislike just give an explanation why you are dislike.
        Only that what can we make progress in knowledge and be better in what we do.
        My best regards.

        • Albert van Bemmelen

          February 10, 2019 at 8:01 pm

          Indeed. Pressing dislike without any explanation is just Lame. Thanks Chris(tian)!

          • Albert van Bemmelen

            February 11, 2019 at 11:53 pm

            Cris(tian), I noticed the Earth sign in your circuit diagram. It must be wrong there. That point may never be connected to Earth. Only to the Nil Line!
            Earth is only intended and used for safety Lines if outside housings of devices are metal and so electricity conducting and therefore need to be Earthed for Safety reasons. Cheers!

        • Parasuraman Subramanian

          February 12, 2019 at 10:51 pm

          Long back, in one of my articles, one guy had not only marked dislike, but also mentioned why he did that, though the reasons were strange. He had said that by detailing the repairing procedure which even a lay man can follow, I was depriving the income of professional service technicians. Moreover, some of the customers are so ungrateful for the work done, that they question the charges. Then he asked why should I oblige such customers by giving away the self-repair articles. He sounded very accusing. Well, people are different with different view points from their own perspective!

  3. beh

    February 6, 2019 at 11:05 pm

    Hi Chris
    Yes we do not know where is AC or DC in this kind of circuits that is why is dangerous to work with i was struggling with such things in the past many times.

  4. Humberto

    February 9, 2019 at 3:21 am

    Hi Chris, I really agree with you in the use of 1:1 insulation transformer to avoid risks, anyway good explanations and great repair.

  5. Robert Calk Jr.

    February 10, 2019 at 7:06 pm

    Good job, Chris. Thanks.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.