(SS)49E HALL EFFECT SENSOR MODULES (AKA "KY-024") []

Outils pour utilisateurs

Outils du site


(SS)49E HALL EFFECT SENSOR MODULES (AKA "KY-024")

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
documentation:microcontroleurs:arduino:modules:49e_hall_effect:index [2021/08/02 17:25] – [(AH)44E HALL EFFECT SENSOR (AKA "KY-003")] f1slsdocumentation:microcontroleurs:arduino:modules:49e_hall_effect:index [2021/08/03 07:06] (Version actuelle) – [CODE] f1sls
Ligne 7: Ligne 7:
 ==== MODULE WITH OPAMP ==== ==== MODULE WITH OPAMP ====
 {{:documentation:microcontroleurs:arduino:modules:49e_hall_effect:linear-hall-effect-sensor-module-schematic.jpg?direct&600|}} {{:documentation:microcontroleurs:arduino:modules:49e_hall_effect:linear-hall-effect-sensor-module-schematic.jpg?direct&600|}}
 +
 +===== ARDUINO WIRING =====
 +{{:documentation:microcontroleurs:arduino:modules:49e_hall_effect:49e_arduino_wiring.jpg?direct&600|}}
  
 ===== DOCUMENTATIONS ===== ===== DOCUMENTATIONS =====
   * {{ :documentation:microcontroleurs:arduino:modules:49e_hall_effect:ss49e_secelectronics.pdf |SS49E Datasheet}}   * {{ :documentation:microcontroleurs:arduino:modules:49e_hall_effect:ss49e_secelectronics.pdf |SS49E Datasheet}}
 +
 +===== CODE =====
 +<code cpp>
 +// -------------------------------------
 +// 49E Hall Effect Sensor - Code Example
 +// -------------------------------------
 +
 +const int pinHall = A0; 
 +void setup() {
 +  pinMode(pinHall, INPUT);
 +  Serial.begin(9600);
 +
 +void loop() {
 + 
 +  //we measure 10 times adn make the mean
 +  long measure = 0;
 +  for(int i = 0; i < 10; i++){
 +      int value = 
 +      measure += analogRead(pinHall);
 +  }
 +  measure /= 10;  
 +  //voltage in mV
 +  float outputV = measure * 5000.0 / 1023;
 +  Serial.print("Output Voltaje = ");
 +  Serial.print(outputV);
 +  Serial.print(" mV   ");
 +  
 +  //flux density
 +  float magneticFlux =  outputV * 53.33 - 133.3;
 +  Serial.print("Magnetic Flux Density = ");
 +  Serial.print(magneticFlux);
 +  Serial.print(" mT");  
 +  delay(2000);
 +}
 +</code>
 +
 +<code cpp>
 +/*
 +Analog 49E Hall Effect sensor test
 +
 +Basic code for reading the analog output of the 49E hall effect sensor. 
 +Sensor is connected to A0, but can be any analog input pin.
 +*/
 +const int AnalogPin = A0;
 +const float GAUSS_PER_STEP = 2.57;  // Sensor outputs approx 1.9mV / Gauss.  
 +                                    // ADC step is about 4.89mV / Step for 5V operation. 
 +float rawValue = 0.0;               // Raw ADC Reading
 +float gaussValue = 0.0;
 +float zeroLevel = 518.0;  // Adjust value as needed to get zero rawValue output with no magnetic field.
 +
 +//===============================================================================
 +//  Initialization
 +//===============================================================================
 +void setup() 
 +
 +  pinMode (AnalogPin, INPUT);
 +  Serial.begin(9600);         // Set comm speed for debug window messages
 +}
 +
 +//===============================================================================
 +//  Main
 +//===============================================================================
 +void loop() 
 +{
 +  rawValue = analogRead (AnalogPin) - zeroLevel;  // Output normalized to '0' with no field present
 +  Serial.print ("Reading Raw: ");
 +  Serial.println (rawValue);
 +  // Reading positive relative to the South Pole, the North Pole negative
 +  gaussValue = rawValue * GAUSS_PER_STEP;
 +  Serial.print ("Reading in Gauss: ");
 +  Serial.println (gaussValue);
 +  delay (3000);
 +}
 +</code>
  
 \\ \\
Ligne 16: Ligne 93:
 \\ \\
 \\ \\
-====== (3)44E HALL EFFECT SENSOR (AKA "KY-003") ======+====== (31)44E HALL EFFECT SWITCH MODULE (AKA "KY-003") ======
 {{:documentation:microcontroleurs:arduino:modules:49e_hall_effect:44e402_module.jpg?direct&600|}} {{:documentation:microcontroleurs:arduino:modules:49e_hall_effect:44e402_module.jpg?direct&600|}}
 +{{:documentation:microcontroleurs:arduino:modules:49e_hall_effect:a3144-hall-effect-sensor-pinout.jpg?direct&400|}}
 ===== SPECIFICATIONS ===== ===== SPECIFICATIONS =====
   * Model : KY-003   * Model : KY-003
Ligne 43: Ligne 120:
  
 ===== DOCUMENTATION ===== ===== DOCUMENTATION =====
 +  * {{ :documentation:microcontroleurs:arduino:modules:49e_hall_effect:3144_hall_datasheet.pdf |}}
   * {{ :documentation:microcontroleurs:arduino:modules:49e_hall_effect:oh44e-e_sensore-hall.pdf |}}   * {{ :documentation:microcontroleurs:arduino:modules:49e_hall_effect:oh44e-e_sensore-hall.pdf |}}
   * https://github.com/R2D2-2017/R2D2-2017/wiki/Keyes-44E402-Magnetic-Hall-Switch-Sensor   * https://github.com/R2D2-2017/R2D2-2017/wiki/Keyes-44E402-Magnetic-Hall-Switch-Sensor
documentation/microcontroleurs/arduino/modules/49e_hall_effect/index.1627917951.txt.gz · Dernière modification : de f1sls