Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Why different resistor values in a simple circuit affect sensor output?

Status
Not open for further replies.

gary_feesher

Newbie level 6
Joined
Jul 14, 2017
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
135
I am testing a simple two-wire conductivity sensor from a Chinese supplier that didn't provide much information or data sheet.

I wired it up to an Arduino, and tested different resistor values with the sensor in some tap water.

I am trying to understand how the different resistor values are affecting my output? For example, no resistor was showing higher outputs than the 330k resistor.

Thanks for any support!


Code:
 int condVal;
int i=0;
 
 void setup() {
   Serial.begin(9600); //establishes a connection to the arduino
 }
 
 void loop() {  //everything between these curly braces will loop
    condVal = analogRead(A0);
    float voltage = condVal*(5.0/1023.0);
    Serial.println(voltage);
    delay(1000); //delay before looping
   
 }
schematic_mse.JPG
different_resistors.JPG
 

The resistor and the conductivity of the water form a "potential divider". Think of the water as being a resistor so you have one from +5V to the ADC input and one from the ADC input to GND. The ratio of the two decides how much voltage you measure at their junction.

The reason you see steps in the voltage is that isn't a depth probe, it just senses whether there is water between the metal tips or not. It won't give you a linear reading of the water depth, it will go from open circuit to having the resistance of the water across it as the probes are both immersed. That kind of probe is usually used as a level sensor at the top of a tank with probes facing downward toward the water so it can detect when the level has reached the shorter probe.

The slight tilt in the measurements is probably due to chemical reactions between the probe metal and dissolved minerals in the water.

Brian.
 

Thanks for your response.

I also tested a parallel conductivity sensor from the same supplier and received similar results.

What is the difference, in this circuit, between having No Resistor and having a 10k resistor? How is the resistor or lack there-of, affecting the signal output?
 

You SHOULD have a resistor. The value depends on the conductivity of the water. Pure water will exhibit a very high resistance across the probes but dissolved salts will make it much lower. You have to pick a value that ensures a large swing in voltage as the water bridges the metal tips. For example, if you use a 10K resistor and the water exhibited a resistance of 10K you would get half the 5V at the ADC input. You would get the same voltage if you used a 100K resistor and the water also measured 100K, it's the ratio that matters. Intuitively, I would suggest 10K is a good general value to choose.

Please remember this does not measure the amount of water, it only measures whether both probes are immersed at the same time. As your graph showed, you get two readings, one if both probes are immersed and another if one or both are dry.

You might get a reading with no resistor but treat it as suspicious, it would come from electrolytic action between the metals of the probe and dissolved elements in the water. The reading might be completely different from one water sample to the next.

Brian.
 

I won't expect stable conductivity values with a DC measurement at all. Industry standard method is AC measurement.
 

YFor example, if you use a 10K resistor and the water exhibited a resistance of 10K you would get half the 5V at the ADC input.

Thanks for your answers :) Just clarifying, what is the mathematics that you're using to determine this? Just a general voltage divider equation?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top