Menu

Post image 1
Post image 2
1 / 2
0

What the leak detector taught me about real-world noise

DEV Community·Harsh Raj·about 1 month ago
#sGANqSxw
Reading 0:00
15s threshold

Before I built the leak detector, I thought sensors just worked. You connect them, they give you data, you use that data. Simple. That is not how it goes. The problem The SW-420 vibration sensor is a small, cheap component. When something vibrates near it, the output goes HIGH. When it stops, it goes LOW. On paper this is exactly what you need to detect a leaking pipe — the leak creates a constant vibration, the sensor picks it up, you trigger an alarm. In reality, everything vibrates. A truck driving past the road outside. Someone walking nearby. Wind hitting the surface. Even just tapping the table the circuit is sitting on. During early testing, the alarm was going off constantly. Not because of leaks. Because of everything else. First attempt at fixing it — thresholds My first idea was to add a threshold. Only trigger if the vibration is strong enough. Set a minimum magnitude using the ADXL345 accelerometer and ignore anything below it. This helped a little.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More