Connect Two Touch sensors on one pin

Hello,
I'm trying to make a project for my house. I use arduino mega microcontroller which control some relays from touch sensors. I want to connect 2 touch sensor on the same pin. I will try with diodes on the signal wire and it's works just for one relay. When I'm doing the same thing on other pin the microcontroller looks like it's confuse. For example it's switching on 2 relays at the same time instead one etc.
The sensors that I am using is: Gravity: Mini Touch Kit - DFRobot
What can i use to solve the problem except changing the code(like diodes or small circuit)?

The schematic shows a 470 ohm R in series with the output. That suggests it is current limited to protect it. I can't see the need to isolate the two sensors.

Treat it as simply two normal switches in parallel.

Weedpharma

I try it but the one switch from two ia not working in parallel connection. Some times both switch not working.

Are you using a pull up R?

Weedpharma

No. What i have to do?

Google "Two diode and gate"

Two diodes one way and a pull up resistor.

or

Two diodes the other way and a pull down resistor.

Which circuit will work depends on the touch sensors outputting HIGH or LOW when touched.
Use e.g 1N4148 diodes and a 10k resistor.
Leo..

Something like this?

Yes.
That circuit works if touching a sensor gives a HIGH on the sensor output.
Leo..

Thanks a lot.
I will try it and I inform you the results

Thanks a lot.
It works!