Relay PR60-3_R45PL - Sometimes, reading the input returns "False" instead of 0-255

I’ve made a Python script using the Python library for it that reads the input #1 twice per second to detect a button press (The button has one wire connected to the ground, the other to the input #1, the jumper is set to UP).

When I run that script, I see the value “255” until I press the button, then I see “0”. This seemed to be what is expected and it works reliably.

I sent that script to someone else who has the same relay board, he has a different experience though, he sees the value “255”, but when he presses the button, the library returns “False”, so I dug in that library and I found this:

When he sees “255”, the library has this data:

read_data:  b'\xaa\x01\xff\xaa'
handshake:  True
bytes_back:  True
checksum:  True
[255]

When he sees “False”, the library has this data:

read_data:  b'\xff\xff\xff\xaa'
handshake:  False
bytes_back:  False
checksum:  False
False

We also noticed that we have more chance of success if we use the ground on the right instead of the ground on the left for the button.

Voltage reads: 4.90v

The same code works correctly on 2 relay boards and it doesn’t work on 2 other different boards…

Anyone has an idea?

Thanks.

Is there any way you could provide top down photos of the relay boards that are having the issue?

Yes.

This is the board that is not working properly.

The wirings on the input in the picture are how they ended up after trying different things to try to fix it.

Here’s a picture of a working board with the intended wiring setup:

Try testing the inputs using the NCD Base Station software here:

I’m just curious if it is able to accurately monitor the inputs.

Hi, thanks for the help.

I’ve tested again on both:

So on the working board:

On the non working one:

(In this case, all the ports except 1 are closed for a test we did, doc said they should be closed…)

The weird thing is that it says PASS on the jumper DOWN, but it’s set to UP on the board.

It doesn’t show PASS on the input port either.

Hi,

This test screen is the diagnostics our testing department uses to test boards prior to shipment. First they install the jumper in the Down position, then move the jumper to the UP position, this will pass the up/down jumper test, then each input is individually pulled low to ground to pass each input. From what I can tell everything with that board is fine.

Do you mean that if I execute your instructions, it’s gonna reset the board to a working state?

No, I just mean that what is being displayed in the video above appears to be correct. You said input is in the UP position, all inputs except input 1 are being closed. From what I can tell that is exactly what the software is showing.

Put the jumper in the UP position. Leave all inputs open, then pull each input down to GND 1 at a time, and then release them. you should see the inputs go from 255 to 0 when you do this.

I’m just wondering why it says “FAIL” instead of “PASS” like in the first video.

We replaced the board with another one and my code is working now.

It must be some kind of short-circuit

If multiple inputs are low at the same time the test will fail. Only 1 input should be pulled low at a time. This is our testing procedure.