Light resistor suggestions

I wanted to use the light resistor to pick up a blink from my powermeter, and log 0.1 kilo watt hour (kwh) to a graph.

but with the light resistor I can only log light levels etc. not able to modifying the values of what to log.

Are you using a Pi or Arduino? I can’t think of any way to create a counter for Cayenne using a Pi, but if you are using Arduino you can save values to an SD card (to preserve through a reboot) and upload that value with a generic analog widget.

Just a few hardware tips…
I managed this but found that a photo transistor was a LOT more sensitive. Either way a potentiometer may get the trigger / threshold closer to the trigger point. If light levels change a lot then on some projects I use 2x LDR in series and monitor the mid point to make it more immune to day/night ambient light variations.
Also…
How long is the blink ? Just thinking what is the sample rate at which the GPIO pin is read and would it be fast enough to detect the ‘blink’
~ Andrew

Another good point. With the Pi it’s very possible to miss it (Pi only checks pin values every 1 second or so) but with Arduino easy enough to catch.

Its on an arduino.

actually the powermeter both have a blinking lamp, thats blink everytime my heatingpump have used 0.1 Kwh.
and an electric output signal, which I suspect also sends out a small amount volts.

For awhile a actually had a rpi running with a light resistor script, connected to electric output signal instaed of a light resistor, and it worked fine.

Hopefully I can replace the resister too here, but its easier to test with the light resistor first.

A micro small PV cell perhaps ?
But that would almost need a fussy adc input perhaps ?
The photo transistor as above I found to be Very sensitive and has a much better response. WPU would be needed but that is available via software in some micro’s andRasPi (used by Scratch GPIO etc). It would be very nice if WPU was able to be turned on in the Pi Per pin and that would give us a neat 2 wire sensor solution for this and some other resistive IP ideas.
More sideways information… LED’s put Out a very small PV voltage esp when excited by similar wavelength light. Might be worth a play some time :slight_smile: E.g. In case you wanted a budget RGB colour sensor just hook up a Red, Green and Blue LED to adc channels. Do a mini calibrate routine and away you go.
~ Andrew