This light up goal uses an array of Neopixels and a piezo sensor to sense vibration. When the hockey goal is hit with a puck, the piezo senses the vibration and triggers a flashing red and blue animation on the Neopixels driven by an Arduino Nano.
This was a quick build, please excuse the shoddy wire up.
* D8 --> Din
* 5+ --> 5+
* GND --> GND
* A0 --> Positive
* GND --> Negative
* 1MΩ pull down resistor across GND and A0
The included code requires the Neopixel library from Adafruit that can be added through the Arduino Library manager. You can fine tune the sensitivity by changing the threshold. The range is 1 - 1023. 1 being the highest, 1023 being the lowest.
const int threshold = 50; // threshold value to decide when the detected sound is a knock or not
-
Create more animations for Neopixels
-
Move to Attiny85 and a dedicated PCB to create smaller package
-
Test threshold value for sensitivity
-
Clean up temporary mounting