How to read very small signals

Thread Starter

Pepe333

Joined Feb 12, 2018
86
Hi all!,
I'm triyng to read light with a MCU. The MCU has OpAmp and 12 bits ADC embidded.
I can vary the "scale" of readings variyng the R/C in parallel. But after a limit, but as the light decreases, there comes a time when I can't read anything no matter how much resistance increases.
I'm assuming it's a uV / lux issue, but the issue is that I can't increase the tension on the OpAmp since it's built into the MCU.

Any idea how to increase the sensitivity in light of this circuit?
 

Attachments

djsfantasi

Joined Apr 11, 2010
9,237
Hi all!,
I'm triyng to read light with a MCU. The MCU has OpAmp and 12 bits ADC embidded.
I can vary the "scale" of readings variyng the R/C in parallel. But after a limit, but as the light decreases, there comes a time when I can't read anything no matter how much resistance increases.
I'm assuming it's a uV / lux issue, but the issue is that I can't increase the tension on the OpAmp since it's built into the MCU.

Any idea how to increase the sensitivity in light of this circuit?
To be able to answer, please attach your code, or add a listing using code tags (in the blue scheme, it’s a selection in the drop down menu beside the ellipsis).
 

djsfantasi

Joined Apr 11, 2010
9,237
Hi all!,
I'm triyng to read light with a MCU. The MCU has OpAmp and 12 bits ADC embidded.
I can vary the "scale" of readings variyng the R/C in parallel. But after a limit, but as the light decreases, there comes a time when I can't read anything no matter how much resistance increases.
I'm assuming it's a uV / lux issue, but the issue is that I can't increase the tension on the OpAmp since it's built into the MCU.

Any idea how to increase the sensitivity in light of this circuit?
12 bit ADC in a 3.3V system, cannot read a measurement lower that 0.8mV.

Is the voltage you are trying to measure lower than that limit?

What MCU are you using?
 

Thread Starter

Pepe333

Joined Feb 12, 2018
86
To be able to answer, please attach your code, or add a listing using code tags (in the blue scheme, it’s a selection in the drop down menu beside the ellipsis).
With the MCU, from STM32 family, I can change the sample time for ADC operations, I use the maximum I can. The code just initialize the ADC (from HAL library) and read the ADC in doscontinuos mode.
All works well, except I cant read nothing when light reach low levels (always reads 1 on the ADC)
 

MrChips

Joined Oct 2, 2009
34,829
You need to examine the following:

1) resolution, i.e. the smallest voltage you can detect
2) dynamic range, i.e. the smallest voltage and the largest voltage
3) noise, i.e. is the noise much greater than the smallest voltage?

You can mitigate around the effects of these by

1) amplification
2) increasing the number of bits in the ADC
3) filtering and/or signal averaging
 

Thread Starter

Pepe333

Joined Feb 12, 2018
86
Then, a possible solution could be to have an external OpAmp, powered by a higher Vcc and connected the the ADC when the voltage read from the photodiode will be less than a treshold.
Has it sense?
 

MrChips

Joined Oct 2, 2009
34,829
Then, a possible solution could be to have an external OpAmp, powered by a higher Vcc and connected the the ADC when the voltage read from the photodiode will be less than a treshold.
Has it sense?
It really depends on what you are doing and what you are trying to measure.

What is the light source?
What is the minimum and maximum intensity of the light source?
How fast is the intensity changing?
What light detector are you using?
How is the detector biased?
 

Thread Starter

Pepe333

Joined Feb 12, 2018
86

MrChips

Joined Oct 2, 2009
34,829
The caption in the first diagram above is incorrect. The output voltage is not necessarily proportional to light.
We can assume that what the writer meant to say was "The output voltage increases with light intensity".

In any case, we do not know that a photodiode is the appropriate device for this application.
We need to know what is the application.
There are alternatives such as LDR (light dependent resistor), photo-voltaic cell, photo-transistor, PMT (photo-multiplier tube).
One can also use a light-to-frequency converter or voltage-to-frequency converter and measure frequency instead of voltage.
 

MrChips

Joined Oct 2, 2009
34,829
I want to use it like a photometer/flashimeter, so speed is important (I attached a schematic in the first post). The photodiode is a BPW21.
I just discovered STM32 has a MCU series with 16 bits ADC embeded. Maybe this is the solution. Isn't it?
For a photometer, how critical is speed? Would 1-second response time be adequate?
Is this a photometer to be used for photography, and be able to measure ambient light in both daylight and nighttime?

For a flash-meter, what is the shortest duration of the flash?

I would imagine a photo-meter would consist of the following building blocks:

photosensor - electronics - conversion - display

I would think that STM32 would be overkill unless you are looking for specific attributes such as low-power, or 16-bit ADC.
24-bit ADCs are available which can be used on any MCU.

You can do frequency measurements on any MCU.
 

ronsimpson

Joined Oct 7, 2019
4,702
Going in a different direction:
I have use the TSL235R device to measure light. It outputs a frequency that you can count with the computer.
Depending on which light-to-frequency IC you pick they have a 1 million:1 range. (some are 5M:1)
I used the 4 color version R,G,B,IR. If I remember right you can set it to 3 different sensitive settings.
I used a very small 8 bit computer with a counter/timer.
1586623499182.png
 

Thread Starter

Pepe333

Joined Feb 12, 2018
86
The prototype is working and functional. The only problem I have is to read the light when it is very low (for 3.3v source and 12 bits resolution of the ADCs).
Here are some pictures of the device.
I can read a flash, calculate T10 and T50 (T10 is the time the flash is lighting over the 10% of the total light emitted, and T50 is the time the light is over the 50%) and also calculate the speed of the flash burst. The device takes reads every 1,5us. The screen uses ISP and its a touch screen.

i1.jpgi2.jpgi3.jpg
 

MrChips

Joined Oct 2, 2009
34,829
Now that we know more about your application we can narrow down the detector and electronics.
The duration of light from xenon flash tubes are very short, 1-100μs.
Hence you need a detector with fast response times. A photodiode or phototransistor is a suitable choice.
If you need to cover different maximum light intensities then you may required an op-amp circuit with selectable gain.

I see in the drawing behind your prototype you have a sketch of an op-amp circuit.
What is the actual circuit you are now using for the photodiode?
 

Deleted member 115935

Joined Dec 31, 1969
0
From what I see, Your fighting the fundamentals of engineering,

The light source is a flash, this is going to be very short duration.
It is also going to have a very large maximum intensity compared to the minimum / background level.

The faster an ADC runs, the worse its resolution is.
at slow speed a 12 bit ADC will be 11 effective bits, at full speed it might only be 8 real bits.

The resolution / number of bits defines your dynamic range.
If you have 12 bts, the max dynamic range is going to be about 6*12 = 72 db.

Look at your maximum input voltage that the senser can drive into the ADC ,
say this is say 2v, then one LSB is about 500 uV ( 72 dB down on 2V )
thats a fairly quiet circuit you need,
 

MrChips

Joined Oct 2, 2009
34,829
There are other things we still don't know as yet.
What is the gain and offset of the photodiode circuit?
Is the user utilizing the full range of the ADC?
What are the typical numbers recorded from a flash pulse?
For a wider dynamic range, would a logarithmic circuit be a better choice?
 

ronsimpson

Joined Oct 7, 2019
4,702
This is much information in the data sheet of opt101. The response time, bandwidth and noise numbers are states. It may help to see how much study was done and how it works.
1586629424676.png
 
Top