How to amplify voltage drop

I have a 3.3V supply going through a variable resistor "R" into the analog read pin of a ESP32 board. When the resistance increases the voltage drop is more which is reflected in the serial print plots. Since I want to see the rise of resistance and not the drop in voltage, I grounded the analog read pin through a resistance and now the arduino plotter graph rises (instead of falling) when the voltage drops (I guess that's because this is now a voltage divider configuration?)

Anyways, my problem is that the voltage drop I am seeing is only few ADC values. I'd like to magnify it (without using a finer adc). How do I do it? I tried a non-inverting amplifier with 10X gain using a LM324 powered between 3.3V and GND, but output from the amplifier is showing no change with change in resistance..

What is the range of resistances you wish to measure?

about 1V to 1.16V. That 0.16V drop or rise I'd like to be reflected in like 1000ADC points (or even more if I can manage it, for fun sake).

If you use the correct voltage divider you can get a bigger voltage range.
What is the resistance range you wish to measure?

1 Like

"A schematic is worth a thousand words"

The LM324 is not a rail-rail op amp. Also the ESP32 ADC isnt so great.

What resistance values are you using?

1 Like

What value resistor did you use?

Swap the positions of the resistor and variable resistor to make the voltage go up as the resistance of the variable resistor goes up.

You have probably chosen an inappropriate value for the resistor, but you haven't told us what it is.

I don't have an ESP32.

According to the documentation for the ESP32 ADC, the ADC has 4 ranges.

By careful choice of the resistor value and ADC range it should be possible to use the full range of the ADC.

So this is actually a conductivity sensor with two electrodes submerged in water.

Below is the block diagram. I have used this design to convert DC to to AC so ionic migration doesn't play spoil sport. There are 4 switches used to switch the direction of potential difference across the submerged electrodes. switch 1 and four open together and switch 3 and 2 open together, alternatingly.

Since the variable resistance is water itself its a very low resistance, so low in fact that without the grounding of the analog read pin I can't see any change in the readings and the output is a full 3.3V (4096ADC). When the readings do change (when analog pin is grounded) like when the quantity of water changes between the electrodes, the following happens.

The value of the resistor between the ADC pin and GND is 1K.

I'd like to make this above change something like 1000ADC points.

The resistance/resistivity of water is very high.

Are you confusing resistance with conductance (the inverse of resistance)?

I read the resistance of tap water is very low, like 2-200 ohms. My theory might be going wrong somewhere, I'd be happy to be corrected, but the thing is what I want to happen is happening, its just not happening good enough. How do I make it better? How do I make that rise in graph larger?

If S1 is open, how does 3.3V get to electrode?
You need another resistor to form a voltage divider, what you have will not work.

..but only if it is correct.

Is the switch S2 really connected like shown in post #8?

My language might be wrong. I mean the switches work in a way that when 1st electrode is connected to 3.3V, the second is connected to analog read pin. When the second is connected to 3.3V, the first is connected to analog read pin. The connections keep alternating.

Yes. Basically these four switches are deciding when what is connected to 3.3V and to analog read pin. My post above explains the purpose.

Do you own an Ohmeter or multimeter? If so, put the probes 2 cm apart and 4 cm below surface of water and tell us what it reads (in Ohms).

Measured it. I am confused, its high, like close to 1MOhm. How can it be so high and still give an output without any voltage drop? Also the resistance measured is constantly rising, which I guess is to be expected as the multimeter is supplying DC and their is ionic migration happening in the water. I guess my set up might be a better judge of finding the resistivity of water.

Try this circuit:
Apply 1V to the probe connection and adjust R6 untill the voltage at T1 reads zero.
Revove the 1V and connect your probe.
You can use the LM324 you have

or is it connected like this? :


Position of S2 moved to other side of S1.

Ok, I'll repeat it just so I'm sure I got you right. Correct me if I am wrong. The output which I was feeding into the analog read now goes into R17, and I alter R6 until the point where R7 meets U1 gives zero volts? That correct?

I think its the same. Yes the connections are as this one.