Skip to content

Keyes KY 024 Hall Sensor

wartaal55 edited this page May 29, 2017 · 4 revisions

The KY024 Hall Sensor is a sensor that measures magnetism. Typically KY-024 Hall Sensor is used to calculate (and therefore adjust or stabilize) the speed of a mechanism in rotation or as a proximity switch. There are also sensors switch type, which are limited to only intervene on reaching a threshold of intensity (see KY003) and therefore provide only one output ON / OFF state. In the case of KY024 point intensity 0 should correspond approximately to + 2.5V with an excursion to the 0V and + 5V in step 1024 if fed precisely to 5V. Despite this sensor has a linear response, however, it is not suitable to be used as a measurement of intensity of a magnetic field due to low precision.

Specifications

  • Operating Voltage : 5 VDC
  • Temperature range : -40°C to 85 °C
  • Current input/output max 8/20mA
  • Response time: 3uS (very fast)

Features

  • Support digital and analog signal with sensitivity threshold adjustment
  • 4 pins pinout with 2.54mm pitch easy to connecto with the MCU
  • Input voltage: 3.3-5V, Output Voltage: 5V

Pin Map

- AO     Analog Output
- G      Ground
- +      Supply (3.3V - 5V)
- DO     Digital Output

Example Code

// Sensor Keyes KY024 (chip ss49E)
 // Type: Analog
 // External Libraries: no
 // Magnetic field sensor analog HALL effect
 // -------------------------------------------------------------------------
 // Supply 5V
 // Connections Arduino
 // V = ​​5V
 // G = mass
 // S = A0

 const int SIGPIN = A0;
 const float GAUSS_PER_STEP = 2,713;
 
 float rawValue = 0.0;
 float value = 0.0;
 zeroLevel float = 537.0;
 
 void setup () 
 {
  Serial.begin (9600);
  pinMode (SIGPIN, INPUT);
  Serial.println ("KY024 - Linear Hall Sensor - Test program.");
 }

 void loop () 
 {
  rawValue = analogRead (SIGPIN) - zeroLevel;
  Serial.print ("Read Raw");
  Serial.println (rawValue);
  // Reading positive relative to the South Pole, the North Pole negative
  value = rawValue * GAUSS_PER_STEP;
  // Serial.print ("Reading Calibrated in Gauss:");
  // Serial.println (value);
  delay (1000);
 }

Sources

Clone this wiki locally