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.

The LED area is selected clicking and dragging with the mouse. Some sort of dark cloth sleeve is necessary to pretect the camera from glare and reflection which might cause false or missed reading.

The camera view is activated pressing the “v” key on the keyboard. Click and drag a square around the LED. When done press any other key to turn on the count reading window, the one below :

The bars represent the total reading for a 5 minutes slot starting from 0:00 to 23:55 hours. The height of the bar is the reading (in my case 1Wh per pixel) and is incrmented every blink of the LED (1 Wh gone). Hovering the mouse on window (do not click on the window) returns on the top left the reading (kWh) for the time slot on the extreme left. Click on the image above to go to the flickr’s noted version for what the peaks are due to.

On the right of the string is the total reading over the last 24 hours.

A reasonably fast PC is necessary though to catch the quick blinks and evaluate the very frequent counts during peek energy requirements. And I didn’t want to dedicate my main dual core desktop PC to the purpose.

For now I did not design any mean to read remotely the data. Of course it is probably nonsense to keep continuously a fast-power hungry PC for the purpose. The Tweet-a-watt is a better option, with remote reading option also.

But I wanted to try this.

Version 2 !

It would be faster and less processor intensive to use an external event derived from the blinks and input it somewhere into the PC and log it with Processing.

I went for the “recycle way” and took apart an old mouse (well, no so old) and hooked the following circuit to the left mouse button : the light of the LED makes the TIL78-like phototransistor go into conduction which triggers an ever green NE555 (in the shape of a CMOS TLC555). The monostable in turn makes the NPN transistor close the relay which close the left mouse button of the mouse. Simple yet effective.

Side effect : the mouse can’t be used for anything else during count accumulation, otherwise the counts are affected, obvious. A dedicated external USB I/O device would solve the problem but this cost zero.

The purple wires are hooked to the coil of the relay inside the mouse.

The sketch for Processing for photo transistor version is here.

The sketch for Processing for the web cam version is here.

Have fun.

Alessandro

This a simple circuit I designed and built to convert light variations into sound. It is fun to listen to the weird sound emitted by the light of remote controls, light bulbs, TV screens and any light source.

light to sound converter

The circuit is very simple and is based and pretty well known building blocks : a pin photodiode amplifier (U1A) converts current variations in the photodiode into voltage variations at the output of U1A. R1 is a small potentiometer used to set the gain of the current to voltage converter. Too high the gain and the amp saturates with no output, too low and no output will be heard.

The amplifier is based on a common LM358 but any other device suitable for single supply with same pinout should do.

R2 sets the volume while U2 is the amplifier based on the well know LM386 : I actually used a different amplifier, a TDA2822 which happens to be a stereo amplifier found in PC speakers. I decided to put the LM386 in the schematic because it is probably easier to find.

This is the schematic.

I tried a few photodiode I took from various devices. A few are mostly sensitive to infrared, but I ended using a visible light PIN photodiode, the BPW34 which is pretty common and cheap.

The cathode of the PIN diode is marked by a small tab on one of the two diode’s leads.

The whole device can be built on a small piece of perfboard and the output can feed a pair of head phones or a small speaker. PC speakers could replace the amplifier stage but at the cost of portability. The circuit would easily fit into an Altoids tin box.

The use is immediate, just put the battery on and play with the gain and volume while pointing not directly to a light bulb : you should hear a strong buzzing noise (the 50/60 Hz mains), then try any TV (CRT or LCD), any remote control or flame.

The photodiode amplifier was not originally designed for this gadget but is intended to be part of a supercool circuit I’m working on and that hopefully will end one of these days centuries.

And this is a video. sorry for the dim light but it is evening now and I wanted to do it NOW !

I could not use regular AC (110/220Vac) light as it would have caused a strong hum.

UPDATE : Derek of Umatic/Tonewheels designed a PCB for the circuit. See his site for details.

Thank you, Derek, for sharing.

For now, have fun.

Alex.

After all, VFDs also have a heater, grids, anodes and are encased in glass. And they glow in tha dark.

Vacuum Fluorescent Display as a headphones amplifier

VFDs are common on VCRs. I have a few of them I took from some broken VCRs. Last night I was working on how I could use them as vacuum triodes. I don’t have much experience with real vacuum tubes so I had to invent some, possibly wrong, arrangements, but I finally got something.

I’m not going deep into the structure of VFDs as I wouldn’t add anything to what is available on Wikipedia or on manufacturer’s websites. Just need to know that the heater (or filament) is made of thin straight metallic wires that emit electrons (thermionic effect) when heated by current. The electrons are accelerated by the electric field generated by a voltage applied between the heater and the metallic anodes, the metallic plates shaped as digits and pictograms and that are covered with fluorescent paint which glow when hit by the electrons.

A number of thin grids are placed between the cathode and groups of anodes with the purpose of screening or letting go the electric field generated by the voltage at the anodes.
A negative voltage between one of the grids and the cathode will generate an electric field opposite in sign with the anode-cathode one, reducing or voiding at all the latter. The electrons will be stopped and will not reach the anodes behind the grid and those digits will be dark. A positive voltage at the grids is actually necessary to pre-accelerate the electrons.

That said, I reached this final layout.

Connection diagram, Vacuum Fluorescent Display as a headphones amplifier

The grids are connected together as well as the anodes. I connected a headphone between the anodes and the positive of the anode voltage through a decoupling capacitor.
The grids are polarized by a 100k Ohm resistor to the positive and the audio fequency is fed into the grid through another decoupling capacitor.

Vacuum Fluorescent Display as a headphone amplifier, grids and anodes in parallel

The heater generally requires 2-3 Vdc. When powered from AC they give a more uniform brightness but in our case DC is better, to limit hum into the headphones.
The anode voltage may vary between 20 to 40 Vdc, depending on the model. The connections to the filament are the only ones to be really careful about as misplacing them and feeding with the anode voltage wil blow the heater. Looking closely through the glass of the display the filament and their connections to the connection pins can be easily found.

Vacuum Fluorescent Display as a headphone amplifier, closeup of display

The power into the headphones is limited but I never expected more than this.
A novelty, nothing more, possibly.

Might behave better as low power preamplifying stage for a real vacuum tube power final stage.

That’s it, and I had fun.

Addendum (after comment from Hiro Protagonist) : The arrangements of the anodes in the drawing is simplified as the display I used has multiplexed digits, that is the segments and pictograms are paralleled inside the display to minimize connections to the driving IC is usual applications. This limits the use of the VFD as a multiple triode.