Connect HC-SR04 Ultrasonic to gopigo


#1

Hi,

I want to connect the HC-SR04 Ultrasonic sensor to gopigo, using a grove cable.
The grove cable has these colors: black red white yellow

What is the correspondence to the ultrasonic pins:
vcc (this should be red? )
trig ?
echo ?
ground (this should be black? )

I guess i need to cut this cable on one hand to connect to the proper pins
Please let me know. Do you have any documentation about this.

Thanks,
Marian


#2

Hi Marian,
We have had a customer ask us the same question a while back. Here is the link to the discussion: http://www.dexterindustries.com/topic/connecting-ultra-sonic-sensor-hc-sr04/.

Do let us know if you need any more help.

-Karan


#3

I am having a similar issue that the other forum post did not solve. I am using a Raspberry Pi 1 B. The only tutorials I found regarding connecting the HC-SR04 to the GoPiGo use an Arduino (http://www.instructables.com/id/Easy-ultrasonic-4-pin-sensor-monitoring-hc-sr04/), or connect directly to the Raspberry Pi GPIO pins (http://www.modmypi.com/blog/hc-sr04-ultrasonic-range-sensor-on-the-raspberry-pi
https://electrosome.com/hc-sr04-ultrasonic-sensor-raspberry-pi/)

How can I connect the HC-SR04 to the RPi 1 B even though all of the GPIO pins are used up by the GoPiBo board? I could not find any tutorials on how to convert the 4 pins to 3 pins directly into the GoPiGo a1 port, only to Arduino.


#4

Hi glasermrk,
The pins on the Grove A1 and D10 ports are shorted together so you can use a grove cable and connect the white and yellow wires to the Echo and Trig pins to connect the sensor the Grove port. We have tried this before and it works on some sensors and not on some other sensors. The Grove ultrasonic sensor works the best with the GoPiGo. To connect the ultrasonic sensor to the Raspberry Pi header you’ll have to solder headers to the extra GPIO footprint on the GoPiGo and then connect the sensor to it.

-karan