I would use a phototransistor. Select a PIC which has analogue op-amps and a CCP module. Use an opamp for = the amplifier and the CCP module to measure the flash rate. You should then be able to come up with a program that measures the rate of= flash to come up with a consumption figure. I would be interested to see what you come up with. > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf > Of David C Brown > Sent: 20 February 2018 10:29 > To: Microcontroller discussion list - Public. > Subject: [EE} Detecting a flashing LED >=20 > This is one of those so trivial problems that shouldn't need advice but, = as so > often with me, I have over researched to the point where Ic an't make a > decision. >=20 > Since I am not going to get a smart electricity meter real soon now I > intend to build my own power monitor. The meter has a red LED which > flashes 1000 times per kWh and the key to the project is measuring the ti= me > between flashes. >=20 > But I can't decide the best way to detect the flashing LED. CDS photo > resistor followed by a Schmit trigger; photo transistor followed by a > transimpedance amp. There should be no problem excluding ambient light > and the LED flashes for about 1/2 second. > __________________________________________ > David C Brown > 43 Bings Road > Whaley Bridge > High Peak Phone: 01663 733236 > Derbyshire eMail: dcb.home@gmail.com > SK23 7ND web: www.bings-knowle.co.uk/dcb > >=20 >=20 >=20 > *Sent from my etch-a-sketch* > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .