A 5V power supply is used to power the sensor, and the center voltage output is programmed to 50% of this or 2.5V. Moving the joystick’s handle changes the magnetic field around the sensor. As the shaft moves, the magnet’s South pole moves towards the center of the sensor, causing the output of the sensor to increase towards 5V. Inversely, as the shaft is moved in the opposite direction, moving the magnet’s North pole towards the center of the sensor, the output of the sensor will decrease towards 0V.