Hvordan fungerer den?
Sensoren aktive område, er den sølvfarvede cirkel. Der er ingen elektrisk forbindelse mellem V benet og S benet. Men så snart sensorens aktive område bliver får et mikroskopisk tyndt lag af vand på dens overflade, vil vandet kunne lede noget strøm mellem de metalliske flader på det aktive område. Jo mere vand der er på sensoren, jo nemmere vil strømmen kunne flyde mellem de metalliske flader, og derfor vil modstanden mellem fladerne falde.
Du kan læse mere om vands ledeevne her:
Electrical conductivity
Pure water containing no ions is an excellent insulator, but not even "deionized" water is completely free of ions. Water undergoes auto-ionisation at any temperature above absolute zero. Further, because water is such a good solvent, it almost always has some solute dissolved in it, most frequently a salt. If water has even a tiny amount of such an impurity, then it can conduct electricity readily, as impurities such as salt separate into free ions in aqueous solution by which an electric current can flow.
It is known that the theoretical maximum electrical resistivity for water is approximately 182 kΩ·m²/m (or 18.2 MΩ·cm²/cm) at 25 °C. This figure agrees well with what is typically seen on reverse osmosis, ultrafiltered and deionized ultrapure water systems used, for instance, in semiconductor manufacturing plants. A salt or acid contaminant level exceeding even 100 parts per trillion (ppt) in ultrapure water begins to noticeably lower its resistivity level by up to several kilohm-square meters per meter (a change of several hundred nanosiemens per meter of conductance).
Pure water has a low electrical conductivity, but this increases significantly upon solvation of a small amount of ionic material water such as hydrogen chloride. Thus the risks of electrocution are much greater in water with the usual impurities not found in pure water. (It is worth noting, however, that the risks of electrocution decrease when the impurities increase to the point where the water itself is a better conductor than the human body. For example, the risks of electrocution in sea water are lower than in fresh water, as the sea has a much higher level of impurities, particularly common salt, and the main current path will seek the better conductor. This is, nonetheless, not foolproof and substantial risks remain in salt water.) Any electrical properties observable in water are from the ions of mineral salts and carbon dioxide dissolved in it. Water does self-ionize where two water molecules become one hydroxide anion and one hydronium cation, but not enough to carry enough electric current to do any work or harm for most operations. In pure water, sensitive equipment can detect a very slight electrical conductivity of 0.055 µS/cm at 25 °C. Water can also be electrolyzed into oxygen and hydrogen gases but in the absence of dissolved ions this is a very slow process, as very little current is conducted. While electrons are the primary charge carriers in water (and metals), in ice (and some other electrolytes), protons are the primary carriers (see proton conductor).
Kodeeksempel
from machine import Pin, ADC
from time import sleep
steamSensor = ADC(Pin(34))
steamSensor.atten(ADC.ATTN_11DB) #Full range: 3.3vwhile True:
steamSensor_value = steamSensor.read()
print(steamSensor_value)
sleep(0.3)