Hall effect sensor wiring depends entirely on whether you are using a digital switch (like the A3144) or a linear analog sensor (like the SS49E or DRV5055). Digital sensors output a clean 0V or Vcc logic signal when a specific magnetic threshold is crossed, requiring only a standard GPIO pin and an internal pull-up resistor. Linear sensors, conversely, output a continuous, ratiometric voltage proportional to the magnetic flux density (measured in Gauss or Tesla), requiring you to wire the output to an Analog-to-Digital Converter (ADC) pin and perform mathematical scaling in your firmware.
The underlying sensing principle relies on the Lorentz force. When a current-carrying silicon wafer is placed in a magnetic field, the magnetic flux pushes the charge carriers (electrons or holes) to one side of the material. This accumulation of charge creates a measurable transverse voltage—the Hall voltage. In modern silicon ICs, this microvolt-level signal is internally amplified, temperature-compensated, and buffered before it ever reaches the output pin, but the physical orientation of the sensor relative to the magnetic field lines remains critical for accurate readings.
Hall Effect Sensor Wiring: Digital vs. Analog Pinouts & Specs
The most common point of failure in hobbyist and prototyping builds is misidentifying the pinout or exceeding the supply voltage range. While the TO-92 package is standard across many Hall ICs, the internal die configurations dictate entirely different wiring schemes. Below is a data-dense specification table covering the four most common Hall effect sensors used in embedded projects.
| Part Number | Output Type | Vcc Range | Quiescent Current | Sensitivity / Threshold | Pinout (1-2-3) |
|---|---|---|---|---|---|
| A3144 | Digital (Open-Drain) | 4.5V – 24.0V | 4.5 mA | B_op: 30G / B_rp: -30G | 1: Vcc, 2: GND, 3: OUT |
| SS49E | Linear Analog | 2.7V – 6.5V | 6.0 mA | 1.4 mV/Gauss (at 5V) | 1: Vcc, 2: GND, 3: OUT |
| DRV5055 | Linear Analog | 2.5V – 5.5V | 4.0 mA | 45 mV/mT (at 3.3V) | 1: Vcc, 2: OUT, 3: GND |
| TLE493D | Digital (I2C) | 2.7V – 3.6V | 3.0 mA | 3D I2C Addressable | 1: Vdd, 2: SCL, 3: GND (4: SDA) |
If you are wiring an A3144 or similar digital switch, the output pin is open-drain. It can pull the line to GND, but it cannot drive it HIGH. You must enable the microcontroller's internal pull-up resistor (e.g.,
INPUT_PULLUP in Arduino) or wire an external 10kΩ resistor between Vcc and the OUT pin. Without this, the output will float and trigger phantom interrupts.
Output Signal Math: Converting Raw ADC to Gauss
When wiring a linear analog sensor like the Honeywell SS49E, the microcontroller's ADC reads a raw integer, not a physical magnetic unit. To get meaningful data, you must map the raw ADC reading back to voltage, and then scale that voltage to Gauss. The SS49E is ratiometric, meaning its quiescent (zero-field) output voltage and its sensitivity scale linearly with the supply voltage.
Assuming a 5.0V supply and an Arduino Uno's 10-bit ADC (0-1023 range):
- ADC Resolution: 5.0V / 1024 = 4.88 mV per step.
- Quiescent Voltage (V_q): Vcc / 2 = 2.5V (which equals an ADC reading of ~512).
- Sensitivity: 1.4 mV per Gauss.
The mathematical formula to convert the raw ADC reading to Gauss is:
Gauss = ( (ADC_raw * 0.00488) - V_q ) / 0.0014
However, relying on nominal USB voltage (which often sags to 4.7V) introduces massive errors. The professional approach is to read the actual Vcc via an analog pin and calculate V_q dynamically. Furthermore, Hall sensors are highly susceptible to high-frequency electromagnetic interference (EMI), so an exponential moving average (EMA) low-pass filter in software is mandatory for stable readings.
// SS49E Linear Hall Sensor Interfacing with Software Filtering
const int hallPin = A0;
const int vccPin = A1; // Wire Vcc to A1 to measure actual supply voltage
float alpha = 0.1; // EMA filter coefficient (lower = smoother but slower)
float filteredGauss = 0.0;
void setup() {
Serial.begin(115200);
analogReference(DEFAULT); // 5V on Arduino Uno
}
void loop() {
// 1. Read actual Vcc to account for USB voltage sag
float vcc = analogRead(vccPin) * (5.0 / 1024.0);
float vq = vcc / 2.0; // Ratiometric quiescent voltage
float sensitivity = 0.0014 * (vcc / 5.0); // Scale sensitivity to actual Vcc
// 2. Read raw sensor data and convert to voltage
int rawADC = analogRead(hallPin);
float vOut = rawADC * (5.0 / 1024.0);
// 3. Calculate instantaneous Gauss
float instantGauss = (vOut - vq) / sensitivity;
// 4. Apply Exponential Moving Average (EMA) filter
filteredGauss = (alpha * instantGauss) + ((1.0 - alpha) * filteredGauss);
Serial.print('Raw ADC: '); Serial.print(rawADC);
Serial.print(' | Filtered Gauss: '); Serial.println(filteredGauss, 1);
delay(20); // 50Hz sample rate
}
For deeper theoretical background on ratiometric scaling, refer to the Electronics Tutorials Hall Effect guide, and for ADC hardware specifics, consult the official Arduino analogRead documentation.
Step-by-Step Interfacing & Calibration
Wiring the sensor correctly on a breadboard or perfboard requires attention to power integrity. Follow these steps to ensure a noise-free signal path:
- Power Delivery & Decoupling: Wire the sensor's Vcc and GND pins to your microcontroller's 5V (or 3.3V for DRV5055) and GND rails. Critical: Solder a 100nF (0.1μF) ceramic decoupling capacitor directly across the Vcc and GND pins of the sensor itself. Hall ICs contain internal high-gain amplifiers that will oscillate or inject noise into the power rail without local bypass capacitance.
- Signal Routing: Route the analog output wire away from any digital clock lines, I2C buses, or PWM motor control wires. If the sensor is mounted more than 6 inches from the microcontroller, use a twisted-pair cable for the signal and GND to reject common-mode EMI.
- Zero-Field Calibration: Before installing the sensor near your target magnet, power the system and record the baseline ADC reading in a magnetically neutral environment. This is your true
V_qoffset. Do not assume it will be exactly 512 on a 10-bit ADC; silicon offset voltages typically cause a ±15 step variance from the factory. - Orientation Verification: The SS49E and A3144 read magnetic fields perpendicular to their flat face (the side with the text). If you wire it up and get zero response, you are likely presenting the magnetic pole parallel to the sensor face rather than perpendicular to it.
Troubleshooting Interference & Magnetic Noise
Even with perfect hall effect sensor wiring, embedded engineers frequently encounter erratic readings or phantom triggers. Understanding the physical and electrical interference sources is required to debug these systems.
| Interference Source | Symptom | Mitigation Strategy |
|---|---|---|
| Ferrous Mounting Hardware | Baseline offset shifts when sensor is screwed into an enclosure; reduced effective range. | Use brass, nylon, or 316 stainless steel (non-magnetic) screws within 10mm of the sensor face. |
| PWM Motor Noise | ADC readings jitter wildly at the PWM frequency (e.g., 490Hz); digital sensors trigger falsely. | Add a hardware RC low-pass filter (100Ω resistor + 1μF capacitor) on the analog output pin before the ADC. |
| Magnet Temperature Drift | Readings slowly drop as the motor or enclosure heats up, despite the IC being temp-compensated. | The sensor is fine; Neodymium magnets lose ~0.11% flux per °C. Switch to Samarium Cobalt (SmCo) magnets for high-temp environments. |
| Ground Loops | Digital A3144 output floats or reads 2.5V instead of clean 0V/5V logic levels. | Ensure the sensor GND and microcontroller GND share a single star-ground point; avoid daisy-chaining high-current motor grounds. |
When designing systems that require high precision, such as current sensing or fine-position joysticks, consider upgrading from basic linear Hall ICs to integrated magnetic encoder ICs like the Texas Instruments DRV5055 family or AS5600. These offer higher resolution, better linearity, and integrated I2C outputs that bypass the microcontroller's noisy internal ADC entirely, shifting the math burden to the sensor's internal DSP.






