Reputation: 657
I am using the following devices/components to for distance measurement using ultrasound sensor.
1. Arduino Uno board
2. HC-SR04 ultrasound sensor
3. Breadboard
4. Arduino jumper cables.
5. Sketch : Provided at http://www.instructables.com/id/Simple-Arduino-and-HC-SR04-Example/step3/Upload-the-sketch/
My setup is pretty much what is mentioned in the above link. Everything works fine but it seems like the sensor doesn't fit securely in the breadboard. If I push the sensor forward it works fine. If I push it backward it keeps giving me only one reading (5 cm in this case). When you push the sensor you can feel it hinges back and forth.
I soldered another sensor on a protoboard but it has the same issue. When I apply pressure from top it works fine, otherwise it keeps giving me just one reading. Has anyone faced similar issue ? How to resolve it ?
Upvotes: 0
Views: 258
Reputation: 83
Yeah I did with a sound sensor soldered, even though this might seem as a too simplistic answer, in most cases it's the sensor which is defective.
Although you can try to eliminate a few problems before arriving to that conclusion:
Soldering, if yes it is the problem are you using rosin core solder? Led solder? If yes you are using rosin, sometimes happens to me that rosin is not the best solution because the resin seems to impair some of the connection on the circuit (I KNOW IT'S WEIRD)
If soldering is not the problem then make sure there is no loose connection on the circuit of the sensor, sometimes those sensors take a beating when shipped, it's not your fault but if the pins are loose then the connection pin-to-hole is no good, so either send it back or re-solder it
Let me know!
Upvotes: 1
Reputation: 1
A lot of dirt during soldering, wash it with alcohol then try again. Also you may try to use prototyping board.
Upvotes: 0