Connecting multiple sensors to ONE pin

Hi, i'm new here, new to arduino as well, got a question about IR sensors..

Is it possible to attach multiple IR sensors to just ONE pin? i would actually like all the sensors to work the same way.. and as there aren't enough pins on the Uno, i was wondering whether it's possible to attach an array of IR sensors, so that if any one of them (or all or multiples of them) is triggered, it would be detected?

Cheers

peich: Hi, i'm new here, new to arduino as well, got a question about IR sensors..

Is it possible to attach multiple IR sensors to just ONE pin? [u]i would actually like all the sensors to work the same way.[/u]. and as there aren't enough pins on the Uno, i was wondering whether it's possible to attach an array of IR sensors, so that if any one of them (or all or multiples of them) is triggered, it would be detected?

Cheers

Sure -- use sensors that make use of the I2C bus -- That is two wires. Some sensors like the Dallas Temperature sensors can use only one wire for data and two for power.

Some of the Sharp sensors can use the I2C bus.

But that has nothing to do with whether they "all work the same way".

Does that answer the question?

could i connect them directly to the board?

Have you done the tutorials on - http://www.arduino.cc/en/Tutorial/HomePage - There is a lot to learn there

Which sensors are we talking about? Most IR logic sensors like the TSOP1838 have open-drain outputs so they can all be connected together and directly to a digital input on the Arduino.

Now, of course, if two sensors are both being hit by infrared light at the same time you will probably get garbage, but as long as only one sensor is receiving IR light at a time there's a good chance it'll work.

-- The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

Connected to peich question, I have a question. I have 3 x HC-SR 04 Ultrasonic sensors connected to three water tanks. Should the water level go below a certain level, I want a common pump and two solenoid (NC) valves (one with the tank and one with the pump) to operate and fill that tank. Questions I have are:

1) can I connect all the five sensors trig and echo to 2 common pins of arduino in an I2C bus.

2) at any given time, I want only one tank to fill. meaning pump and solenoid downstream of pump and one solenoid connected with the tank to operate. other two solenoids with the other two tanks will remain closed.

3) can I connect this to one single relay?