Guyzz i have a Wattmeter with 2 yellow leds on it.
The Meter is in a cupboard that is normally closed , meaning darkness is in there.
The Top led gives 10000 pulses / KWH (Kilo Watt Hour), the bottom led gives 500 pulses / KWH.
I would like to mount a phototransistor on the meter , and count the 500 pulses LED , with an AVR (prob a M168 5-volt).
I have bought 2 different Phototransistors
This is my first experience with a Phototransistor , so i would like some guidance (mounting hints and schematic). I would suppose that the Powercompany would NOT like for me to drill a hole in their meter , and not to destroy or make any marks on their meters plastic surface.
My idea is to connect the Phototransistor to an external interrupt on the AVR , and increment the KWH counter on each 500 pulses.
I have two potential problems ... maybe more :-)
1: The topled also pulses 10000/KWH, and might give false lght to the Phototransisor mounted at the bottom LED.
2: When i open the cupboard door there will come daylight in (quite a bit) , and that might give trouble with the readings. But the door would not normally be open , and it takes some time (hopefully to make 500 pulses , or my Power Bill will be $$$$$) , so maybe i would be able to live with that misreading/miscounting. Maybe i could wrap the meter in a "Black plastic bag".
How do i adjust the sensitivity on the Phototransistor , to get a "clean" interrupt.
Edit: It seems like yellow LED is around 590nm wavelength , and that is not the most sensitive area , for the phototransistor. But it is approx 45% of max sensitivity.
The BP103B has a daylightfilter , would that do any good , if the door is open ??