A hall effect sensor circuit translates magnetic flux density into an electrical signal. For linear analog sensors like the Honeywell SS49E or Allegro A1302, the output is a continuous voltage strictly proportional to the perpendicular magnetic field. Digital variants (like the A3144 switch) simply output a HIGH/LOW logic level when a threshold is crossed. This guide focuses entirely on the linear analog circuit, providing the exact wiring, raw ADC math, and calibration routines required to convert microcontroller readings into physical units like Gauss or milliTesla (mT).

Callout: Do Not Conflate Analog and Digital
A common bench mistake is wiring a digital Hall switch (e.g., A3144) expecting a variable voltage, or wiring a linear sensor (SS49E) expecting a clean digital interrupt. Linear sensors output a continuous analog voltage; digital sensors contain an internal Schmitt trigger and open-drain MOSFET. The math and wiring below apply strictly to linear analog Hall ICs.

The Physics: How Hall Effect Sensing Actually Works

When a current-carrying semiconductor is placed in a magnetic field, the charge carriers (electrons or holes) experience a Lorentz force perpendicular to both the current flow and the magnetic field lines. This deflection causes charge carriers to accumulate on one side of the material, creating a measurable transverse voltage difference known as the Hall voltage. The magnitude of this voltage is directly proportional to the strength of the perpendicular magnetic flux density passing through the active area.

In practical integrated circuits like the SS49E, this microvolt-level raw Hall voltage is internally amplified by an op-amp stage and temperature-compensated before reaching the output pin. The result is a robust, ratiometric analog voltage that scales linearly with the magnetic field. Because the internal amplifier is powered by the same supply as the Hall element, the output is ratiometric—meaning the zero-Gauss baseline and the sensitivity scale proportionally with your VCC voltage.

Wiring the SS49E Linear Hall Effect Sensor Circuit

The SS49E is a 3-pin TO-92 package. When looking at the flat face with the pins pointing down, the pinout is VCC (left), GND (center), and OUT (right). Because it is an analog device, the output pin must connect to an ADC-capable GPIO on your microcontroller.

Pin Function Arduino Uno (5V) ESP32 (3.3V) Notes
1 (Left) VCC 5V 3.3V Supply range: 2.7V to 6.5V. Keep it clean; noise here directly injects into the output.
2 (Center) GND GND GND Use a dedicated ground wire back to the MCU, avoiding shared high-current ground paths.
3 (Right) OUT A0 (Analog In) GPIO34 (ADC1) Outputs analog voltage. Do not connect to digital-only pins.

Wiring Steps:

  1. De-energize the board: Ensure your microcontroller is disconnected from USB or external power before soldering or plugging in jumper wires.
  2. Connect Power: Route VCC and GND. If you are operating in a noisy environment (near DC motors or switching regulators), place a 0.1 µF ceramic bypass capacitor directly across the VCC and GND pins of the sensor, as close to the plastic body as possible.
  3. Route the Signal: Connect the OUT pin to your ADC. Keep this trace/wire short (under 10 cm) and avoid running it parallel to high-current motor wires to prevent inductive coupling.
  4. Verify Voltages: Power the circuit and use a multimeter to measure between VCC and GND at the sensor pins. You should read exactly 5.00V (or 3.30V). Then measure OUT to GND with no magnets nearby; it should read exactly half of VCC (2.50V or 1.65V).

Output Signal Math: From Raw ADC to MilliTesla

To use this sensor for physical measurements (like calculating the stroke of a pneumatic cylinder or the position of a throttle pedal), you must convert the raw ADC integer into a magnetic flux density unit. The Honeywell SS49E datasheet specifies a typical sensitivity of 1.4 mV/Gauss (which equals 14 mV/milliTesla) when operated at 5.0V.

The Core Equations:
1. Voltage Conversion: V_out = (ADC_Raw × V_ref) / ADC_Max
2. Baseline Offset: V_quiescent = VCC / 2
3. Flux Density (Gauss): B = (V_out - V_quiescent) / Sensitivity

If you are running an Arduino Uno (10-bit ADC, 5V reference) and your ADC reads 614:

  • V_out = (614 × 5.0) / 1023 = 3.00V
  • V_quiescent = 2.50V
  • B = (3.00 - 2.50) / 0.0014 = 357 Gauss (or 35.7 mT)

Because the sensor is ratiometric, if your Arduino's 5V rail sags to 4.8V under load, both the V_quiescent and the sensitivity drop proportionally. To maintain accuracy in real-world power systems, measure the actual VCC dynamically or use a precision external voltage reference.

// SS49E Linear Hall Effect Sensor - Arduino Uno (5V Logic)
#define SENSOR_PIN A0
#define VCC 5.0
#define ADC_MAX 1023.0
#define SENSITIVITY_V_PER_GAUSS 0.0014 // 1.4 mV/G at 5V
#define GAUSS_TO_MILLITESLA 0.1

