Hey all, I was attempting to create a automatic PC locker when I leave my desk. I picked up a HC-SR04 and started coding away. Unfortunately it doesn't seem very accurate. It will simply not sense me at all for seconds at a time, and then sense me perfectly fine for seconds at a time. I'm sure I'm slightly moving, but I can't imagine I'm moving enough to completely lose the signal. Is this common with ultrasonic sensors, or did I get a bad one? I'm just using the example code from the NewPing library (Google Code Archive - Long-term storage for Google Code Project Hosting.).
-
Make sure your connections are tight.
-
Ultrasound doesn't reflect too well off of fabric, and the cheap HC-SR04 sensor may not be sensitive enough to 'hear' the echo signal; you could try the US-015 or US-020 sensors, which have a longer range and are not much more expensive, such as this one.