Posted by Jordan Kennedy on November 28, 2017
It isn’t enough to create a depth sensor if you can’t read what it is actually telling you.
Using a FTDI to USB converted and borrowing Neil’s FTDI code, a COMS interface was setup between Windows and the ATTiny44.
Once the COMS interface was working, a pin was set to go high and then the ADC measures the low side of the sense of the pin-header above a large 1 Mega-ohm resistor. The voltage at this point will immediately go high in response to the step and then decay back to zero at a rate dependant on capacitance measured in the depth sensor.
On Windows TeraTerm was installed, configured for 115200 baud and connected over COMPORT 3. From here the output can be viewed.
Shown below are outputs based upon how much the sensor was submerged in water.
Out of Water
It should be noted that all of these values need to be calibrated.