Hall Effect Sensor With Arduino | Hall effect sensor | Arduino Tutorial

Introduction

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 in this Arduino tutorial.

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 with arduino

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.

Simulation

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

Components table/buy link

You can buy the whole components from the given link we have to share the amazon link. from where you can get a good discount on the components.

Hall Effect Sensor With Arduino Circuit Diagram

hall effect sensor arduino circuit

Connection Table

Arduino UNOHall Effect Sensor
( +5V )   (  +  ) Positive
GND (  –  )  Positive
D5 Pin  (  S  ) Signal
Arduino UNOBuzzer
GND Negative 
D10 PinPositive  
Arduino UNO16*2 LCD10K Potentiometer
GND VSS (Ground)Terminal 1
+5 VoltVDD ( +5V )Terminal 3
 VEE ( Contrast )Terminal 2
A0 PinRS ( Register Select ) 
GNDRW ( Read\Write ) 
A1 PinE ( Enable ) 
A2 PinD4 
A3 PinD5 
A3 PinD6 
A4 PinD7 
Arduino UNOLED220-ohm Resistor
D9  PinAnode Terminal 
GND  Terminal 1
 Cathode  TerminalTerminal 2
  • 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.

HAPPY LEARNING!

Video sample

1 thought on “Hall Effect Sensor With Arduino | Hall effect sensor | Arduino Tutorial”

Leave a Comment