I am trying to find a simple way to detect the colour of an LED on an inverter unit (for warranty and safety reasons I don’t want to open up the box). The LED shows nothing when the inverter is off (not powered), green when operating normally and orange when overloaded. I have experimented with fixing a red LED to the inverter status LED and measuring the voltage produced with a multimeter. I get 0mV when off, 20mV when green and 30-40mV when orange. I had hoped to be able to connect the LED anode to an analog pin and the cathode to GND and then read a discernible difference on the analogRead value accepting some noise so that I could distinguish between off, normal and overload. What I get is a stream of values that vary and indicate a value of 250-300mV even when there is no light on the LED. Can anyone comment on what is happening here - why am I picking up this voltage or is it that the current being produced by the LED is too small for the ADC to operate?
Hi @armor
I don’t think you are going to get very far with a red LED as a sensor. It is possible to make that work with an op-amp, but why? You could use a phototransistor and op-amp and that would be better, but the best solution is likely a board like this one:
You get a lot for your $8 with an i2c interface and 16-bit separate R, G, B resolution.
@bko Thanks for the ISL29125 IC solution suggestion. I have had a look and can see that there are loads of different light sensing I2C chips. I have ordered spark fun board to try it out - delivered this works out as GBP8! In any case this is too expensive for the solution I am seeking and possibly too sophisticated. I believe the lego technics light sensor uses LEDs and there are plenty of articles about using LEDs as light sensors. A phototransistor would simply give me on/off depending upon the light level - I am not clear how this could be used to detect between green or orange indicator light.
I was after an answer to my question Can anyone comment on what is happening here - why am I picking up this voltage or is it that the current being produced by the LED is too small for the ADC to operate?
Can I assume from your reply that the Op amp would solve this problem and that the current is insufficient for the ADC to operate? What sort of Op Amp setup should I be looking for - unity gain non inverting?