Arduino UNO- connecitng more than one sensor

I have been using an arduino UNO to test some sound sensors in seeing if they work and so on. BUT my problem is that I am not too sure if it is possible to connect more than one sound sensor to the same board.

I have looked mainly into the problem on power and have been using - bit.ly/XA4DUU to get some sense but haven't understood much... I have tried to see if there have been other projects similar to what i want to create a sound ranging device - http://bit.ly/1vh0lwu - bit.ly/1od9j8o -. so to make it i have to for at least use two sound sensors...

I partly understand the problem of the voltage but want to ask how i could connect more than one to an arduino.

so, give them their own power (ie not supply power from Arduino 5V pin),and then the trigger and echo lines are on the Arduino.

how would the echo lines and the trigger work in this situation?

TheDubUino:
how would the echo lines and the trigger work in this situation?

I would think, same as before, each on a pair of Arduino i/o pins… you would hook the -ve of the external source to the sensors and to the Arduino ground so that the echo and trigger have a reference.

edit… pic attached. Ignore the fact that the symbols are for 2-pin dip switches, first one with 4 pins that I found in Eagle. Made a symbol for an HC-SR04.

more edit… and of course in the sketch you just assign more pins, like trig1 trig2 echo1 echo2 etc and do your writes, pulsein etc on those pins just like before and have distance1 distance2 and so on.

sensors.png

I see what you mean now, but is there any type of external source voltage i need?

edit: is there any website/book in which a similar edit is in? I'm still quite new to the arduino language so it can be a tiny bit more difficult to write my own...

TheDubUino: I see what you mean now, but is there any type of external source voltage i need?

You would need to check the specs for that sensor to see if it has a bit of tolerance on the 5V... 4x 1.5V penlights might be ok at 6V, or 4x 1.2V rechargeables might be ok at 4.8. Or use a regulator if it's crucial. You'll need to read the dataheet.

edit.... this datasheet says 4.5 to 5.5V in table 4 so you'll be good with 4x 1.2V rechargeables @ 4.8.

TheDubUino: is there any website/book in which a similar edit is in? I'm still quite new to the arduino language so it can be a tiny bit more difficult to write my own...

I'm sure if you look at the code you'll see what to do...

For example if you have this:

#define trigPin 13
#define echoPin 12

.... you might want to go like this:

#define trigPin1 13
#define echoPin1 12
#define trigPin2 4   //just some random pin numbers
#define echoPin2 5
#define trigPin3 6
#define echoPin4 7

Give it a go and we'll help.

will do! thanks a lot!