3

How could I estimate the max number of switches that I could connect to an Arduino Uno?

I am questioning if Arduino has enough power to simultaneously operate an X number of switches with no issues.

I am using an external power adapter of 12 volt/2 amps (barrel).

Here is the hardware: https://m.hellasdigital.gr/el/products/tank-pool-water-level-liquid-sensor-float-switch

6
  • 2
    Count the number of digital-capable IO pins :) It's unclear what problem you're thinking you'll run in to. Are the switches, for example, really far away? Jun 7 at 19:59
  • 2
    You can use up to (N/2)² switches where N is the number of IO pins you have.
    – Majenko
    Jun 7 at 20:01
  • 1
    Yes I am trying to find out why under some conditions the sensor does not trigger the Arduino. It is one in the hundreds but it happens often if you think that the sensor is triggered twice every five minutes continuously. The distance is under five metres. I will soon move the power cables away from the signal cables. Right now they are a bit close. Jun 7 at 20:03
  • 3
    How are they connected? You might want to check out arduino.stackexchange.com/q/13072/8583 and similar; 5m isn't far-far, but it's far enough. Jun 7 at 20:09
  • 2
    I liked the idea of using opto coupler isolation. First of all I have to put the cables in an order. For instance a separate twisted pair per switch and put them far away from the high voltage cables. Jun 7 at 20:38
1

thank you a lot about your input it was very useful. My source of issues was a faulty sensor. After I changed it things are smooth now. I separated the power cables from the signal as well that is super important.

Thank you a lot about the valuable input!

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.