Using LEDs as photosensors

Hi guys, I have a project that requires a large photo-sensor array (something around 150mm x 50mm), after doing some research it seems like there is not really anything like that on the market.

I have considered ordering some PCB's and building my own arrays, but I found a few interesting videos where people have used LED arrays as photo-sensors:

I think this is the approach I would like to take, to which I have some questions..

  1. How excatly would one wire such an array, do I use a matrix schematic?
  2. Are different color LED's more or less sensitive to different wavelengths? e.g if I am trying to sense red light should I take a red LED array for best results?
  3. Has anyone here done something similar, and can offer any tips or advice?

Cheers,
Mick

Google "Mitsubishi idropper" for the basics.

1 Like

I didn’t get any hits with that term, but scratching around, I found THIS

I’ve seen the concept before, but have no idea what the search term might be.

Yes, LEDs respond only to a narrow band of wavelengths a bit "bluer" than their emission color.

See this tutorial: https://makezine.com/projects/make-36-boards/how-to-use-leds-to-detect-light/

Not directly, as it is very small. It is best to use a transimpedance amplifier, a very simple circuit shown below and described in Mimm's article. Any decent low voltage, rail to rail op amp can be used, even with 3.3 or 5V.

Keep in mind that the voltage produced by a photodiode or LED is not related to the light intensity, whereas the short circuit current is linearly related.

Circuit I have tested shown and described here; however you will need 1 op amp for each LED.

"I have a project that requires a large photo-sensor array (something around 150mm x 50mm)"

Can you explain a bit more about the project - there may be a more appropriate solution using a ready-made unit

If youre using a laser phototransistors might be sensitive enough.

@johnerrington yes it might be an option. The main reason I was considering the LED‘s was because they are already available in noch looking arrays such as this: https://www.ebay.de/itm/252279702870?mkevt=1&mkcid=1&mkrid=707-53477-19255-0&campid=5338792761&toolid=10001&customid=Cj0KCQiAip-PBhDVARIsAPP2xc3pEbpFxRBD-IPg0tPMo3Z2rW9-FLGzuERQbRaNYGQaG4tpre2DPu4aAhTCEALw_wcB&gbraid=0AAAAADGzhXQYCthQ0asUSZFWC2Yk2Nfnr&gclid=Cj0KCQiAip-PBhDVARIsAPP2xc3pEbpFxRBD-IPg0tPMo3Z2rW9-FLGzuERQbRaNYGQaG4tpre2DPu4aAhTCEALw_wcB

3 of these would do the job I think.

I have been doing a lot of searching and I can’t find anything similar with photodiodes or phototransistors. Perhaps I must make my own

I wrote this web page about 12 years ago about my experiments with this.
http://www.thebox.myzen.co.uk/Workshop/LED_Sensing.html

1 Like

After some more searching I stumbled upon this:
https://www.cs.cmu.edu/~ehayashi/projects/lasercommand/

It occurred to me that I only need to know which column is being illuminated, not which pixel.

That means for every 8x8 array I use I only need 8 analog inputs, one for each column (anodes) and each row (cathode) could be connected directly to ground.

Do you guy think something like the MCP3208 would work for my analog inputs?

It would, but what advantage would it give you over the built in Arduino ones? If it is more inputs you are after just use an analogue multiplexer like the 74HC4051.

First time you mentioned this as far as I can tell. An ESP32 is NOT an Arduino. It just so happens that people have bent the Arduino ISD software to program it, but it is not an Arduino nor is it a development of the Arduino. It is an interloper.

Yes.

No.
Your processor was kept secret from us. It is so radical different from a real Arduino that unless we know about it we will just assume it is an Arduino.
I don’t use these so I am not the person to give you advice about it. If you said up front what you had I probably wouldn’t have replied to you because it would have been a waste of both out times.
This forum is run and payed for by the Arduino company and is meant for Arduino and related open source hardware.

Not that I know of, I can’t think of why anyone would want one. The hobby electronics rides on the back of industrial electronics. Devices only get made that have a demand from industry.

Well that is a surprise to me but as I said I don’t know too much about it, but I have not seen it mentioned before.

My results with a matrix were not good, a matrix is quite different from what you have. The bar display is just like individual LEDs with a common ground .

And quite frankly, most of us who frequent these fora are perfectly happy to consider the ESP in the same light as an Arduino. :+1: As soon as you mention "WiFi", we mostly agree that it is time to forget Arduinos as such; while there are some Arduinos that are adapted for WiFi, the simple fact is that they are cumbersome and inappropriately expensive.

It is most certainly reasonable to give arduino.cc due deference for providing the fora and we should support them where possible, but not to the extent of using the wrong hardware.

Common blunder is to forget our lack of functional crystal balls. :astonished: As you did, people start to describe a problem without realising that while they know what parts are in sitting front of them, no-one else does so the critical first step is to describe what they actually have.

Perhaps most commonly it is a UNO as that is the Arduino "flagship" despite being impractical for most applications.

I suspect you will do better to use the diodes in photocurrent rather than photovoltaic mode. Reverse bias with a pullup of at least a Megohm and monitor the voltage.

No reason whatsoever to imagine that. :worried:

A bar display with a common ground? :roll_eyes:

@Paul_B I made the common ground myself by bridging the pins, and measured the voltage from the anode. Seemed to work quite well, especially when using gain on the external ADC.

Regarding the stock ESP32 ADC, i was certain I had this problem once before, and sure enough it is as I remember
The ESP32 needs over 100mV before the ADC registers any kind of reading.

Could you elaborate with the reverse bias system? I connect the anode to ground and pull up the cathode?

@Grumpy_Mike sorry if I misinterpreted your reply, just seemed like you were annoyed.

With a high value resistor - 1 Megohm or more.

It is described in the link I posted in reply #11, under the paragraph "Practice".

I said there are two ways, you have been using the latter.

This involves a bit of electronic gymnastics with the ends of the LED, but as the Arduino has configurable pins this is easily done in software. The other trick is instead of waiting for the capacitor to discharge enough to give a logic zero, which can be a long time, simply measure the voltage across it, after you have given it a short time to discharge.

I have done some experiments and I have not had any luck using the reverse bias method. I could not see any noticable change on the adc, I tried various resistors between 1M and 10M.

I have done some tests with an 8x8 matrix and I am have some pretty good results measuring the forward bias voltage, so I think I will continue with this method for now, and hopefully it proves to be reliable..

"Luck" is dodgy. :roll_eyes:

I think you really need to show us exactly what you did in circuit and code, before we can go further.