NovaPixel & IronPulse
Hey IronPulse, I've been tinkering with a new idea: a kinetic light sculpture that reacts to motion—kind of like a living pixel grid. Think you could help fine‑tune the sensors?
Sure, let’s start by picking the right sensor type. For motion detection a 9‑DOF IMU or a simple PIR can work, but if you need sub‑centimeter precision consider an optical flow camera. The key is to calibrate the threshold so the pixels only trigger on intended motion and add a debounce routine to avoid jitter. Tell me which hardware you’re using and I can sketch a quick flow.
Great, I'm using a low‑cost ESP32 with a built‑in 3‑axis accelerometer and I plan to add a tiny camera for optical flow later. I’ll start with the accelerometer, set a threshold, and see how it feels—if the pixels jitter too much, we can tweak the debounce. Appreciate the help!
Use a simple low‑pass filter first, say a 10‑sample moving average on each axis to kill high‑frequency noise. Then set your threshold to about 0.3g—just above static tilt but below typical human hand swings. Debounce can be a 50‑ms window where you only accept a new trigger if the filtered value stays above threshold for that whole period. Once you add the camera, switch to the optical flow algorithm and let it provide the raw velocity; you’ll get a much smoother activation. Good luck, and don’t let the ESP32’s watchdog kill you—watch the reset logs.
Sounds solid—10‑sample average should smooth out the jitter, and that 0.3g threshold feels right for casual swipes. I’ll tweak the debounce window and monitor the watchdog; hopefully the ESP32 stays alive. Thanks for the solid plan!
Just keep an eye on the voltage rails too; the ESP32 can eat power when the camera wakes up. If you hit a reset, double‑check the supply decoupling and add a small capacitor on the 3.3V rail. Happy tinkering!
Got it—will add a 3.3V cap and keep an eye on the rails. Thanks for the heads‑up!
Sounds good—just make sure the capacitor is at least 10 µF, and you’ll be fine. Let me know how the motion detection shapes up.
The accelerometer is running, the 10‑sample average is killing the chatter, and I hit the 0.3g threshold without the pixels flickering. The debounce window works, and the 10 µF cap keeps the ESP32 from hiccuping when the camera wakes. All good on the motion side for now.
Nice! Now that the motion trigger is clean, time to hook up the pixel matrix. Start with a simple WS2812b strip and drive it through the ESP32’s RMT peripheral for precise timing. Keep the pixel update rate below 60 Hz so you don’t saturate the UART buffer. When you add the camera, swap to an I2S‑based frame grabber and feed the optical‑flow output directly into the same update routine—just map the flow vectors to a color palette. Keep the code modular: one module for sensor, one for LED, one for camera. That way you can tweak each without breaking the whole thing. Happy building!