RevPI DIO - Inputs connection

Topics about the Hardware of Revolution Pi
Post Reply
plts
Posts: 1
Joined: 07 Oct 2017, 11:36
Answers: 0

RevPI DIO - Inputs connection

Post by plts »

Hi all,

I have doing some tests with RevPi Core 3 and RevPI DIO. Great products.
So far, I have been able to build my own C++ example and read the inpus and write the outputs. For reading, I use the piControl object to read 2 bytes at offset 81.

I have a 24V power supply that powers up the Core (X4) and the DIO (X4 and X2), so GNDs are the same. All LEDs are green.

But I have a doubt about how to connect signals to the inputs.
- I connect OUT1 to IN1 with a wire. When I write "1" to OUT1, I instantly read the change in IN1. But if I disconnect the cable, the IN1 does not turn back to "0", why is that?
- If I connect IN1 to the 24V pin, or to the GND pin, the input does not change its value. Why is that?

My initial thought was that if I used a Power supply with common GND with the DIO X2, and I connected the V+ to any input, that input was going to change to "1". But it seems it does not work like that
More generally, how signals are connected to the inputs for the Core to be able to read its values?

Thank you very much!
User avatar
volker
Posts: 1046
Joined: 09 Nov 2016, 15:41
Answers: 1

Re: RevPI DIO - Inputs connection

Post by volker »

Hi plts,
Your ideas are nearly correct:
The inputs are sensitive to +24 V positive voltage related to the X2 minus pin. The switching point from 0 to 1 lies according to the EN61131-2 about +9 V. So if you connect a 24 V power supply with its + and . wires to X4 and X2 you will get a 1 when connecting the 24 V to IN1. I have no idea why this should not work with your device. Please try using a different input (bets choice I9 to I14).
If you leave an input open, its signal is undefined and thus the digital value is more or less random. Especially when you had connected a 24 V signal before, the input capacitance could still be charged and thus you would get a persisting 1 even if the input wire is disconnected. This is the case with your experiment:
You connected Out1 and switched it from 1 to 0. In this moment you will not get a GND-signal to IN1 but with the default output settings (high-side switch) the output simply switches from 24 V to nothing. If you repeat your test with the output setting switched to "push pull" mode you will get the 0 on IN1 as this output mode switches the output between 24 V and GND instead of 24V and nothing. You could think of two ordinary switches: one is switching the output to 24V whereas the other is switching the output to GND level. One of the switches is always switched on and the other switched off. In high-side switch mode you can think of just the one switch connected between 24 V and the output pin. Please inform yourself on Wikipedia etc. to learn more about the usage of these output modes.
The output mode can be set by PiCtory (default is high-side switch).
I hope these explanations will help you to understand the DIO outputs a little bit more. Please let me know if your input still does refuse to give a 1 when connecting it to 24 V. We need to find out what is going wrong there...
Unser RevPi Motto: Don't just claim it - make it!
Post Reply