Hi all,
So I have a ping sensor (HC-SR04) which I'm using as a rangefinder for my robotics project. Everything is working but I seem to be getting odd readings every couple of pings which I think is due to noise on the circuit. I've tried adding a 100nF ceramic capacitor across the 5v / ground as shown but that seemed to stop the ping from going beyond 12cm. Any ideas ? (I've tested the code and sensor when it's the only thing plugged into the arduino with no issues)
If it makes a difference the arduino is sharing a 9.6v power source with a Raspberry Pi, maybe I need to put an electrolytic capacitor somewhere in that circuit?
The 5v for the ping sensor is coming from the Arduino +5v rail.
Currently on the Arduino I have this sensor and a serial connection to the Raspberry Pi. This serial connection is being used at every ping to report the distance measured.
So I have a ping sensor (HC-SR04) which I'm using as a rangefinder for my robotics project. Everything is working but I seem to be getting odd readings every couple of pings which I think is due to noise on the circuit. I've tried adding a 100nF ceramic capacitor across the 5v / ground as shown but that seemed to stop the ping from going beyond 12cm. Any ideas ? (I've tested the code and sensor when it's the only thing plugged into the arduino with no issues)
If it makes a difference the arduino is sharing a 9.6v power source with a Raspberry Pi, maybe I need to put an electrolytic capacitor somewhere in that circuit?
The 5v for the ping sensor is coming from the Arduino +5v rail.
Currently on the Arduino I have this sensor and a serial connection to the Raspberry Pi. This serial connection is being used at every ping to report the distance measured.