EB - Hall Sensor

$3.60

  • 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.

 

Features

  • 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

 

Applications

  • Motor speed detector
  • Control circuit

 

Details

aeProduct.getSubject()

Use with Makerduino

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

Materials

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

Steps

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

aeProduct.getSubject()

 

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

aeProduct.getSubject()

 

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()

{

    pinsInit();

}

 

void loop()

{

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

    {

        turnOnLED();

    }

    else

    {

        turnOffLED();

    }

}

void pinsInit()

{

    pinMode(HALL_SENSOR, INPUT);

    pinMode(LED,OUTPUT);

}

 

/*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

    }

    else

    {

        return false;//no,return false

    }

}

void turnOnLED()

{

    digitalWrite(LED,HIGH);

}

void turnOffLED()

{

    digitalWrite(LED,LOW);

}

 

 

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

https://drive.google.com/?usp=folder&authuser=0&usp=folder#folders/0BzxrU4QvH7jEd3ZJTVdnNUpXNVE

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: 54.81.54.46
Copyright © 2017 Maker Studio