This is a quick summary on how to use Hall Effect Sensor US5881 / US1881.
US1881 is a latching hall effect sensor. The sensor gives out an output HIGH (5V) voltage whenever the north pole of a magnet is brought close to it. However, even when the magnet is removed the sensor still outputs a HIGH voltage and does not go LOW (0V) until the south pole of the magnet is brought close to it. These type of sensors that latches on to a particular state are called latched hall effect sensors.
US5881 is a non-latching hall effect sensor. Here, the sensor gives an output HIGH voltage whenever the north pole of a magnet is brought close to it. And, switches LOW whenever the magnet is removed.
Wiring
Code
//Connect the output pin (pin 3) of the hall effect sensor to Arduino digital pin 2
#define Hall_Sensor 2
void setup()
{
Serial.begin(9600);
pinMode(Hall_Sensor, INPUT);
}
void loop()
{
while (digitalRead(Hall_Sensor) == LOW) {
Serial.println("Detect");
}
}
References:
US5881 Datasheet
https://cdn-shop.adafruit.com/datasheets/US5881_rev007.pdf
US1881 Datasheet
https://www.sparkfun.com/datasheets/Components/General/Hall-US1881EUA.pdf
ARDUINO HALL EFFECT SENSOR TUTORIAL: THE EASY WAY
http://diyhacking.com/arduino-hall-effect-sensor-tutorial/
Hall effect sensor - US5881LUA
https://www.adafruit.com/product/158
This blog is for keeping my study notes, sharing knowledge and showing the products of my study.. I welcome your feedback...
Showing posts with label Hall Effect Sensor. Show all posts
Showing posts with label Hall Effect Sensor. Show all posts
2016/08/07
2016/08/06
Filament Winder and Filament Spreader for DIY Filament Extruder
This post is about the accessories that I've developed for my DIY filament extruders. You could find them at the links below.
v1: http://wei48221.blogspot.tw/2016/07/diy-extruder-kit-for-making-filament.html
v2: http://wei48221.blogspot.tw/2016/10/filament-extruder-v2.html
Filament Winder
v1: http://wei48221.blogspot.tw/2016/07/diy-extruder-kit-for-making-filament.html
v2: http://wei48221.blogspot.tw/2016/10/filament-extruder-v2.html
Filament Winder
Subscribe to:
Posts (Atom)