In this tutorial, we will see how we can interface a linear magnetic hall sensor with ARIES V3 board. A hall effect/hall magnetic sensor is a device that can be used to detect presence or absence of a magnetic field. 

Linear Magnetic Hall Sensor

Hall effect sensor or Hall sensor is a magnetic non-contact sensor that generates an electrical signal proportional to the magnetic field applied to it. They can be used in switches where the presence of a magnetic field is used to either activate or deactivate a circuit, computer, smartphones etc. They can produce either analog or digital output. They are basically like a small reed switch, and when a magnetic field is around, the output voltage will vary according to the magnetic flux. Hall effect sensors are used in BLDC applications because they are robust, accurate, and low failure rate.

The linear HW-484 V0.2 hall magnetic sensor has four pins: A0, G,+ and D0. Connect + and G of hall magnetic sensor module to 3.3V and GND respectively of ARIES v3 board. Then connect the A0 Pin of the hall magnetic sensor to the A0 pin of ARIES v3 and D0 pin of sensor to GPIO-3 of ARIES board for getting the output.

Linear Magnetic Hall SensorARIES V3 board
GGND
+3.3 V
A0A0
D0GPIO-3
Connection pins of linear hall magnetic sensor Module & ARIES v3.0 Board

Components Required

  • ARIES v3 Microcontroller
  • HW-484 V0.2 Linear Magnetic Hall Sensor
  • Jumper wires

Connection Diagram

Connection Diagram for Linear Magnetic Hall sensor with ARIES v3.0
Connection Diagram for Linear Magnetic Hall sensor with ARIES v3.0

Now, for powering up the ARIES v3 board via the USB port of a Laptop/Desktop/PC and burning the code into the ARIES v3 board, we have to use a micro USB type C to USB type A cable. The cable should be connected to UART-0 port of the ARIES v3 board, and the Laptop/Desktop/PC should be preinstalled with Arduino IDE and VEGA ARIES boards of latest version.

Procedure

Here we are using Arduino IDE 1.8.19 in Ubuntu OS for testing the code.

Open Arduino IDE

Go to Tools -> Board -> VEGA Processor ARIES Boards -> Select ARIES v3

Go to Tools -> Programmer -> Select VEGA XMODEM

Connect the ARIES v3 board to PC

Go to Tools -> Port -> Select the appropriate port

Open File -> Examples -> Examples for ARIES v3 ->ADC -> Open LinearMagneticHallSensor example

Output

Once you’ve completed the code, upload it to your ARIES v3.0 board using the Arduino IDE. Wait until the program is uploaded. After completing the uploading the program will start to execute. Show a magnet in front of the sensor and observe the changes happening to the values in serial monitor.

For analog readings, with no magnetic field present, the device will produce an output voltage equal to half the power-supply voltage (VCC). As the magnetic field strengthens, the output voltage will either start pulling it closer to ground (magnetic north) or closer to the power-supply voltage (magnetic south) until it reaches a saturation point.

For digital output,When you show any magnetic field near the sensor The GREEN LED on ARIES board will turn ON.

Linear Magnetic Hall Sensor Digital Output

By mydhily

Leave a Reply

Your email address will not be published. Required fields are marked *