All posts by Per Magnusson

The Christmas Tree Mystery

Today I noticed something peculiar. In our garden, we have a spruce in which I have put a string of LED lights. The lights are powered via a switch mode AC/DC power supply that creates the low voltage required by the LEDs from the mains voltage. This power supply is connected to an extension cord and a timer inside the garage and I have set the timer such that the lights are on only while it is dark outside. However, the LEDs were mysteriously glowing dimly in the middle of the day when they were supposed to be off.

Hmm, that is odd I thought.

Dimly glowing LEDs
Dimly glowing LEDs.

I did not think too hard about this at first, but a while later I realized what could cause this behavior. If the timer happens to be connected such that it breaks the neutral wire of the mains voltage instead of the live wire (phase), there could perhaps be enough capacitive leakage via the Y-capacitor going from neutral to protective earth inside the AC/DC supply such that the supply gets enough power to dimly light up the LEDs.

Y capacitors are present in virtually all switch mode AC/DC supplies. They are connected between phase and earth as well as between neutral and earth. Their purpose is to limit the amount of unintended radio frequency noise generated by the switch mode supply that is radiated back onto the mains network. There is usually also an X capacitor for the same purpose connected between phase and neutral.

In addition to the Y capacitor, there will also be leakage via the capacitance of the cable from neutral to earth as well as from neutral to the external world which currently consists of a quite wet lawn. But I would guess the leakage via the Y capacitor is much larger than the leakage via the cable capacitance.

The equivalent circuit for the case when the timer breaks the neutral line is shown below.

Equivalent circuit of timer breaking the neutral wire.
Equivalent circuit of timer breaking the neutral wire.

The dashed arrow shows the flow of current from the phase wire, via the AC/DC circuitry in the dotted box, the CY2 capacitor and back via protective earth. There will also be some current from from the neutral (disconnected) wire of the extension cord and the cable capacitance to the earth wire, CcableNE as well as a little current flowing in the capacitance from the cable neutral wire to the outside world (which as of this writing is a wet lawn). This capacitance is not shown in the figure above.

So, a hypothesis about what is happening is fine, but how could I test this? Well, that is not too hard. Just rotate the timer 180 degrees in the wall outlet so that it breaks the other wire, which according to the hypothesis would be the phase.

Timer breaking the phase (live) wire instead of the neutral.
Equivalent circuit of timer breaking the phase (live) wire instead of the neutral.

The rotation of the timer changes the equivalent circuit as shown above. Now the phase is stopped in the timer and no leakage can occur.

Timer before rotation
Timer before rotation
Timer after rotation
Timer after rotation

 

The LEDs are completely off!
The LEDs are completely off!

After this maneuver, the LEDs in the tree were completely off, so the hypothesis seems to be correct.

I would guess there are numerous similarly mysterious cases of LEDs powered via AC/DC converters connected to protective earth that light up dimly even when they are supposed to be off. The remedy is to make sure that the live wire is interrupted by the circuit breaker, rather than the neutral wire. In installations connected to wall outlets, this can be done by rotating the plug (if you are in country where plugs with protective earth can be rotated). In fixed installations, it is necessary to swap which wire is connected to the light switch, which probably requires the intervention of an electrician.

Reviving a Dead Mains Timer

It is that time of year when one puts electric advent stars and candlesticks in the windows. I usually use timers to control them, but this year I ran into a problem. Some of my timers were of the type “EverFlourish EMT757A”, probably bought at Clas Ohlson:

Back side of timer
Back side of timer

Despite having a notoriously bad user interface (that forces me to google the user manual each time I want to use them), the timers, that had been laying in a drawer since last season, showed an entirely blank LCD display, even when connected to a mains outlet. I guessed that an internal battery just need to be charged, so I left them connected for a day to allow them to be charged up. The display however remained blank.

Hmm. I had encountered similar timers before that needed the internal battery to be replaced, so I decided to have a look inside to determine if this was the case again. It turned out that the screws used to keep the units together had tamper proof tri-wing heads. Fortunately, I happened to have bits that fit this kind of head, so this did not deter me.

Tri-wing screw head
Tamper proof tri-wing screw head
Tri-wing bit
Tri-wing bit

