In this tutorial, we will see how we can interface a hall effect 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. 

Hall effect sensor

KY-035 is a analog device that varies its output voltage proportional to the magnetic field it is sensing. The output signal produced by a Hall effect sensor is a function of magnetic field density around it. The sensor produces a hall voltage when the magnetic flux density around the sensor exceeds a certain threshold value. This hall voltage will indicate the presence of the magnetic field. The applications of hall sensors includes automotive systems to detect position and to measure distance and speed. They can also 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.

The hall magnetic sensor has three pins: G, R and Y. Connect R and G of hall magnetic sensor module to 3.3V and GND respectively of ARIES v3 board. Then connect the Y Pin of the hall magnetic sensor to the A0 pin of ARIES v3 board for getting the analog output.

Hall SensorARIES V3 board
R3.3V
GGND
YA0
Connection pins of flame sensor Module & ARIES v3.0 Board

Components Required

  • ARIES v3 Microcontroller
  • Hall magnetic sensor/ Hall effect sensor
  • Jumper wires

Connection Diagram

Connection Diagram for hall effect sensor with ARIES v3.0
Connection Diagram for hall effect 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 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 hallMagneticSensor 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.

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.

By mydhily

Leave a Reply

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