phototransistor.sch Cadsoft EAGLE schema file.
The float drives a paper flag that interrupts the optical connection
between a phototransistor and a bright diode.
As the float rises, the flag moves up and opens the passage
of IR light from the diode D1 to the transistor T1.
The phototransistor conducts and V1 drops.
As the float drops up, the flag moves down and closes the passage
The phototransistor stops conducting and V1 rises to 12 V.
In normal use, the signal V1 will be centered around 6V.