Documentation

49E Linear Hall Effect Magnetic Sensor for Arduino & ESP32 | ShillehTek Product Manual
Documentation / 49E Linear Hall Effect Magnetic Sensor for Arduino & ESP32 | ShillehTek Product Manual

49E Linear Hall Effect Magnetic Sensor for Arduino & ESP32 | ShillehTek Product Manual

manualshillehtek

Overview

The 49E (SS49E) is a linear Hall effect sensor in a tiny TO-92 package — three legs, no board, no protocol. Unlike digital Hall switches that only say "magnet / no magnet," the 49E outputs an analog voltage proportional to magnetic field strength: with no field, OUT rests at half the supply voltage; bring a magnet's south pole toward the marked face and the voltage climbs; bring a north pole and it falls. One analogRead() gives you field strength and polarity.

That linear response is what makes it more than a switch. At 5V the output moves about 1.4 mV per gauss across a ±650 gauss linear range, and because the sensor is ratiometric, everything scales neatly at 3.3V too. Response is fast (kilohertz-class), supply range is a friendly 2.7-6.5V, and current draw is a few milliamps — so it drops into Arduino, ESP32, Raspberry Pi (via an ADC), and Pico projects with nothing but three wires.

Classic uses: contactless position and proximity sensing (a magnet on a moving part, the 49E fixed), throttle grips and control knobs with no wearing contacts, magnetic encoder experiments, ferrous-metal detection, and physics demos that make magnetic fields visible as numbers. For plain open/closed detection a reed switch or digital Hall sensor is simpler — the 49E shines when "how strong, which pole, how close" is the question.

At a Glance

Output
Analog, linear with field
Zero-Field Output
~VCC/2
Sensitivity
~1.4 mV/gauss @ 5V
Supply Voltage
2.7 - 6.5V
Detects
Both poles (N and S)
Pins
VCC, GND, OUT

Specifications

Parameter Value
Sensor 49E / SS49E linear Hall effect IC, TO-92 package
Supply Voltage 2.7V - 6.5V DC
Supply Current ~6 - 10 mA
Output Type Analog, ratiometric (scales with supply)
Quiescent Output ~VCC/2 at zero field (≈2.5V at 5V supply)
Sensitivity ~1.4 mV/G at 5V (~0.9 mV/G at 3.3V)
Linear Range ±650 gauss typical
Polarity Response South pole at marked face → output rises; north pole → falls
Frequency Response Up to ~10 kHz
Operating Temperature -40°C to +85°C
Pinout (marked face toward you, legs down) 1 = VCC, 2 = GND, 3 = OUT

Pinout Diagram

Hold the sensor with the flat, marked face toward you and the legs pointing down: pin 1 (left) is VCC, pin 2 (middle) is GND, and pin 3 (right) is OUT. The sensing element sits behind the marked face, so aim that face at the magnet. The legs are fine — bend them with pliers rather than at the package, and if the sensor sits in a breadboard, splay the legs slightly for a solid fit.

49E linear hall effect sensor TO-92 pinout diagram showing OUT, GND, and 5V pins with VCC GND OUT pin order

Wiring Guide

Arduino Wiring

49E Pin Arduino Pin
1 (VCC) 5V
2 (GND) GND
3 (OUT) A0
Tip: Double-check the pin order before powering up — VCC and GND reversed will heat the sensor quickly. Marked face toward you, legs down: left leg is VCC.

ESP32 Wiring

Power from 3V3 (the sensor works from 2.7V) so OUT can never exceed 3.3V — inherently safe for the ESP32's ADC.

49E Pin ESP32 Pin Details
1 (VCC) 3V3 Do NOT use VIN/5V
2 (GND) GND
3 (OUT) GPIO 34 ADC1 channel, input-only pin
Note: The 49E is ratiometric — at 3.3V supply, the zero point sits near 1.65V and sensitivity is about 0.9 mV per gauss. The code accounts for this with a per-platform constant.

Raspberry Pi Wiring

The Pi has no analog inputs, so an ADS1115 I2C ADC reads OUT. Run everything from the 3.3V rail.

