I am reverse engineering a PCB in an espresso machine and I am having trouble understanding the water detection circuit used for the steam boiler. The correct water level in the boiler is set such that the water just covers the tip of the probe.
The trace on C6 goes to a header pin that is connected to a stainless steel probe in the boiler. The probe is insulated from the boiler and the outside of the boiler is tied to the chassis, which is also connected to the AC earth. Presumably, this is to detect continuity through the probe with current passing through the water in the boiler to the chassis. There is no AC current source on the PCB.
There are also two traces going to GPIO pins on the microcontroller through the passive components pictured. You can see the traces connecting the passives on the PCB. From what I can tell, it looks like R7 is a current limiting resistor and R8 and R9 form a voltage divider and C7 is probably for signal smoothing, but I don't know enough to understand how the whole thing works together.
Any help understanding the circuit and how the microcontroller uses the two GPIO pins to sense the presence of water at the probe would be greatly appreciated!
Also, I know direct current passing from the probe to the boiler can cause corrosion. How might this circuit mitigate excessive corrosion on the probe?

