2.8a8a_G
2.8a8a_G

Reputation: 657

HC SR04 + Arduino Uno lose connection issue

enter image description hereI 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

Answers (2)

The Law
The Law

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:

  1. Use a breadboard, and see the responses (does it work fine? Yes then the problem is your soldering, No or only when I push it really hard down: the sensor is defective)
  2. 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)

    • Make sure you solder it properly to the protoboard (perfboard, string board) and that the solder fully goes through the pins and wholes! You want to have at the end a triangle kinda like coming out of each hole following the pin
  3. 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

Gennady  Leonov
Gennady Leonov

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

Related Questions