The standard 3-pin hall sensor pinout for a bare TO-92 package (viewed from the flat face with pins pointing down) is Pin 1: VCC, Pin 2: GND, and Pin 3: OUT. However, assuming this layout applies universally across all switch, linear, and pre-wired modules will lead to fried silicon or floating GPIO errors. Below is the definitive reference for mapping bare ICs, hobbyist modules, and industrial connectors to your microcontroller.

Master Hall Sensor Pinout & Module Reference Table

This table covers the most common hall effect sensors used in embedded projects. Always verify the output stage before connecting directly to a 3.3V microcontroller GPIO.

Part / Module Type Pin 1 (Left) Pin 2 (Center) Pin 3 (Right) Output Stage VCC Range
A3144 (Bare IC) Digital Switch VCC GND OUT Open-Drain (NPN) 4.5V – 24V
SS49E (Bare IC) Linear Analog VCC GND OUT Push-Pull 4.5V – 6.0V
DRV5055 (Bare IC) Linear Analog VCC OUT GND Push-Pull 2.5V – 5.5V
KY-003 (Module) Digital Switch OUT (Blue/Green) VCC (Red) GND (Black) Open-Drain (w/ Pull-up) 3.3V – 5.0V
KY-024 (Module) Linear + Digital AO (Analog Out) GND (Black) VCC (Red) Push-Pull / Open-Drain 3.3V – 5.0V

Standard vs. Proprietary Wiring Colors & Connectors

Unlike mains wiring governed by strict NEC or IEC color codes, low-voltage sensor wiring relies on a mix of JEDEC semiconductor standards, industrial connector norms, and hobbyist de-facto practices. Here is how to interpret the physical layer based on your hardware format.

JEDEC TO-92 Standard (Bare ICs)

For bare silicon like the A3144 or SS49E, the Allegro MicroSystems and JEDEC standard dictates viewing the flat stamped face with the leads pointing downward. Pin 1 is always left, Pin 2 is center, Pin 3 is right. There are no color codes here; you must rely on physical orientation and datasheet verification.

IEC 61076-2-101 (Industrial M12 Connectors)

If you are integrating industrial hall proximity sensors (like those from Sick or Balluff) into a PLC or ruggedized Raspberry Pi setup, they use M12 4-pin or 5-pin connectors. The IEC standard color code applies to the pigtail wires:

  • Brown: V+ (Usually 10-30V DC)
  • Blue: V- / GND
  • Black: Signal Output (Often PNP or NPN open-collector)
  • White: Normally Closed (NC) or secondary output

Hobbyist De-Facto Standard (Dupont / Modules)

Modules like the KY-003 use standard 2.54mm header pins. The de-facto color code for the included Dupont cables is Red for VCC, Black for GND, and Blue, Green, or Yellow for Signal. However, cheap clone modules frequently swap the VCC and GND pins on the silkscreen. Always trace the PCB copper from the voltage regulator or bypass capacitor to verify VCC before applying power.

Safe Interpretation When Markings Are Faded or Missing

If you have a salvaged TO-92 hall sensor with rubbed-off text, do not guess. Use this multimeter sequence to identify the pins safely:

  1. Find GND: Set your multimeter to diode test mode. Probe the center pin (COM lead) and touch the red lead to the outer pins. The pin that shows a ~0.6V forward voltage drop to both other pins is usually GND (due to internal ESD protection diodes).
  2. Find VCC: Connect a bench power supply set to 5V. Place a 1kΩ current-limiting resistor in series with the positive lead. Probe the suspected VCC pin. A hall sensor typically draws 3mA to 8mA quiescent current. If you see this current draw, you have found VCC. If current is 0mA or spikes >20mA, move to the next pin.
  3. Find OUT: The remaining pin is the output. Connect a 10kΩ pull-up resistor from this pin to 3.3V, and monitor it with an oscilloscope or multimeter while sweeping a neodymium magnet across the flat face.

