S16DRV5033 omnipolar

Hall Magnet

Senses a magnet nearby.

Loading 3D Drag to orbit · scroll to zoom · double-click to reset

Try it

Bring a magnet close (either pole)

10 magnet!10 magnet!

Magnet detector: OUT goes LOW when either pole of a magnet is close (~1-2 cm for a small neodymium).

/*
  BuiltByTyler Sensor Kit - S16 HALL MAGNET (DRV5033 omnipolar)
  Board: ESP32-WROOM-32 DevKit V1 (30-pin), Arduino-ESP32 core 3.x, "ESP32 Dev Module"

  Prints when a magnet is near (either pole, ~1-2 cm).
  OUT goes LOW near a magnet (pull-up is on the board).

  Wiring (module pin -> ESP32 pin):
    GND  -> GND
    VCC  -> 3V3
    OUT  -> GPIO 4

  Library: none needed
  Serial Monitor: 115200 baud
*/

#define OUT_PIN  4

void setup() {
  Serial.begin(115200);
  pinMode(OUT_PIN, INPUT);   // the board has its own pull resistor, so plain INPUT
}

int last = -1;   // last state we printed (-1 = nothing yet)

void loop() {
  int s = digitalRead(OUT_PIN);
  if (s != last) {             // only print when something changes
    Serial.println(s == LOW ? "0  magnet!" : "1  no magnet");
    last = s;
  }
  delay(10);
}

Not for sale yet. Planned price $79, shipping included. Join the waitlist and we'll email you once when the kit is ready. Nothing else.