I would like to count the number of flashes generated by a yellow LED in my Schneider Me4ZR power meter. This power meter produces 100 flashes for every kWh. I would like to use One Wire protocol to count via my PC. [EDIT] My consumption is in average around 4 pulses per minute. I already have a working 1-wire network in my house that consists of temperature sensors, contact sensors and voltage meters for light level measurements. Then network is connected to my PC via http://www.homechip.com/catalog/product_info.php?products_id=158. It is working well for all other sensors so this is not causing an issue. As mentioned it is also counting light impulses when they are stronger/longer.
I have built a one wire counter from parts that behaves like this counter.
I have then built a separate light detect circuit identical with this one:
but I have replaced the LED with a 5V relay and protected the transistor with a diode connected to relay pins as shown here:
. I have connected this circuit to the 1 wire counter.
The reason I chose a relay instead of another transistor was that with a transistor I got too many random clicks when the led got on. With a relay I can get a clean contact on/off.
The relay switches correctly when exposed to a bulb and the counter increments as expected. All ok so far.
When I place the photodiode in front of the LED it does not work ok. I can still hear the relay click but the counter is not incremented.
I assume that the pulse length is too short. One solution I guess will be to increase the pulse duration.
How can I check what the cause of the issue is and, if the answer is to extend to pulse duration, how can I do that easily?