Close

Wire Guides in, New Power Supply

A project log for EL Wire Clock

An Electro-Luminescent Wire Analog Clock

bharbourBharbour 01/06/2017 at 18:210 Comments

A friend printed the wire guides that I designed to hold the EL wire straight, and I installed them and was able to put all the wires in. It was still a fiddly process, but it was possible to do, and the results look pretty good. I installed the opto-triacs to control the wires and wrote a simple sequencing test program. All the wires light up.

I replaced the MIC4826 with a commercial inverter module designed to drive EL wire. The brightness on the wire is now acceptable and the opto-triacs switch OK at the 3KHz output frequency of the inverter. In order to make sure that the inverter always has a load on it, I put a circle of EL wire around the outside of the wire guides. This also accentuates the length difference between the hour and minute wires, making it easier to read as a clock.

My plan for timekeeping is to use the 60Hz (US) power line frequency on an interrupt for the MCU. Initially,I had a 9V feed off the input bridge rectifier, before the filter cap, that is divided down and clamped with a diode to not exceed the 3.3V power supply rail, feeding a GPIO pin with an interrupt on it. When I tested it, it turned out to be a random number source, rather than a time base. I put code into the interrupt service routine that sets another GPIO line high at entry to the ISR and low again at the exit to the ISR. The GPIO line was showing 1 to 5 pulses on the falling edge of the rectifier output, and 0 to 5 pulses on the next rising edge of the rectifier output. There should have been a single pulse on the falling edge of the rectifier output. It turns out that there is a lot of fast, high amplitude noise on the rectifier output. Some of the noise is probably from the input of the 3.3V switching regulator that powers the rest of the board. Some of the noise is probably from neighbors solar inverters and some is probably from power line communications used by the utility company. The GPIO line is supposed to have 0.4V of hysteresis which I had hoped would deal with the noise. It didn't. My solution to this is to trigger an LM555 set up as a one-shot, on the falling edge of the rectifier output. The 555 resistor and capacitor are chosen for a pulse length of about 7.8mS. The haversine signal coming out of the rectifier has a period of about 8.3mS, so the 555 will trigger once per period (120Hz). The 555 output (about 9V) is current limited and clamped to not exceed the 3.3V power supply, and fed into the GPIO input. The phase accuracy on this is going to be pretty awful, but the clock shows time in 5 minute increments, 8mS jitter is ignorable! After testing with the mods in, the time is within seconds of the expected time when run over a 24 hour period. This is as close as I can get testing with the debugger.

My plan for timekeeping is to set the clock on powerup from the on-board GPS module, then shut the GPS down and run on the powerline frequency time base. Every night at midnight, the GPS will be powered up and if a fix is availible, the on-board time will be corrected.

I wrote and module tested the UART device drivers earlier in the week. The next step is to carve up my NMEA parser code to strip out parsing for the messages that will be ignored or disabled. Having the GPS time available will be a good way to check the accuracy of my power line cleanup method.

Discussions