PNP sensor using RevPi DIO module

Topics about the Hardware of Revolution Pi
Post Reply
ustc
Posts: 9
Joined: 15 Aug 2017, 16:22
Answers: 0

PNP sensor using RevPi DIO module

Post by ustc »

I have purchased a RevPi DIO module, a 24V Mean Well power supply, and a PNP ultrasonic proximity sensor and I'm having difficulty getting I_1 to change from 0 to 1.

I used this tutorial as a guide. (One big difference between the tutorial and my setup is the lack of a Common port on the RevPi DIO)

I connected the brown wire (positive) of the ultrasonic sensor to the positive terminal of the power supply, the blue wire (negative) to the negative terminal of the power supply, and the black wire (digital output) into port I_1 of the RevPi DIO. I move my hand in front of the ultrasonic sensor and confirm the lights on the sensor turning on and off indicating that it's working, but when I use piTest to read port I_1 it's always 0. I used a volt meter to confirm that the black wire (digital output) is 24V when the sensor is on and 0V when the sensor is off.

Image

Can you provide any troubleshooting steps to help me figure out the problem? I'm confused why the RevPi DIO module doesn't have a Common port. Is there a way to bypass the ultrasonic sensor and trigger a change from 0 to 1 on I_1 using only the power supply?

Thanks in advance.
User avatar
volker
Posts: 1046
Joined: 09 Nov 2016, 15:41
Answers: 1

Re: PNP sensor using RevPi DIO module

Post by volker »

Hi ustc,
we're sorry for your trouble. In your picture I can't really see how you powered up your RevPi and DIO module. For me it seems that the problem is caused by a misunderstanding of "common" for the signals.
As our inputs are +24 V sensitive you took the right choice by using a PNP sensor. But the negative reference ("common") for the signal is GND (0 V) of the inputs. At the top of the module there is a power connector ("X2") which is the connection for in- and output assistant power supply. There is a 0 and a 24 V terminal for input (I) and the same for output (O). 0 V of those terminals are reference for in- and output respectively.
So if you are using a separate power supply for assistant input and the sensor (which is normally not the case) you need to connect the GNDs (0 V terminals) of both power supplies. Typically you would connect the sensor powersupply to the DIO assistant input power supply terminals in order to have a common potential for sensors and DIO inputs.
Hop this makes sense and you will be able to the sensor running:-)
You may also read the tutorial about DIO power supply. You will find:
"DIO, DI and DO modules have an additional plug (X2) for power supply. As these modules have galvanically separate inputs and outputs, they can be operated via an independent 12-14 V power supply. In doing so, the same power supply (to be more exact, the same ground potential) should, if possible, be used as the one supplying the connected sensors or actuators. This can naturally also be the power supply connected to an X4."
Good luck,
Volker.
Unser RevPi Motto: Don't just claim it - make it!
ustc
Posts: 9
Joined: 15 Aug 2017, 16:22
Answers: 0

Re: PNP sensor using RevPi DIO module

Post by ustc »

Yes, we are using two power supplies. Our problem was we weren't connecting the power supply of the sensor to the X2 of the DIO module. When we did so, we began receiving value changes from the sensor.

Thank you for your help.
Post Reply