Wire / Pin Connects To Details
49E VCC Pin 1 (3.3V) Shared rail
49E GND Pin 6 (GND)
49E OUT ADS1115 A0 Analog channel 0
ADS1115 VDD / GND Pin 1 / Pin 6
ADS1115 SDA / SCL Pin 3 / Pin 5 I2C (GPIO 2 / GPIO 3)
Tip: Enable I2C with sudo raspi-config, then i2cdetect -y 1 should list the ADS1115 at 0x48.

Raspberry Pi Pico Wiring

49E Pin Pico Pin Details
1 (VCC) 3V3(OUT) (pin 36) Do NOT use VBUS (5V)
2 (GND) GND (pin 38)
3 (OUT) GP26 (pin 31) ADC0 input

Code Examples

Every example calibrates the zero point at startup (keep magnets away for the first two seconds), then prints the output voltage and an approximate field strength in gauss — positive for a south pole facing the marked side, negative for north.

Arduino

hall49e_arduino.ino
// 49E Linear Hall Effect Sensor - Arduino Example
// OUT -> A0, VCC -> 5V, GND -> GND

const int hallPin = A0;
const float MV_PER_GAUSS = 1.4;   // ~1.4 mV/G at 5V supply
float zeroVolts = 2.5;

float readVolts(int samples) {
  long total = 0;
  for (int i = 0; i < samples; i++) {
    total += analogRead(hallPin);
    delay(2);
  }
  return (total / (float)samples) * (5.0 / 1023.0);
}

void setup() {
  Serial.begin(9600);
  Serial.println("Calibrating - keep magnets away...");
  delay(1000);
  zeroVolts = readVolts(200);
  Serial.print("Zero point: ");
  Serial.print(zeroVolts, 3);
  Serial.println(" V. Bring a magnet close!");
}

void loop() {
  float volts = readVolts(20);
  float gauss = (volts - zeroVolts) * 1000.0 / MV_PER_GAUSS;

  Serial.print("OUT: ");
  Serial.print(volts, 3);
  Serial.print(" V | ~");
  Serial.print(gauss, 0);
  Serial.print(" G ");

  if (gauss > 15)       Serial.println("(south pole)");
  else if (gauss < -15) Serial.println("(north pole)");
  else                  Serial.println("(no field)");

  delay(300);
}

ESP32 (MicroPython)

hall49e_esp32.py
# 49E Linear Hall Effect Sensor - ESP32 MicroPython Example
# OUT -> GPIO 34, VCC -> 3V3, GND -> GND

from machine import ADC, Pin
import time

adc = ADC(Pin(34))
adc.atten(ADC.ATTN_11DB)      # full 0-3.3V range

MV_PER_GAUSS = 0.9            # ratiometric: ~0.9 mV/G at 3.3V supply

def read_volts(samples):
    total = 0
    for _ in range(samples):
        total += adc.read_uv()
        time.sleep_ms(2)
    return total / samples / 1_000_000

print("Calibrating - keep magnets away...")
time.sleep(1)
zero = read_volts(200)
print("Zero point: {:.3f} V. Bring a magnet close!".format(zero))

while True:
    volts = read_volts(20)
    gauss = (volts - zero) * 1000 / MV_PER_GAUSS

    if gauss > 15:
        pole = "south pole"
    elif gauss < -15:
        pole = "north pole"
    else:
        pole = "no field"

    print("OUT: {:.3f} V | ~{:.0f} G ({})".format(volts, gauss, pole))
    time.sleep(0.3)

Raspberry Pi (Python + ADS1115)

hall49e_rpi.py
#!/usr/bin/env python3
# 49E Linear Hall Effect Sensor - Raspberry Pi + ADS1115 Example
# OUT -> ADS1115 A0, SDA/SCL -> GPIO 2/3, VCC -> 3.3V
# Install: pip3 install adafruit-circuitpython-ads1x15

import time
import board
import busio
import adafruit_ads1x15.ads1115 as ADS
from adafruit_ads1x15.analog_in import AnalogIn

MV_PER_GAUSS = 0.9   # ~0.9 mV/G at 3.3V supply

i2c = busio.I2C(board.SCL, board.SDA)
ads = ADS.ADS1115(i2c)
ads.gain = 1
channel = AnalogIn(ads, ADS.P0)

