0

I have a project where I need to monitor the state of 5 DPDT electrical switches with Arduino Uno. Also, the Arduino board will be measuring the output from 3 thermocouples on 3 of the analogue pins as input and sending signals to open and close 3 relays for heaters on the 3 of the digital pins as output. The data with the state of the microswitches and the measurements from the thermocouples will be send over a serial connection to a PC.

I think I need a shield with at least 20 inputs for monitoring the 5 DPDT electrical switches (5 x 2 x 2). The common of the switches will be connected to a common rail. Can I use an I2C extension shield for this purpose? Is this going to create an issue with the serial connection? Any specific shield recommendations?

10
  • It is unclear what you are asking. Do you have 5 switches that you want to wire to an Arduino, or do you have some existing system which has 5 switches and you need to monitor the state of those switches?
    – Majenko
    Feb 7 at 15:47
  • 1
    Unless they are on-off-on switches you only need one input per switch - so 5 inputs.
    – Majenko
    Feb 7 at 16:14
  • 1
    Have you found a way to make the two Poles of a DPDT switch be in different states? Or have you found a way for the direction that a DPDT switch to be Thrown in to be more than two choices?
    – romkey
    Feb 7 at 16:29
  • 1
    Hi, I want to check the state on the 2 NC and 2 NO, I know that if DPDT switch is turned this changes the state for both circuits from one to another. However the reallity is that sometimes DPDT get a faulty circuit, the DPDT turns but only one of the circuits switches, because the other is faulty. Also there are cases of open circuit in switch connections, so if a i.e. NC is turned to NO, the NC circuits opens, but the NO is not closed and the other way around. I want to get the state of all contacts, so that I am sure the switches turned and that they do not have faulty circuits.
    – user72296
    Feb 7 at 16:55
  • 1
    Those kind of failures only really happen from contact arcing - something you will never see with an Arduino.
    – Majenko
    Feb 7 at 17:31
0

If you're really set on measuring the state of every single connection of every single switch (though I still don't see the need) then yes, you'll need 20 IO connections.

You could create those with IO expanders (MCP23017 for example), or you could use multiplexing.

Instead of 4x5 (20) IO pins you'd instead need 2+10 (12) IO pins.

Treat all the "Common" connections as the rows of a keypad and all the NC and NO connections as the columns of a keypad. Add a smattering of diodes to isolate everything, and you can then scan through the switches one at a time checking each of the two switch states.

You can read more about keypad matrices here.

2
  • Thank you, I will try with MCP23017.
    – user72296
    Feb 7 at 20:04
  • @Iliya They provide 16 IO, so you will need two of them. They can be chained together though.
    – Majenko
    Feb 7 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy