// HCI Coursework · Physical Computing · Arduino

Hall Effect & Hubris
A Field Report on Building with Binary

What happens when two interaction designers get a sensor that only knows one bit, and decide that's enough to replace keyboards and surveil dogs.

Tanvi Reddy KamanuriSonia SalunkeKeyestudio Hall Effect Sensor
01   The hardware

What We Were Working With

The Keyestudio Hall Effect Magnetic Sensor is about as conceptually minimal as components get. It wraps a Hall effect element and a comparator into a small PCB, gives you three pins, and produces a single digital output. Magnet nearby → LOW. Magnet gone → HIGH. That's the whole API.

It runs on 3.3V or 5V, making it immediately Arduino-compatible, and wiring it up takes about three minutes including reading the (very short) datasheet.

G
→ GND
V
→ 3.3/5V
S
→ Digital Pin
Output type
Digital
Detection range
~few mm
Operating voltage
3.3 – 5V
Contact required?
Sometimes
Polarity sensitive?
Yes (south)
Gradual output?
No

Strengths: no physical contact needed, fast response, extremely reliable, and dead simple to integrate. Limitations: it only detects magnets (not proximity, not humans, not vibes), the range is tiny, and nearby stray magnets will absolutely troll you mid-demo.

02   The surprises

What the Sensor Didn't Tell Us Up Front

// SURPRISE_01, Polarity actually matters

We assumed a magnet is a magnet. It is not. Most Hall effect sensors, including this one, are sensitive to only one magnetic pole, typically south. Wave the north end at the sensor and it sits there, stonefaced, detecting nothing. This was discovered live, in front of a laptop, with increasing desperation.

$ digitalRead(hallPin)
→ HIGH   // no magnet... but there IS a magnet??
→ [flip magnet 180°]
→ LOW    // there it is
$ // physics: 1, us: 0

// SURPRISE_02, G-V-S pin order is not universal

Different sensors from different manufacturers print their ground, power, and signal pins in different orders on the board. We wired ours in the order we assumed it would be, not the order it actually was. The sensor technically responded, but inversely. Everything was backwards. We spent longer than we'd like to admit wondering if we'd broken physics before checking the silkscreen label with a phone flashlight.

⚠ Lesson learned

Always verify G-V-S order directly on the board before powering up. Do not trust muscle memory from a different sensor model. Do not trust vibes.

// SURPRISE_03, Range is magnet-dependent, not just sensor-dependent

A strong neodymium magnet can trigger the sensor from several centimeters away. A weaker ferrite magnet might need direct contact. The datasheet gives you the sensor's specs; it cannot give you the specs of whatever magnet you grabbed off your fridge. Design your interaction around your actual magnet, not your assumed one.

03   Prototype one

The Magnetic Keyboard: A Thought Experiment That Got Out of Hand

Concept: eliminate physical key presses entirely. Attach magnets to your fingertips, hover over an array of Hall effect sensors, each mapped to a distinct buzzer tone sequence. To type, simply learn 78 unique buzzer melodies. Objectively worse than a keyboard. We built it anyway.

Absurd_int.inoArduino C++
const int hallPin1 = 4;
const int hallPin2 = A0;
const int buzzerPin = 9;

void loop() {
  int s1 = digitalRead(hallPin1);
  int s2 = digitalRead(hallPin2);

  if (s1 == LOW) playHighSequence();
  else if (s2 == LOW) playLowSequence();
  else noTone(buzzerPin);
}

Two sensors, two distinct melodic sequences, a rising high sequence and a staccato low pattern. The prototype worked perfectly as a two-key chime box. As a typing interface, it confirmed that the QWERTY keyboard will outlive us all.

↳ UX Takeaway

Even a completely impractical prototype surfaces real findings. We noticed that the moment of triggering, the instant the buzzer fired when the magnet crossed threshold, felt genuinely satisfying. Binary events, when timed well, have a snap to them that continuous sliders don't. That's worth designing with intentionally.

04   Prototype two

The Dog Surveillance System: One Bit of Emotional Data

Concept: mount a magnet on a dog collar. Mount a Hall effect sensor near a door. Wire the sensor output to an LED. When the dog is near → light on, feel calm. Dog wanders off → light off, begin existential spiral. You now have zero real information about your dog's location but a powerful emotional signal about his magnetic proximity to one specific point.

assignmenthw-3.inoArduino C++
int hallPin = 2; // Hall sensor OUT pin
int ledPin = 8; // External LED pin

void loop() {
  int state = digitalRead(hallPin);

  // Magnet detected → sensor output LOW
  if (state == LOW)
    digitalWrite(ledPin, HIGH); // LED ON
  else
    digitalWrite(ledPin, LOW); // LED OFF
}

Twelve lines of code. Maximum emotional leverage per line of code: extremely high. The circuit was equally minimal, sensor to digital pin 2, LED with current-limiting resistor on pin 8, powered via Arduino's 5V rail.

↳ UX Takeaway

This is actually a sharp model for how status indicators work in smart home UIs. A single binary signal, decontextualized from everything else, doesn't inform, it primes affect. Green light = safe. No light = panic. The design of what that light means is doing all the work, not the data itself. That gap between signal and meaning is where most IoT UX lives and dies.

05   Reflections

What One Bit Actually Teaches You

Working with a purely binary sensor for an entire project cycle forces a useful discipline: you can't add more data to solve a design problem, so you have to be more precise about what the one bit you have actually means.

The sensor's constraints, short range, single pole, no gradient, pushed us to make deliberate physical design choices we'd have otherwise hand-waved past. Where exactly does the magnet go? How strong does it need to be? What physical action maps to the trigger? These become real, load-bearing questions when you can't pad the interaction with extra sensor resolution.

The wiring gotchas (pin order, polarity, range variance by magnet) were frustrating in the moment and instructive in retrospect. Physical prototyping doesn't respect the assumptions you made in Figma. That's the whole point of physical prototyping.

↳ Final thought

Binary sensors aren't limited, they're focused. The design challenge isn't getting the sensor to do more. It's deciding what one well-chosen bit of state should mean in your system, and building clearly around that meaning.