A hall effect sensor is a sensor that varies its output based on the presence or absence of a magnetic field. This means that the output signal produced by a Hall effect sensor is a function of magnetic field density around it. When the magnetic flux density around it exceeds a certain pre-set threshold value, the sensor detects it and generates an output voltage sometimes called the hall voltage to indicate the presence of the magnetic field.

Untitled

The hall effect sensor is a type of magnetic sensor which can be used for detecting the strength and direction of a magnetic field produced from a permanent magnet or an electromagnet with its output varying in proportion to the strength of the magnetic field being detected.

Magnetic sensors convert magnetic or magnetically encoded information into electrical signals for processing by electronic circuits.

Magnetic sensors are solid state devices that are becoming more and more popular because they can be used in many different types of application such as sensing position, velocity or directional movement.

They are also a popular choice of sensor for the electronics designer due to their non-contact wear free operation, their low maintenance, robust design and as sealed hall effect devices are immune to vibration, dust and water.

Untitled

Hall Effect Sensors consist basically of a thin piece of rectangular p-type semiconductor material such as gallium arsenide (GaAs), indium antimonide (InSb) or indium arsenide (InAs) passing a continuous current through itself.

When the device is placed within a magnetic field, the magnetic flux lines exert a force on the semiconductor material which deflects the charge carriers, electrons and holes, to either side of the semiconductor slab. This movement of charge carriers is a result of the magnetic force they experience passing through the semiconductor material.

As these electrons and holes move side wards a potential difference is produced between the two sides of the semiconductor material by the build-up of these charge carriers. Then the movement of electrons through the semiconductor material is affected by the presence of an external magnetic field which is at right angles to it and this effect is greater in a flat rectangular shaped material.

https://youtu.be/dgyB2-1VDI0

SCHEMATICS

The schematic for this project is a simple one, as all we have to do is connect the three pins of the hall sensor and an LED to the Arduino. Connect the components as shown in the schematics below.

Untitled

VCC - 5V
GND - GND
SIG - D2

The LED can be plugged directly into the Arduino with the positive leg in Arduino pin 13 and the other leg plugged into the ground pin without a resistor because arduino has an internal resistor attached to pin 13.

With the schematics done, we can proceed to the code for this project.

Code

The LED can be plugged directly into the Arduino with the positive leg in Arduino pin 13 and the other leg plugged into the ground pin without a resistor because Arduino has an internal resistor attached to pin 13.

With the schematics done, we can proceed to the code for this project.