-
1Prototype on breadboard
Wire the LIS3DH to the ESP32 over SPI (SCK=18, MISO=19, MOSI=23, CS=5). Power from 3.3V. Flash a basic sketch that prints raw accelerometer values over serial.
-
2Get the detection working
Implement the bandpass filter and threshold logic. Tune the threshold by dribbling and watching the serial output. You want clean counts with no double-triggers.
-
3Add BLE
et up the GATT service. Test with nRF Connect or LightBlue before writing any app code.
-
4Add power management
Configure the LIS3DH to generate an interrupt on wake-up motion. Put the ESP32 into light sleep. Measure current draw — you want under 20 mA average.
-
5Design the PCB
We used KiCad with a 2-layer stackup. Keep the antenna area of the ESP32 module clear of copper and components. Route the LIS3DH SPI traces short and away from the antenna.
Himanshu Dada
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.