Piface binairy input issues

I am having some annoying issues with the Piface inputs. I have put a pushbutton between the inputs and 0V and used a pullup resistor to pull the input into the 5V direction when the switch is not pushed (however the Piface should have an internal pullup resistor which should be on by default).

When playing around with the settle_time setting, I see the following behavior:

  • When using a low settle time (< 100ms), HASS is reacting very slow and sometimes gets “ghost” inputs
  • When using a higher settle time (> 100ms), when pushing the button too short, the binary input remains high

I have not been able to get a situation where the switches are responsive and stable at the same time.

Any ideas about these issues?

Did you enabled SPI?

ls /dev/*spi*

Yes I did and the Piface is working basically, however I am having issues with its stability.

In the end, I have added magnetic switches inbetween the switches and Piface inputs. They either connect the input to 0V and 5V. This has stabilized the behavior.

I don’t understand what you have done with “They either connect the input to 0V and 5V”.
May you explain well?
I have the same problem.

You will need a “1 PDT” type relay:
image

Connect the coil to a power supply with your pushbutton in series, e.g.:

(A1+) – (Push button) – (Power supply +)
(A2-) – (Power supply -)

So the coil will be activated when the button is pushed.

Connect the relay common (11) to the Piface input. Connect the normally closed connection (12) to +5V; connect the normally open connection (14) to 0V.

Result: Normally, the input is connected to +5V; when the button is pushed, the input is connected to 0V.