5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10



EASY PLUG Super Starter Kit For Arduino Project 11: Hall Magnetic Detection

Posted by Fiona Su on

Overview
What's the best way to detect the magnet? Use another magnet. But it's not sensitive enough. You have to feel it by yourself.
Here you can try to use a hall sensor. It has the characteristics of high sensitivity, fast response, good temperature performance and high reliability.
Component Required:
  • EASY plug control board*1
  • EASY plug Hall Magnetic Sensor*1
  • EASY plug LED Module *1
  • EASY plug 4-digit LED Display Module *1
  • RJ11 cable*1
  • USB cable*1

Component Introduction:


Keyestudio EASY plug Hall Magnetic Sensor
The Hall sensor is based on Hall Effect.
It can detect whether there is a magnetic object nearby or not. And it correctly tells you through digital output.
This sensor uses the SFE Reed Switch - Magnetic Field Sensor. It can sense the magnetic materials within a detection range up to 75px.
The detection range and the strength of magnetic field are proportional.
It is useful for non-contact/waterproof type switches, position sensors, rotary/shaft encoders.

  • Sensing magnetic materials
  • Detection range: up to 75px
  • Output: Digital ON/OFF
  • Detection range and magnetic field strength are proportional

Connect It Up
Connect the EASY Plug Hall Magnetic Sensor and LED module to control board using RJ11 cables.

thumb

Upload the Code
Below is an example code.

thumb

What You Should See

thumb

When magnetic beads are approaching to the sensor, the LED will be turned on. Otherwise, the LED is off.

thumb

Little Knowledge:
If you want to change another way, that is, once magnetic field is detected by sensor, LED is turned off; if no detecting magnetic field, LED is on.
Just need to change the LED state ON or OFF in the code, shown below.

thumb

Extension Experiment
Adding 4-digit LED Display
Hookup Guide
Connect the EASY Plug hall sensor, 4-digit LED display and red LED module to control board using RJ11 cables.

thumb
Upload the Code
Below is an example code.

thumb

What You Should See
When magnetic beads are approaching to the sensor, the LED will be turned on. Otherwise, the LED is off.
How many times the magnet approaches to the sensor? You should be able to see the result showed on the 4-digit LED display or serial monitor.

thumb

thumb

All Tutorial

 Buy here>>EASY PLUG Super Starter Kit For Arduino STEM EDU

0 comments

Leave a comment

Please note, comments must be approved before they are published