Whew! Just spent the best part of a day and a half working out what was wrong with the Arduino-based magic box that controls the lights and a bunch of other stuff in the house.
Its been working fine for a few months, but around a week ago it decided to either not turn stuff on, or turn it on and then forget to turn it off. Pretty poor show. Most of the HE kit has its own switch in the room where it lives, but some can only be operated with the remote control which can be a bit of a pain.
I scribbled a quick bit of code for the arduino to flash the various pins that operate the remote control, and discovered that the one that turns things 'on' wasn't working. The 'off' and 'unit' worked fine.
I started by checking the remote control which is hard wired to the arduino box with a length of CAT5 cable and a standard RJ45 plug - this lets me move the remote around the house using the CAT5 in the walls to get the best wireless signal for the HE stuff. Opened up the remote, no obvious signs of wires hanging off. Checked the voltage on the three pins that operate the control - two at 0v, but one at around 0.6v, no surprise that the odd one out was the 'on' connection.
I assumed that the remote was the most likely place for a fault, because I had to butcher it about a bit, so I replaced the opto-isolator for the 'on' button. No joy.
So the control box had to come out of the rack, and be opened up. I plugged the remote directly into the box and checked the resistance in the connections, all near enough zero as you'd expect. From this I assumed that the problem probably lay in the arduino - a dead I/O pin probably - so I switched the connections on the processor and changed the code to use a different one. Put it all back together, but no luck.
Out with the control box again, check everything again. Still no joy. While I had the bonnet up, I changed the 12 volt power supply that also lives in there - it was a switched mode supply previously and it had a lot of problems delivering 12 volts - sometimes it would drift up to 15 or 16 v, then other times it would drop to 4 or 5, playing havoc with my mailbox detector. I binned the old PSU and replaced with a conventional transformer/rectifier/capacitor arrangement and bingo, 12.5 volts bang on the nose.
After replacing the original I/O pin and checking the software yet again, I concluded that either there was some strange fault in the arduino, or there was a cable fault. Searched online for reasons for the arduino to play up without success, so I went back to the cabling. This time I checked every single connection of every cable between the processor and the remote, including individual patch leads and the cables in the wall.
All still tested good, but then a fluke - I happened to move the end of one of the patch leads while the meter was still connected and lost the connection: moved it a bit more and it came back.
Much happiness in the camp, the problem was an intermittent break in the patch lead (which is why it worked ok one day and not the next). Cut up and binned the offending lead, then celebrated by flashing all the lights in the house on and off a few times without leaving my chair, which didn't go down too well with 'er indoors.
- I've been taking things to bits, and making things ever since I can remember, starting with dismantling knackered alarm clocks and watches and helping my dad fix the car. Now I have a well-equipped workshop and have aquired lots of new skills, so I can make better stuff. When they first appeared, I became involved with personal computers, and these and developments in electronics have increased the scope of the things that I can do. Just recently retired, so O yes, now I can make all sorts of stuff.....