float vcc_quiescent = VCC / 2.0;

void setup() {
  Serial.begin(115200);
  analogReference(DEFAULT); // Ensure 5V reference on Uno
}

void loop() {
  int rawADC = analogRead(SENSOR_PIN);
  
  // Convert raw ADC to Voltage
  float vOut = (rawADC * VCC) / ADC_MAX;
  
  // Calculate Magnetic Field in Gauss
  float gauss = (vOut - vcc_quiescent) / SENSITIVITY_V_PER_GAUSS;
  
  // Convert to milliTesla (Standard SI unit)
  float mT = gauss * GAUSS_TO_MILLITESLA;
  
  Serial.print("Raw: "); Serial.print(rawADC);
  Serial.print(" | mT: "); Serial.println(mT, 2);
  
  delay(100);
}

Real-World Interference and Calibration Fixes

According to All About Circuits' guide on magnetic sensing, Hall ICs are incredibly susceptible to environmental magnetic noise. If your readings are jittery or drifting, check these three interference sources:

1. Earth's Magnetic Field and Ferrous Metals
The Earth's magnetic field is roughly 0.5 Gauss. While small, if you are measuring weak magnetic fields, the orientation of your PCB relative to North/South will shift your baseline. More problematic are nearby ferrous metals (screws, steel enclosures, breadboard rails) that distort local flux lines. Always calibrate your zero-point after the sensor is mounted in its final physical enclosure.

2. PCB Trace Currents (Ampere's Law)
Any current flowing through a wire generates a concentric magnetic field. If you route a 2A motor power trace directly beneath the SS49E on your PCB, the magnetic field generated by that current will be read by the sensor as physical movement. Keep high-current traces at least 10mm away from the sensor's active area, or route them in twisted pairs to cancel the magnetic field.

3. Temperature Drift
The SS49E has a temperature coefficient of roughly 0.06%/°C. If your enclosure heats up by 30°C, your sensitivity will drift. For high-precision applications, read an onboard thermistor (or a digital sensor like the BME280) and apply a software compensation multiplier to the sensitivity variable in your code.

Pro-Tip: Software Low-Pass Filter
If you are dealing with 50/60Hz AC mains hum from a nearby transformer, hardware RC filters can phase-shift your signal. Instead, oversample the ADC. Take 64 rapid readings, sum them, and divide by 64. This simple moving average acts as a digital low-pass filter, smoothing out high-frequency EMI without requiring extra capacitors.

Frequently Asked Questions

What is the difference between a linear and switch hall effect sensor circuit?

A linear hall effect sensor circuit (like the SS49E or A1302) outputs a continuous analog voltage that varies proportionally with the magnetic field strength, allowing you to measure exact distance or field density. A switch hall effect sensor (like the A3144) contains an internal Schmitt trigger; it outputs a digital LOW when a specific magnetic threshold is crossed and returns HIGH when the field drops below a release point. You cannot use a switch sensor to measure partial magnetic fields or analog distances.

How do I calibrate a hall effect sensor circuit for temperature drift?

To calibrate for temperature drift, you must first characterize the sensor's baseline voltage (V_quiescent) and sensitivity across your expected operating temperature range. In practice, mount a digital temperature sensor (like a DS18B20) next to the Hall IC. Record the ADC output at 0 Gauss at various temperatures. In your microcontroller code, create a lookup table or a linear regression formula that adjusts the vcc_quiescent and SENSITIVITY variables dynamically based on the live temperature reading.

Why is my hall effect sensor circuit outputting noisy readings?

Noisy readings in an analog hall effect sensor circuit are almost always caused by power supply ripple or electromagnetic interference (EMI). Because the sensor is ratiometric, any high-frequency noise on the VCC line is directly amplified onto the OUT pin. To fix this, solder a 0.1 µF ceramic capacitor directly across the VCC and GND pins of the sensor. Additionally, ensure your microcontroller's ADC reference voltage is stable; if using an ESP32, switch from the default noisy internal reference to an external precision reference or use heavy software oversampling.

Can I power a hall effect sensor circuit directly from a 3.3V ESP32 pin?

Yes, the SS49E operates from 2.7V to 6.5V, making it fully compatible with 3.3V logic systems like the ESP32 or Raspberry Pi Pico. However, you must recalculate your math. At 3.3V, the quiescent baseline drops to 1.65V, and the sensitivity drops proportionally to approximately 0.924 mV/Gauss (1.4 mV/G × (3.3 / 5.0)). If you fail to update the sensitivity constant in your code, your calculated milliTesla values will be off by roughly 34%.