KY-024 Linear Magnetic Hall Sensor

35.00 EGP

This type of sensor detects the presence of a magnetic field supplying at the output a voltage proportional to the intensity and the orientation of the same.

In stock

Description

Typically KY-024 Linear Magnetic 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.

The value of zeroLevel corresponds to 0 and goes calibration proceeds launching the sketch with the sensor away from magnets and making sure that the output value indicates precisely 0. In my case I used a value of 537 but may vary slightly from sensor to sensor.

Connectivity

  • Pin (-) –> GND, connect to GND of the Arduino
  • Pin (middle pin) +5 v  –> connect to Arduino +5
  • Pin AO signal –> connect to Arduino pin A0
  • DO –> Do not connect in our example

Code

// Sensor Keyes KY024 (chip ss49E)
 // Type: Analog
 // External Libraries: no
 // Magnetic field sensor analog HALL effect
 // ------------------------------------------------ -------------------------
 // References:
 // Http://www.sensorwiki.org/doku.php/sensors/hall_effect
 // Http://dscl.lcsr.jhu.edu/main/images/3/31/SS49e_Hall_Sensor_Datasheet.pdf
 // ------------------------------------------------ -------------------------
 // Supply 5V
 // Connections Arduino
 // V = ​​5V
 // G = mass
 // S = A0
 //
 // The typical sensitivity is 1.8mV = 1G - (1024 steps) so 5V 1 step = 2.713G
 // 5/1024 / 0.0018
 // The sensor manufactured by Honeywell, however, declares 1.4mV per step

 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);
 }

Additional information

Weight5 g

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.