Introduction
The KY-003 Hall magnetic sensor is a magnetic switch , if there is no magnetic field is present in the vicinity of the KY-003 Hall magnetic sensor then signal pin of the sensor will give HIGH signal as a output , if magnetic field is present then signal pin will give LOW signal as a output ; polarity of the magnetic field is of influence to the switching action ,The front side of KY-003 Hall magnetic sensor needs opposite polarity as the back of the sensor to switch on
Working principle of the Hall magnetic sensor
The KY-003 Hall magnetic sensor has a beam of electrons flowing ,when there is no magnetic field present there is no electron deflection occurs ,which supply a high voltage to the signal pin , when a magnnetic field is applied these electrons get deflected and there is a fall in voltage and the signal pin receives a low input
In this tutorial we will display whether magnetic field is present or not on TFT display , if magnetic field is present then we will turn color of round rectangle to “Green” otherwise “Red”.
Pin description
KY-003 Hall magnetic sensor have 3 pins
- VCC
- GND
- Signal
Circuit diagram
- Connect VCC of KY-003 Hall sensor module to VCC of evive board
- Connect GND of KY-003 Hall sensor module to GND of evive board
- Connect Signal pin of Ky-003 Hall sensor module to pin number 10 of evive board
Arduino code
Expected result