Download presentation
Presentation is loading. Please wait.
1
Conductivity Sensor
2
DISCLAIMER & USAGE The content of this presentation is for informational purposes only and is intended for students attending Louisiana Tech University only. The authors of this information do not make any claims as to the validity or accuracy of the information or methods presented. Any procedures demonstrated here are potentially dangerous and could result in damage and injury. Louisiana Tech University, its officers, employees, agents and volunteers, are not liable or responsible for any injuries, illness, damage or losses which may result from your using the materials or ideas, or from your performing the experiments or procedures depicted in this presentation. The Living with the Lab logos should remain attached to each slide, and the work should be attributed to Louisiana Tech University. If you do not agree, then please do not view this content. boosting application-focused learning through student ownership of learning platforms
3
Calibrating the Conductivity Sensor
The salinity sensor will be calibrated using water with various salt concentrations 0.00% weight NaCl – We will use deionized water (DI water) 0.05% weight NaCl 0.10% weight NaCl 0.15% weight NaCl Why not just use tap water? Standard tap water contains dissolved ions such as sodium, calcium, iron, copper and bromide The electrical resistivity of tap water can vary widely (15kΩ-cm is typical) Ions have been removed from DI water resulting in a much higher resistivity (18MΩ-cm is typical) Did you notice the strange units on resistivity (Ω-cm)? The electrical resistance R of a body (measured in Ω) is related to the electrical resistivity ρ (measured in Ω-cm) as 𝑳 𝑨 𝑅= 𝜌∙𝐿 𝐴 A = cross sectional area L = length over which resistance is measured ρ = resistivity which is a material property
4
How the Calibration Works
Adding salt to the water will increase the availability of Cl- ions at the anode More ions at the anode will increase the rate at which chemical reactions can occur The “electrical resistance” of the salt water will decrease as more salt is added to the water The analog voltage on the + side of the 10kΩ resistor will increase as more salt is added Correlating this voltage with the salt concentration will allow us to “calibrate” the conductivity sensor e- 5V 10 kΩ Cl- Cl Cl2 OH- H2O H anode – oxidation (loss of electrons) cathode – reduction (gain of electrons) Na+ ion migration Na+ is a spectator ion
5
Salt Concentrations Each group of students should put about 1.5 inches of water in four bottles The four bottles should contain . . . DI water 0.05% weight NaCl 0.10% weight NaCl 0.15% weight NaCl Please take ONLY the amount that you will need to use TODAY Be sure to label your water bottles Swish a small amount of DI water around in your bottle to wash out impurities before filling with calibration water
6
Circuit and Sketch void setup() { Serial.begin(9600);
pinMode(8, OUTPUT); } void loop() { digitalWrite(8,HIGH); // apply 5V to the conductivity sensor delay(100); // hold the voltage at pin 8 for 0.1s int analogS=analogRead(1); // read voltage on + side of 10kohm resistor digitalWrite(8,LOW); // turn off power to the conductivity sensor Serial.println(analogS); // print the analog input reading (0 to 1023) delay(1000); // delay 1 second between measurements 10 kΩ digital output = 5V when HIGH (use a digital pin) (set high periodically to measure conductivity) analog input (measures voltage across 10kΩ resistor)
7
Steps for Calibration salt concentration (%wt)
10 kΩ digital output = 5V when HIGH (set high periodically to measure conductivity) analog input (measures voltage across 10kΩ resistor) Configure your flow loop as required for homework Implement the conductivity sensor circuit on your breadboard Flush tank with DI water. Pour enough DI water into your fishtank to fill the flow loop Turn on the pump to run the flow loop for about a minute to “wash out” the impurities. Prime the pump if necessary by switching the three-way valve to the drain Turn the three-way valve toward the drain to flush the system Repeat to completely clean the system Make sure the analog value is near 0. This ensure you are starting with as few impurities in your system as possible. Fill the system with 0.05 wt% salt water. Flush once, and refill with 0.05 wt% salt water Collect calibration data for 0.05wt% salt water Repeat steps 4 and 5 for 0.10 wt% salt water and 0.15 wt% salt water salt concentration (%wt) Output to Serial Monitor 0.05 0.10 0.15 collect this data
8
Plot Calibration Data and Perform Linear Regression
Salt concentration Arduino (fractional) output 0.0005 465 0.0010 511.5 0.0015 537.5 Perform linear regression to determine the expected output of the conductivity circuit as a function of salinity Linear Polynomial Power
9
Examine Fits Over Possible Salinity Ranges
how your fit behaves beyond 0.15 wt% salt since your salinity may increase well beyond 0.15% when salty water is added Do you see any potential problems? Which fit seems to be the best? Why?
10
Equation Needed for Salinity Control
use four or five digits for these fitting constants Notice that this plot and calibration equation is based on the fractional form of salinity Invert the calibration equation to obtain Salt concentration vs output 𝑜𝑢𝑡𝑝𝑢𝑡=1274.1∙ 𝑠𝑎𝑙𝑖𝑛𝑖𝑡𝑦 𝑠𝑎𝑙𝑖𝑛𝑖𝑡𝑦= −24 ∙ 𝑜𝑢𝑡𝑝𝑢𝑡 equation to compute setpoints for control equation to compute salinity from sensor output Inversion Methods: Swap axes on your graph or use algebra (next slide)
11
Inverting Calibration Equation Using Algebra
output vs salt concentration 𝑜𝑢𝑡𝑝𝑢𝑡=1274.1∙ 𝑠𝑎𝑙𝑖𝑛𝑖𝑡𝑦 Divide both sides by 𝑜𝑢𝑡𝑝𝑢𝑡 = 𝑠𝑎𝑙𝑖𝑛𝑖𝑡𝑦 Raise both sides to the same power 𝑜𝑢𝑡𝑝𝑢𝑡 = 𝑠𝑎𝑙𝑖𝑛𝑖𝑡𝑦 Simplify and expand ∙𝑜𝑢𝑡𝑝𝑢𝑡 =𝑠𝑎𝑙𝑖𝑛𝑖𝑡𝑦 Rule: 𝒙𝒚 𝒛 = 𝒙 𝒛 𝒚 𝒛 ∙ 𝑜𝑢𝑡𝑝𝑢𝑡 =𝑠𝑎𝑙𝑖𝑛𝑖𝑡𝑦 Simplify −24 ∙ 𝑜𝑢𝑡𝑝𝑢𝑡 =𝑠𝑎𝑙𝑖𝑛𝑖𝑡𝑦 Salt concentration vs output
12
Writing Equation with Exponents in a Sketch
𝑠𝑎𝑙𝑖𝑛𝑖𝑡𝑦= −24 ∙ 𝑜𝑢𝑡𝑝𝑢𝑡 pow(base, exponent)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.