Connecting 10 HC-SR04 to one board

Hello!

I'm planning to build a watering replenishing system.Do You think is possible to connect 9 or 10 ultrasonic sensors to one board? (I was thinking about an Arduino 2560).I've read somewhere that there could be problems because of interference signal between the sensors but since I'm a total newbie I don't know.
Cables from the shield will be long about 2 meters (not more) or alternatively I can split 5+5 sensors on 2 distinct boards (always using 2 meters cables) or using a different approach I can use one hc-sr04 for each Arduino Micro (for a total of 10 Micros).
Any suggestion really appreciated!!! :slight_smile:

Cheers

Robert

Yes, it is possible to connect ten sensors to a board with 20 I/O pins.
Whether or not the audio signals interfere depends on how they are positioned relative to each other, and how they are triggered.

ok thanks! Could You please suggest me a suitable shield?

You don't need a shield if you've got the I/O pins

Thank You again :slight_smile: :wink:

After doing a little bit of research I've found out that the hc-sr04 sensors are not suitable for my purpose,apparently they're good to measure centimeters (even with the Newping library) while I need to measure millimeters.The US-100 sensors seems more performing and I see they've got a temp.sensor that gives compensated readings.
Now another problem arise:since the us-100 must be operated in serial mode (to benefit of temp.correction) on the tx-rx pins,I'll need 9+9 tx and rx!! Arduino Mega2560 has got only 4+4 so I need 3 boards :o
At this point I see as the only solution to get 9 Arduino Micro or a similar board!

Or you could use software serial.

RobertR:
since the us-100 must be operated in serial mode (to benefit of temp.correction)

What makes you believe that?
Because you can read the temperature?
Because the distance can be read in mm?

The US-100 features accurate temperature corrected range detection. It can output the distance in millimeters using a serial data output mode. Alternatively, the distance can be calculated by measuring the amount of time that a digital output is held high.

RobertR:
After doing a little bit of research I've found out that the hc-sr04 sensors are not suitable for my purpose,apparently they're good to measure centimeters (even with the Newping library) while I need to measure millimeters.The US-100 sensors seems more performing and I see they've got a temp.sensor that gives compensated readings.
Now another problem arise:since the us-100 must be operated in serial mode (to benefit of temp.correction) on the tx-rx pins,I'll need 9+9 tx and rx!! Arduino Mega2560 has got only 4+4 so I need 3 boards :o
At this point I see as the only solution to get 9 Arduino Micro or a similar board!

All you need to do is convert to millimeters. Of course, please read the datasheet as it will tell you the effective range of the sensor.

1 centimeter = 10 millimeters

AWOL:
Or you could use software serial.

I don't even know where to start! (total newbie here).I've just downloaded Ardublock and watched a couple of tutorials.

Whandall:
What makes you believe that?
Because you can read the temperature?
Because the distance can be read in mm?

I've read this:

https://www.bananarobotics.com/shop/US-100-Ultrasonic-Distance-Sensor-Module

"The US-100 features accurate temperature corrected range detection. It can output the distance in millimeters using a serial data output mode"

It looks like this sensor is ready for the job and already compensated.Am I wrong?

It is temperature compensated, I don't know the real resolution.

Why do you think it is only temperature compensated if read serially?

Here is a big comparison table of available sensors

http://www.robotshop.com/en/compare-infrared-ultrasonic-distance-sensors.html

Whandall:
It is temperature compensated, I don’t know the real resolution.

Why do you think it is only temperature compensated if read serially?

My apologies! I’ve read erroneously.It should be always compensated regardless the serial data or the puls width mode.The difference is the following (using serial data):

"To start measuring the distance, output a 0x55 over the serial port and read back the two byte distance in high byte, low byte format. The distance returned is measured in millimeters. Use the following formula to obtain the distance as millimeters:

Millimeters = FirstByteRead * 256 + SecondByteRead

This module can also output the temperature when using serial output mode. To read the temperature, output a 0x50 byte over the serial port and read back a single temperature byte. The actual temperature is obtained by using the following formula:

Celsius = ByteRead - 45

So at the end I can use 9 of them on a single Mega board using digital pins :slight_smile:

I think so. But you should test it anyway.
That you can read a value expressed in mm, does not mean you have a resolution of one mm.

You could also measure air temperature yourself and compensate standard SR-04s that way.