Activity Forums Questions & Troubleshooting Mini Digital I/O not measuring up.

  • Mini Digital I/O not measuring up.

  • Jarod997

    Member
    March 2, 2021 at 6:34 pm

    I’m using a 24 VDC supply with the following setup and loop to test why another (more complex) program isn’t working.

    Setup:

    pinMode(CONTROLLINO_D0, INPUT);
    pinMode(CONTROLLINO_D1, OUTPUT);
    pinMode(CONTROLLINO_D2, OUTPUT);

    Loop:

    digitalWrite(CONTROLLINO_D1, HIGH);
    digitalWrite(CONTROLLINO_D2, LOW);
    digitalRead(CONTROLLINO_D0);

    With nothing attached, I read about 10.5V on D0, 24V on D1, and 10.5V on D2. As I understand a LOW should read 7.2V max with a 24V supply. The input I could see floating.

    If I jumper D1 to D0, they both read 24V (but the D0 indicator LED on the unit doesn’t light up). If I jumper D2 to D0, they both read 20V. Same if I replace the jumper with a 33k Resistor.

    There’s something simple I’m missing, right?

  • Jarod997

    Member
    March 2, 2021 at 7:34 pm

    Sorry, 10.9V not 10.5V (both cases).

  • mr-controllino

    Administrator
    March 3, 2021 at 9:47 am

    Hello Jarod997,

    1) The digital outputs on the screw terminals are OUTPUTS. No INPUTS. Behind there is a digital high-side switch. Only on the pinheader pins you can use the IO as input or output … and only on 5V.

    2) A high-side switch is an electronic switch. You are measuring something that is “not” there. Since an electronic switch NEVER cuts off 100% … you always have some nA or uA flowing. So, if we can agree that you would never use an output without a load … even a 100k resistor will perfectly pull the output to ground. You only can read a voltage because you a measuring with a Multimeter with some Giga-Ohm input resistance.

    regards
    Marco

Viewing 1 - 3 of 3 replies

Log in to reply.

Original Post
0 of 0 posts June 2018
Now