The goal of this project is to create a smart cat drinking fountain. The hope is to be able to monitor the current water depth and turn off the pump/notify when it is too low.

To connect the HC-SR04 to the Raspberry Pi we need a voltage divider, this is necessary as the HC-SR04 ouputs 5v on the Echo(3) pin while the RPi4 needs 3.3v on the input (GPIO_24) pin.
To figure out which resistors we need for voltage division we use the following equation
We are going to use a resistor for our R1, therefore
Thus we need a resistor to divide the voltage. The circuit diagram below shows the pinout.
(2).png)