My IMU Could Detect Me Standing Up from a Meter Away
March 2026
While building the data collection glove for my diffusion policy project, I had an IMU that would randomly stop responding. An ICM-20948 on a bare Amazon breakout board, connected to an ESP32 via DuPont jumper wires on a dedicated I2C bus. It would work fine for a while, then go silent. No I2C acknowledgment, nothing. Power cycling the whole system brought it back, until it died again.
My first assumption was I2C bus lockup. This is a known failure mode where a slave device holds the data line low and the whole bus hangs. I added SCL clock recovery, reduced timeouts, tried faster reinit thresholds. It got worse.
Second assumption: firmware bug. I spent hours reading through the I2C driver code, adjusting failure detection thresholds, adding more aggressive error recovery. No improvement.
Third assumption: loose DuPont connectors. I moved the ground wire off the breadboard directly to the ESP32 pin. Replaced every jumper wire. Still failed.
Then I noticed something strange. The IMU also failed when I wasn't touching the glove at all. It was laying on a table about a meter away from me, connected to my laptop only by a USB cable. I wasn't near it. I wasn't bumping the table. I was just sitting on the couch.
So I started testing systematically. Sit on the couch, IMU works. Stand up from the couch, IMU dies. Sit back down, IMU works. Stand up, dead. Fifteen times in a row, 100% reproducible. Shaking the laptop did nothing. Moving the table did nothing. But standing up from the couch killed it every single time.
Static electricity. The couch fabric generates thousands of volts of static charge when you stand up. The unshielded DuPont jumper wires between the ESP32 and the IMU act as antennas. They pick up the electromagnetic pulse from the discharge, even from a meter away. The ICM-20948, sitting on a bare breakout board with no decoupling capacitors, draws about 2.5 milliwatts and operates between 1.71 and 3.6 volts. It takes almost nothing to corrupt its I2C state.
The other sensors on the glove were fine. The magnetic encoders and time-of-flight sensors sit behind a TCA9548A I2C multiplexer on a separate bus, and that multiplexer board has its own decoupling capacitors. The IMU was the only device connected via raw traces and bare wires with nothing between the chip and the outside world.
The fix was one 100nF ceramic capacitor soldered across VDD and GND at the IMU breakout. Every I2C device datasheet specifies this capacitor. The cheap Amazon breakout board just didn't have one.
Three hours debugging software for a hardware problem that cost less than a cent to fix. But I wouldn't have found it faster by looking at the hardware first. The failure mode looked exactly like a software bug. The sensor would work for unpredictable amounts of time, then fail. That pattern screams firmware. It took eliminating software and mechanical causes before the environment itself became the suspect.
If your sensor fails randomly and you've ruled out software, think about the electromagnetic environment. Unshielded wires on a breadboard prototype are antennas. Your body is a static generator. A decoupling cap is the cheapest insurance in electronics.