Selasa, 28 Juni 2011

TLC 555



TLC 555
Most modern energy meter have one or more LEDs which blink at a rate directly related to the energy used. The one above has two of them : one pulses at 1000 pulses per active kWh, the other one pulses at 1000 pulses per reactive kWh. I dealed with the active power only, event though I’m billed partially for reactive power also.

The idea is to collect the blinks of the LEDs in 5 minutes blocks. Twelve groups of 5 minutes-worth counts give an hour, then data are collected around 24 hours.


I used Processing to read to read the LED through a webcam and detect and collect the blinks.

Processing and its video library is the most obvious choice to me as I’m not much of a high-level programmer. Processing is well supported and gives instant gratification. It also runs on a variety of platforms, including my little Acer Aspire One where I managed to have processing run some time ago.

Grabbing the camera image is straighforward with processing : had to install vdig (vs 1.0.1) as instructed in the processing support forum and Apple’s Quicktime 7 which is the essential part to grab the video Everything went smooth, on my desktop at least. I couldn’t have it running on my Aspire One as vdig of course doesn’t run on it, and would have had to use a different library.

That said, I wrote a quick ‘sketch’ in Processing to grab the camera, select with the mouse the “hot spot” of the meter (the LED) to minimize interference from the reactive power LED and ambient lights reflection. The code also represents visually the energy used in 5-minutes chucks over the 24 hours.

This is what is seen in Processing through the web cam. The image is upside-down because the camera is. But of course it doesn’t matter.

Tidak ada komentar:

Posting Komentar