I have a very simple circuit using the Adafruit breakout Pi cobbler kit with a HC-SR04 ultrasound module. The circuit works fine (I can trigger and read the echo back) but it doesn't seem to be correctly grounded. It only works when I put my hand near the Pi breakout ribbon cable (and my code waits for a rising edge until I complete the circuit :)

The Pi itself has only micro-usb power connected to the mains and an ethernet connection. For info, the GPIO connections are:

  • Pin 2 (5v) -> Vcc pin of module
  • Pin 6 (ground) -> Ground pin of module
  • Pin 7 -> echo
  • Pin 11 -> trigger

What should I be doing to ground this correctly?

1 Answer 1


I is sufficient to connect the GND (ground) pins on the GPIO connector to all the ground pins in your circuit. It is definitely not necessary to connect any external ground or "earth" outside your circuit.

What you observe is typical for an open (read: not connected) CMOS input somewhere in your setup. Maybe the ultrasound module has any pin unconnected that need to be tied to some level?

  • 1
    Yea- In otherwords you possibly need a pullup or a pulldown resistor. It seems like your input is floating.
    – Piotr Kula
    Apr 8, 2013 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.