def read_volts(samples):
    total = 0.0
    for _ in range(samples):
        total += channel.voltage
        time.sleep(0.002)
    return total / samples

print("Calibrating - keep magnets away...")
time.sleep(1)
zero = read_volts(100)
print("Zero point: {:.3f} V. Bring a magnet close!".format(zero))

try:
    while True:
        volts = read_volts(20)
        gauss = (volts - zero) * 1000 / MV_PER_GAUSS

        if gauss > 15:
            pole = "south pole"
        elif gauss < -15:
            pole = "north pole"
        else:
            pole = "no field"

        print("OUT: {:.3f} V | ~{:.0f} G ({})".format(volts, gauss, pole))
        time.sleep(0.3)
except KeyboardInterrupt:
    print("Stopped by user")

Raspberry Pi Pico (MicroPython)

hall49e_pico.py
# 49E Linear Hall Effect Sensor - Pico MicroPython Example
# OUT -> GP26 (ADC0), VCC -> 3V3(OUT), GND -> GND

from machine import ADC
import time

adc = ADC(26)
CONVERSION = 3.3 / 65535
MV_PER_GAUSS = 0.9        # ~0.9 mV/G at 3.3V supply

def read_volts(samples):
    total = 0
    for _ in range(samples):
        total += adc.read_u16()
        time.sleep_ms(2)
    return total / samples * CONVERSION

print("Calibrating - keep magnets away...")
time.sleep(1)
zero = read_volts(200)
print("Zero point: {:.3f} V. Bring a magnet close!".format(zero))

while True:
    volts = read_volts(20)
    gauss = (volts - zero) * 1000 / MV_PER_GAUSS

    if gauss > 15:
        pole = "south pole"
    elif gauss < -15:
        pole = "north pole"
    else:
        pole = "no field"

    print("OUT: {:.3f} V | ~{:.0f} G ({})".format(volts, gauss, pole))
    time.sleep(0.3)

Frequently Asked Questions

Why does the output sit at 2.5V with no magnet around?
That is the design: the 49E centers its output at half the supply so it can report both magnetic polarities — above center means a south pole is facing the marked side, below center means north. Your code should always measure relative to a calibrated zero point rather than assuming exactly VCC/2, since each unit idles slightly differently.
What is the difference between this and a digital Hall sensor like the A3144?
Digital Hall switches output only on/off when the field crosses a fixed threshold — great for RPM counting and lid detection. The 49E is linear: it reports a continuous voltage proportional to field strength and direction, which is what you want for position sensing, throttle-style controls, and any project that asks "how close" or "which pole" instead of just "is it there."
Can I measure distance to a magnet with it?
Relative distance, yes — absolute distance takes calibration. Field strength falls off roughly with the cube of distance, so the response is very non-linear: huge changes up close, tiny ones far away. For a repeatable setup (same magnet, same geometry), map a few known distances to readings and interpolate. Useful range with a small neodymium magnet is typically a few millimeters to a few centimeters.
How do I know which pole of my magnet is which?
Let the 49E tell you: face the magnet toward the sensor's marked side — if the reading rises above the zero point, that is the south pole; if it falls, north. This is also a handy way to label unmarked magnets for projects where polarity matters.
Does it work at 3.3V?
Yes — the supply range starts at 2.7V, and the ESP32, Pi, and Pico wiring here all run it at 3.3V. Being ratiometric, the zero point moves to ~1.65V and the sensitivity scales to roughly 0.9 mV per gauss; the code examples already use the right constant per platform.
My readings jitter by a few gauss. How do I steady them?
Average multiple samples (all the examples average 20+), keep the sensor away from power wiring, motors, and speakers, and remember that even the Earth's field (~0.5 G) and nearby steel shift the baseline slightly. For threshold logic, add a little hysteresis so values hovering near the trigger point do not chatter.
Can it detect steel, or only magnets?
By itself it senses magnetic fields, so plain steel barely registers. The classic trick is to glue a small bias magnet to the back of the sensor: nearby ferrous metal then bends the bias field and shifts the reading, turning the 49E into a simple ferrous-metal detector.

Related Tutorials