# How to connect several ultrasonic sensors as a single set

**URL:** <https://community.sparkfun.com/t/how-to-connect-several-ultrasonic-sensors-as-a-single-set/33985>\
**Category:** Projects\
**Created:** [February 18, 2017, 4:30pm UTC](https://community.sparkfun.com/t/how-to-connect-several-ultrasonic-sensors-as-a-single-set/33985 "2017-02-18T16:30:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ertank](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@ertank](https://community.sparkfun.com/u/ertank)\
**Post date:** [February 18, 2017, 4:30pm UTC](https://community.sparkfun.com/t/how-to-connect-several-ultrasonic-sensors-as-a-single-set/33985/1 "2017-02-18T16:30:27Z")

</div>

Hello,

I am very new to Raspberry Pi and world of sensors.

I have a project in medical sector where I need to count anything dropped in a container. That thing may be a piece of paper, a textile, wood, cotton, hand of a person (which goes in and out) just anything which fits in size. I have a goal of counting without any error and missing nothing dropped in.

After some research, I think, I need to use some proximity sensor. Without knowing much, I want to use HC-SR04 Ultrasonic sensors. However, I am open to any suggestions.

Container is kind of wide like 40cm and length is about 75 to 100cm. Even above sensor is capable of measuring about 4mt in distance, I still cannot control container opening using a single sensor because sensor is not measuring by angle. So, I am planning to use about 10 of above sensors (or any other suggested sensors) closely mounted next to each other. Even I think of something like that, I believe, it will not be logical (or will be a complete pain) to connect them all into a different GPIO on Raspberry Pi. I do not want to think about coding an application for such a hardware setup either.

My question is: Is there a way to connect all 10 of the sensors to each other and just single connection to Raspberry Pi? All sensors will be working as if they are a single sensor, closest range measured among the set of sensors will be sent to raspberry pi as a measurement.

If such a configuration is possible, I appreciate some “things to buy” and “how to assemble” explanations. Would love some web links as a tutorial with pictures. I couldn’t find any such explanations, web pages. Maybe because I am a total newbie and not using correct technical words to do googling.

Thanks & regards,

-Ertan

---

<div class="post-metadata">

**Author:** ![aaronik19](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@aaronik19](https://community.sparkfun.com/u/aaronik19)\
**Post date:** [September 30, 2017, 12:01pm UTC](https://community.sparkfun.com/t/how-to-connect-several-ultrasonic-sensors-as-a-single-set/33985/2 "2017-09-30T12:01:49Z")

</div>

Dear All,

I have a question about the Ultrasonic Sensor - HC-SR04. I have a stainless steel pipe in which eating product pass through it in production line. Can I use Ultrasonic Sensor - HC-SR04 to sense if the product is present in the pipe without drilling this pipe?

---

<div class="post-metadata">

**Author:** ![jremington](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/jremington/32/6595_2.png) [@jremington](https://community.sparkfun.com/u/jremington)\
**Post date:** [September 30, 2017, 4:07pm UTC](https://community.sparkfun.com/t/how-to-connect-several-ultrasonic-sensors-as-a-single-set/33985/3 "2017-09-30T16:07:38Z")

</div>

Do not hijack threads.
