Problems with sensor input

Homepage Forums Generally Problems with sensor input

  • This topic has 2 replies, 2 voices, and was last updated 5 years ago by Anonymous.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #24208
    Anonymous
    Inactive

    Hello,
    For a few days now I've been trying to figure out how to use a button to activate a pump relay that's connected to one of the zones. I have an OpenSprinklerPi with a Rasperry Pi Zero W.
    After some experimentation with the sensor input, I had the most success when I connected the button as a normally closed contact between GND and SN1. But the problem is that the program associated with the button is not triggered after 1 second. It takes almost any amount of time before the OSPI recognizes that the program needs to be started. Actually, the key press should be registered if the key is pressed for >1 second.

    In previous attempts I had wired the button as a normally open contact and had the problem that the program started randomly even without pressing the switch.

    I know there is an option for the sensor input to configure if it is a normally open input. But this option did not change the behavior when the switch was used as a normally open contact.

    After my two experiments I'm wondering if the sensor input has any kind of pull-up or pull-down? It seems to me that the input is not always at a valid logic level but is floating and then requires a random time to switch the input. Should I set the sensor input to GND or +5V using a resistor?

    #24313
    Admin
    Keymaster

    Hello,

    never against +5V, always on GND! VIN (+5V) is only intended for powering sensors.

    If it does not trigger after 1s, then there are interference signals on the line, which is interpreted as “fluttering” and thus prevents the start.

    Firmware version?

     

    #24507
    Anonymous
    Inactive

    Hi,
    I have now solved the problem with the sensor input by installing a pull-up resistor between the sensor input and one of the 3.3V pins.
    Now the input no longer triggers randomly but only when the switch is actually pressed.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.