Amplify and clamp senzor output, analog to digital

Hello everyone,

I'm facing a problem I don't really know how to tackle :slight_smile:

I have a light sensor which which outputs voltage between 0 and 5 V (0 = bright, 5 = dark). I am only interested in readings when light is strong enough, let's say 0V - 2V. I then want to use a 16bit ADC to read these voltages. I can use an OpAmp to amplify the range from 0-2V to 0-5V, but I am worried that this will damage my Arduino, since the OpAmp will also amplify voltages above 2V..

What would be the best way? Is something like this even possible by using some simple circuit?

An ADS1115 16 bit ADC will give you 0.1875 mV resolution, at the 0-6.144V gain range, which is possibly more than adequate without amplification depending on your application. I would just start with that.

An op-amp cannot amplify anything above it's Vcc so if you power a Rail to rail op-amp with 5v it will saturate a little below 5V anyway. Besides, the ADC would be the component to get damaged, not the Arduino since it will get a digital signal from the ADC.

Your "concept" does not seem very coherent at this point. maybe you should describe your project in detail.

1 Like

The opamp output voltage can not exceed the supplied power voltage. Power it by 5V (for a 5V controller) and map the desired range (0-2 V) to e.g. 0-4 V and ignore ADC readings above 4V.

1 Like

Why do you think you need amplification and why do you think you need 16-bits?

The regular Arduino with its 5V reference gives you 5mV resolution so you can easily set the threshold at 2V, within about 5mV. Or you could supply an external reference at 2V (or slightly above) and you'd have 2mV resolution.

2 Likes

Thank you all for replies!

Sorry if the concept discription was not coherent.

I did not include an ADC yet, so far I only did readings with an OpAmp connected to an analog input. I wanted to increase the resolution as best as I could, that is why I wanted to switch to a 16bit ADC instead of using a 10bit ADC of the analog input. I am mostly interested in low voltages (which relates to bright light) and want to do further control based on those readings and my first thought was to amplify those voltages so that I get to use the entire range of ADC.

Oh, I feel so stupid now.. Don't know why I thought that could amplify above the supplied voltage LOL. Thanks a lot for pointing that out :slight_smile:

I'm using TL072CP OpAmp with a Gain factor of about 2 (22kOhm and 12kOhm), but for some reason only certain values get multiplied.. like between 2V and 3V are amplified like they are supposed to, but everything below 2V and everything above 3V results in 5V at output..
I have no idea what is going on and I my electronics knowledge is very rusty...

The 1st part is very odd...

Can we see the schematic, or a link to the schematic you used?

Of course, the 2nd part is normal with a 5V supply. 2.5V or more multiplied by 2 is going to saturate the output at the available voltage..

But the TLO72 is not a "rail-to-rail" op-amp so with a single (positive) power supply it won't go below about 0.5V or about 4.5V.

Note that a standard non-inverting op-amp circuit has a gain of 1+ the resistor ratio.

If you are reading ambient light, or light that's not somehow "controlled", the light variations will probably limit the accuracy/resolution of your measurements more than your circuit.

For more accuracy & precision at low voltages you can switch to the optional 1.1V reference when the voltage is low. That will give you resolution a little better than a 12-bit ADC with a 5V reference.

P.S.
Things tend to get "difficult" down around a few millivolts. It can be hard to get a good signal-to-noise ratio. Amplifiers amplify the noise along with the signal and amplifiers generate some noise of their own.

TL072 op-amp is subject to phase inversion as your input approaches the Vcc- which in this case I assume is probably ground. This causes the op-amp to swing to saturation which explains your results at lower voltages.

Your op-amp is totally unsuited for amplifying low inputs without a dual supply.

I followed the schematic as shown here:

With Vcc+ connected to +5V of Arduino and Vcc- to ground of Arduino.
Yup, my bad, with those resistors my amplification would be closer to 3 actually (2.8).

Yup, I am aware of the noise issue, but I will have to see how bad it behaves first.

Oh, I see.. So would the MPC6002 from the guide above be better choice? I only used the TL072 because I had one at hand, didn't really think that it would make such a difference..

Thanks!

Can you provide a link?

Thats not really a good way to approach a design. Start by defining what you actually need.

That depends on the speed of response you require.

Perhaps if you told us WHY you are doing this we could give more help?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.