EB - Hall Sensor


  • Model: EB0201110B
  • Shipping Weight: 3gram
  • 10000 Units in Stock

Add to Cart:

Item specifics

Brand Name:Maker Studio

Product Description

Electronic Brick - Hall Sensor is based on Hall Effect. The output signal is HIGH level when a magnetic field (south polarity) cross to the Hall Sensor near 90 degree. Otherwise, it outputs LOW level signal.



  • Working Voltage: 5V
  • Continuous Output Current: 25mA
  • Operating Temperature: -40 to +85 degree centigrade
  • Output type: digital signal and analog signal
  • With Makerduino Demo Code
  • With Power Light and Signal Light
  • Weight: 2g



  • Motor speed detector
  • Control circuit




Use with Makerduino

The following steps show how to use EB - Hall Sensor with Makerduino.


  • Electronic Brick Shield
  • EB - Hall Sensor
  • EB - LED
  • A/B type USB cable
  • Makerduino
  • Female DuPont wires


1. Connect Electronic Brick Shield onto Makerduino to bring out all the Makerduino Pins.



2. Connect EB - Hall Sensor to Makerduino as following.



3. Connect the Makerduino to Computer by the USB cable.


4. Download the Makerduino demo code EB - Hall Sensor.zip. Unzip the code directly into the libraries folder.


5. Open Makerduino IDE, choose the right Board and Serial Port. Open the sketch EB_ HallSensor.ino and upload it to the Makerduino.

The following is the demo code for EB - Hall Sensor. (Note: It could be a little different from the code file downloaded. Please follow the downloaded file.)


    Function: When a magnet whose south pole is facing up is

    approaching to the onboard sensor, the LED will be turned on.

    Otherwise, the LED will be turned off.

    EB - Hall Sensor, EB - LED



//macro definitions of magnetic pin and LED pin

#define HALL_SENSOR 8

#define LED 7//the EB - LED is connected to D7 of Makerduino


void setup()





void loop()


    if(isNearMagnet())//if the hall sensor is near the magnet?









void pinsInit()


    pinMode(HALL_SENSOR, INPUT);




/*If the hall sensor is near the magnet whose south pole is facing up, */

/*it will return ture, otherwise it will return false.              */

boolean isNearMagnet()


    int sensorValue = digitalRead(HALL_SENSOR);

    if(sensorValue == LOW)//if the sensor value is LOW?


        return true;//yes,return ture




        return false;//no,return false



void turnOnLED()




void turnOffLED()






6. Check the Results. After the sketch is successfully uploaded, the signal light and the EB - LED are off in normal condition. When put the south polarity of an electromagnet or a permanent magnet perpendicular to Hall sensor, the signal light and the EB - LED will turn on.  

Download information


Find EB - Hall Sensor.zip to download schematic and other material.


about us 02

This product was added to our catalog on Tuesday 11 February, 2014.

Your IP Address is:
Copyright © 2020 Maker Studio