Rows People Get Wrong: Output Stages & Voltage Tolerances

The most common point of failure in embedded hall sensor circuits isn't the pinout itself, but misunderstanding the electrical characteristics of the output pin.

⚠️ Warning: The Open-Drain Trap
The A3144 is an open-drain (or open-collector) sensor. This means the output transistor can only pull the pin to GND; it cannot drive it high. If you wire an A3144 directly to an ESP32 GPIO without an external pull-up resistor (typically 4.7kΩ to 10kΩ tied to 3.3V), the GPIO will read floating noise when the magnet is absent. The KY-003 module includes this resistor on the PCB, which is why it works out-of-the-box, but bare ICs do not.

Ratiometric Analog Errors (SS49E / DRV5055)

Linear hall sensors output an analog voltage proportional to the magnetic flux density. The quiescent output (no magnet) is exactly VCC / 2. If you power an SS49E from a noisy 5V USB rail that sags to 4.6V under load, your zero-point shifts from 2.5V to 2.3V. Your microcontroller's ADC will interpret this power sag as a magnetic field change. For precision linear measurements, use a dedicated low-dropout (LDO) regulator or the TI DRV5055, which offers better power supply rejection ratio (PSRR) and native 3.3V operation.

ESP32 3.3V Logic vs. 5V Sensors

While the A3144 can tolerate up to 24V on the VCC pin, its open-drain output will pull down to GND, which is perfectly safe for a 3.3V ESP32 GPIO (provided you pull up to 3.3V, not 5V). However, if you use a linear sensor like the SS49E powered at 5V, the analog output can swing up to 4.5V. Feeding 4.5V into an ESP32 ADC pin (which maxes out at ~3.1V safely) will degrade the silicon over time. Use a simple voltage divider (e.g., 10kΩ and 15kΩ) on the analog output pin before it reaches the microcontroller.

Frequently Asked Questions

What is the standard hall sensor pinout for a 3-pin KY-003 module?

Unlike bare TO-92 ICs, the KY-003 module silkscreen typically reads from left to right (with the component side facing you) as: Signal (S or DO), VCC (+), and GND (-). The physical wiring colors on the included harness are usually Blue/Green for Signal, Red for VCC, and Black for GND. Always verify the silkscreen, as some manufacturers flip the VCC and GND positions on the header.

How do I wire a 5V hall sensor to a 3.3V ESP32 GPIO safely?

For digital switch sensors (like the A3144), power the sensor's VCC pin with 5V (or 3.3V if the datasheet supports it), but tie the pull-up resistor on the OUT pin to the ESP32's 3.3V rail. Because the output is open-drain, it only pulls to GND, meaning the ESP32 will only ever see 0V or 3.3V. For linear analog sensors, power the sensor at 3.3V directly if supported (like the DRV5055), or use a voltage divider on the output pin to scale the 0-5V analog signal down to 0-3.1V.

Why is my hall sensor output floating high when no magnet is present?

If your microcontroller reads random HIGH/LOW toggles or a constant floating HIGH when the magnet is away, you are likely missing a pull-up resistor on an open-drain sensor. The internal pull-up resistors on microcontrollers (like the ESP32's internal 45kΩ pull-up) are often too weak to overcome environmental EMI on long wire runs. Add an external 4.7kΩ or 10kΩ resistor between the OUT pin and your logic VCC (3.3V) to provide a hard HIGH state.

How can I identify hall sensor pins if the text is rubbed off the TO-92 package?

Use a multimeter's diode test mode to find the GND pin (usually the center pin, showing a ~0.6V drop to the outer pins via internal protection diodes). Then, use a bench supply with a 1kΩ current-limiting resistor to find the VCC pin by looking for a 3mA to 8mA quiescent current draw. The remaining pin is the output. Always test the output with a strong neodymium magnet, as some sensors (like the A3144) are unipolar and will only trigger on the South pole of the magnet.