Saturday 1 July 2017

The "TWO Groups" Section Switch and the Internet of Things

The wife bought a fancy lamp for the gatepost which changes color when the power switch is flipped off and on quickly. I got a chance to look at it when it got damaged by a nearby lightning bolt. It turned out there were two LED lamps inside, one white and the other yellow. An electronic module switches one or the other or both based on the number of times you flipped the power off and on.


Now this is a great way of powering an Internet of Things remote device on the cheap. Say you want to install a WiFi camera and you want to be able to switch it on together with a nearby lamp (for night use), or to turn on just the camera without the lamp, or just turn the light on without turning on the camera. You install this Section Switch so that it powers both the lamp and the camera.

I dismantled the gatepost lamp, and the wife took it back to the shop where she bought it, where she had it repaired for RM20 (less than USD5). The shop replaced the section switch, and returned the defective section switch as proof of repair. You can buy it online (or at your friendly lighting shop) for RM18.

Warning - do not attempt this yourself unless you have had specialist training in switch-mode power supplies. There are lethal voltages in this module.

I thought I would fix the Section Switch just to see how it worked. It is easily opened- just press firmly at the base of the long side of the module and the base plate pops out.



The lights are switched by two 12V relays controlled by an integrated circuit, the JY2608. I am afraid the datasheet is in Mandarin, but don't let that stop you. The original website is a bit spotty- if you cannot get the datasheet place a comment here and I'll email you my copy.

The datasheet has a sample circuit for the JY2608 and it looked like the manufacturer has copied it lock stock and barrel. Here is the sample circuit from the datasheet:



Now the problem with the Section Switch was when switched, the lights took a very long time (sometimes hours) to come on. So we know the problem is related to the power section.

I powered up the defective module with this setup:


Note the use of an isolation transformer (the box with the white power dial) and and a portable ELCB for safety. The Section Switch has no transformer, so the semiconductors are connected directly to the mains power - in this case 230Vac. Some types of faults can cause the module to explode or catch fire if connected directly. Here, the isolation transformer limits the mains power to less than 20W. An isolation transformer can break the Earth connection to your house ELCB, so use an extra ELCB to protect yourself.

I have also secured the wires to a strip of screw terminals for extra safety.

OK, back to the input power problem. I measured the input power to the IC (the JY2608 is a 12V device) at D1 the 12V zener diode's anode and it read 5.8V. That is very far from the 12V it needs. Actually the JY2608 will work at 2V but the relays need at least 9V to switch.

I replaced the 12V zener with an 1N4742A and powered on, but the voltage stayed at 5.8V. So it is not the zener diode but something closer to the input power.

A closer look at the circuit showed that the bridge rectifier (four diodes in the shape of a diamond) is powered by C1 and R1 in parallel, a 1.5uF capacitor and 330KOhm resistor. I tested the resistor using the multimeter (the black and orange thing in the foreground) and it reads correctly at 330K.

Next I replaced the capacitor with a 1uF capacitor I had handy, and now the Section Switch powers up nicely at 12V and the relays clicked when I flipped the mains power off then on. 230V appeared on both outputs so the repair is done.

Now the repair costs some RM3 for the 1uF 400V film capacitor, and it only cost RM18 to buy, not to mention the hazards involved. But that is a little bit of electronics saved from the scrap heap.

The next step would be to hook it up to power an IoT device, so stay tuned!

[2021-05-01 Update] The section switch in the other gatepost failed: when the main lamp is turned on it started flashing, with the section switch clicking away briskly on its own. A diode (D4) in the mains bridge rectifier was shorting. Replaced that with a 1N4007 and it worked like before. In all fairness it is fairly reliable despite its cheap price. My gatepost lamps are exposed to the elements; alternately wet from driving rain and hot from the greenhouse effect of the glass lamp housing. Myriad bugs occasionally lived (and died) there.

2 comments:

  1. My gate light won't turn due to the faulty section switch- tapping it lightly sometimes causes it to come on. Any idea on how to remove the section switch and replace it with a new switch. There are 5 wires in various colors projecting from the switch and going downwards into the gate light housing.

    ReplyDelete
    Replies
    1. Yes. The 'section switch' relies on 12V relays to switch the lights on and when the DC powwr is low (like in the blog post) the relays do not have sufficient power in the coil ot move the solenoid. When power is marginal, tapping on it often helps.

      Best to get a qualified technician to repair it.

      Delete