Hall Effect Sensor With Arduino | Hall effect sensor

Hey guys, hope you are doing fine. Hall effect is a very popular principle given by the physicist Edwin hall which states that when a current-carrying conductor is introduced to a perpendicular magnetic field, a voltage can be measured at the right angle to the current path. In this article, we are going to see the working of a Hall effect sensor with  Arduino UNO board. By using this setup we can find the magnetic field near the sensor. You can check more amazing projects on Arduino and IoT. All the necessary details regarding the project are given below. We are using a 16×2 LCD module for displaying the content. You can also check the magnet detector using Arduino, made by us.

hall effect sensor

Hall Effect Sensor Working?

This project is helpful in detecting the magnets if present near us. It is done by the Hall effect sensor which can detect the magnetic fields emitted by strong or weak magnets. If the sensor detects any magnetic field the LED goes on and the buzzer starts beeping. The message “Magnet is Detected” can be seen on the 16×2 LCD display as well as on the serial monitor screen also. You can open the serial monitor from the top right corner in your Arduino IDE as shown in the image.

hall effect sensor

Components Required

  • Arduino UNO
  • 16×2 LCD
  • Hall effect sensor
  • Buzzer and an LED
  • I2C module
  • Jumper wires and a breadboard
  • 10K potentiometer
  • 220-ohm resistor
  • USB cable for uploading the code

Hall Effect Sensor With Arduino Circuit Diagram

hall effect sensor

Connect the 5 volts pin of the Arduino with the VCC of the Hall sensor and the GND pin of the Arduino with the GND pin of the Hall sensor. Join the data pin of the Hall sensor with the digital-5 pin of the Arduino. Take a 10K ohm preset and connect its pins with the 16×2 LCD module. Join the negative wires of the buzzer and LED with the GND pin of the Arduino via a 220-ohm resistor. Connect the positive leg of the LED with the digital-9 pin of the Arduino and the positive wire of the buzzer with the digital-10 pin of the Arduino. Attach the pins of the 16×2 LCD with the analog pins of the Arduino as shown in the diagram. You can also take help from one of our articles on the working of 16×2 LCD. If you want to use an I2C module for interfacing with the LCD then Connect its VCC and GND pins with the 5 volts pin and the GND pin of the Arduino. View the connections of the I2C module with LCD here. Also, check the address of the I2C module that you are using.

Arduino Hall Effect Sensor Code for the Project

NOTE: Please upload the code which is given below to the Arduino.

Try to make this project by yourself for better understanding. If you have any doubts regarding the project then tell us in the comments section below. You can read the latest tutorials on Arduino and Raspberry Pi written by us.