Signal 100mVdc to 5Vdc AD reading

Guys, I need some help with the following case.

I have an analog signal from 0 to 100mV that I need to read with the ATtiny85 AD. One question is which amplifier can I use in this case and what would be the configuration? And with regard to the power supply of the operational amplifier, would it have to be a symmetrical source with a value greater than 5V?

I haven't used the ATtiny but you might be able to adjust the ADC reference for more sensitivity. Most Arduinos have an optional 1.1V reference and that gives about 1mV resolution, or you can supply an external reference (but I assume you'd lose accuracy with a reference of 100mV.)

Non-inverting amplifier

Typically, op-amps use positive & negative power supplies. They don't have to be symmetrical if you don't need negative voltage-out, but most op-amps need a negative supply in order to go all they way down to zero.

There are "rail-to-rail" op-amps that cn operate from a single positive voltage so they should cover the full power supply range so with a single +5V supply the output should be able to go from 0 to +5V. I've never used one or dug-into it but I have a suspicion that you might still lose some millivolts on each end.

I've got an application where I feed an Uno audio through an op-amp circuit (It's actually a peak detector, not an amplifier). I power the op-amp with +/- 12V and then I have a protection circuit (two diodes and a resistor) so I never feed negative voltage or excessive positive voltage into the Arduino.

1 Like

There are a lot of them available. Try using the search term "op amp 5V rail to rail" and see what appeals to you. The faster the better sounds great but the faster the more problems.

This is the link I used for this for a drawing and I I got the link recommended by dvddoug. I highly recommend you read it to get a good insight as to what is happening.

Remember you will need a clean power supply with these signals.

Use this circuit:
6_opamp_circuit_Non-inverting-amplifier_E
Where Gain is 50. R1 depends on R2, choose one of them and calculate the other (around 10k is a good value but depends on the signal power).
For power supply, you can use the same as the ATTiny, 5V and GND.
And for the op amp, look for a low noise op amp, your signal is too small and could easily get noise. You could try the 741, but is not that good and may not be enough.
You can also buy a high resolution analog input module. They usually works with I²C and have several inputs as well as 16-bit resolution and adjustable range (that's the useful part).
Example: ADS1115

So it is impossible to make a meaningful suggestion without any specific details on what you are measuring and what you are trying to do.

The datasheet says the ATTiny85 supports a 1.1V internal reference. If you use that instead of 5V you will not need to worry about op-amp saturation on the high end, you will not need as much gain, and you will get better resolution from the 10bit ADC.

The lowly LM358 op-amp gets as near to GND as you are likely to be able to measure with any reasonable accuracy, and might be all you need.

1 Like

I hadn't looked at the datasheet before and after my friends' suggestions, I saw that I can use the internal reference of 1.1V and also a 2.56V one, with the option of using a filter capacitor in PB0.

And I also saw and did a search that it has something that it seems to me that the ATmega328 does not have, which is a differential input for analog reading. With option to win 1 or 20.

As I am going to read a 100mV signal from another electronic board and the GND are common, I thought the following.

I put the gnd in the negative input of the differential and the 100mV signal in the positive input.

I enable the gain of 20, then I will already have 2V and use the internal reference option of 2.56V.

The value read will be converted into a scale from 0 to 100 so I think I won't have big problems.

Now I've never used this differential input in a microcontroller and I don't know how this 20 gain issue is.

What do you think?

Anyway, I'm going to leave an amplifier in the schematic for any problem to occur.

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