I found that there was indeed a tiny chargeable NiMH battery inside the unit (the green component with white corrosion on the side, close to the center of the picture below). Despite the unwanted corrosion, I found that the battery was actually charged to 1.3 V or thereabout, which is fine for a NiMH battery. Maybe it did not need to be replaced after all?

Opened mains timer
Opened mains timer

But why then was the display dead?

I put the timer back together again and had another look at the front. Pressing any of the normal buttons did not result in any reaction, but there was also a tiny little recessed button marked RESET. I used a pen to press it and voilà! The display came to life!

The timer has been brought back to life.
The timer has been brought back to life.

Stupid me to not try this before I disassembled the unit.

I suppose the reason the timer behaves like this is that the processor controlling the display probably does not have a proper power on reset circuit. So when the supply voltage is ramped very slowly, as it is when it is powered from a battery that is trickle charged from a state of being completely dead, the processor does not jump into action properly, even after the supply voltage reaches its proper level.

Electronics Podcasts

I regularly listen to a number of podcasts and below is a list, along with some comments, of the electronics related ones.

I find that the podcasts provide inspiration, insight and knowledge about tools, projects, parts, companies, people and resources in the world of electronics. I first learned about many of the building blocks, components and development tools I use in my hobby projects through these podcasts.

The Amp Hour

I guess this is the longest running electronics related podcast I know of, started in 2010. “An off-the-cuff podcast about electronics designs, and anything electronic industry related.” Chris Gammell and Dave Jones (of the EEVblog) chat weekly either with each other or guests about industry news, hacker/maker/open hardware stuff or other things mostly related to electronics. Chris works for Parts IO and teaches the online course Contextual Electronics while Dave is an opinionated and quite successful youtuber. If I need to pick a favorite electronics podcast, this is it.

Embedded

Started in 2013 this is another weekly show, but slightly more geared towards embedded software than electronics, although some of the guests are more into electronics. Elecia and Christopher White discuss between themselves or with guests about “the how, why, and what of engineering, usually devices.” The guests include “makers, entrepreneurs, educators, and normal, traditional engineers.” Both Elecia and Christopher are embedded software consultants in Silicon Valley. Well worth a listen if you are into electronics or embedded software.

The Spark Gap Podcast

“A podcast discussing the nuts and bolts of embedded electronics, the systems that use them, and the community that surrounds them.” Started in 2014 and hosted by Karl and Corey. Episodes often have a specific theme and occasionally features guests. This podcast recently came back from a five month hiatus and hopefully new episodes will continue to appear reasonably regularly.

MacroFab’s Engineering Podcast

MacroFab describes themselves as “The World’s First Self-Service Cloud Manufacturing Platform” and seem to specialize in small volume PCBA manufacturing. The weekly podcast was started in 2016 and is hosted by Parker Dillmann and Stephen Kraig who are engineers at the company. They mostly talk enthusiastically about projects they are working on (they seem to do a lot of fun projects, often with unclear connection to the business) and discuss industry news. The program can be quite inspirational and does not feel like an ad for MacroFab.

A little warning might be in place. Of the podcasts listed here, I get the impression that this is the one on which the hosts are most likely to sound relatively sure about something that is utterly wrong.

SolderSmoke Podcast

SolderSmoke is mostly about home-brew HAM radio. Hosts Bill Meara, M0HBR, and Pete Juliano, N6QW, discuss their radio projects and issues they run into. This is the show for anyone who is interested in home-brew radio or perhaps HAM radio in general.

The Engineering Commons Podcast

This bi-weekly podcast is only occasionally about electronics and more often about other aspects of engineering and being – or becoming – an engineer. It was co-founded in 2012 by Chris Gammell of The Amp Hour, but he left the program a few years ago. Today the show is hosted by the other co-founder Jeff Shelton (a mechanical engineer) as well as Adam (civil engineer), Brian (electrical engineer) and Carmen (also an electrical engineer).

PCB Tech Talk

This podcast was started by Mentor Graphics in 2015 and was hosted by John McMillan for 10 episodes before it abruptly ended for unknown reasons. It contained some useful information and insights for PCB layout designers, but also tended to push Mentor’s tools and brand. It distinctly felt like it was produced by a company as opposed to the other podcasts on this list which are run by more or less independent enthusiasts.