Problems with the sensor input

Home > Forums > General > Problems with the sensor input

Viewing 3 posts - 1 to 3 (of 3 total)
  • Author
    Posts
  • #24208
    Anonym
    Inactive

    Hallo,
    I've been trying to figure out how to use a button to activate a pump relay connected to one of the zones for a few days. I have a OpenSprinklerPi with a Raspberry Pi Zero W.
    After some trial and error with the sensor input, I had the most success when I connected the button as an opener between GND and SN1. But the problem is that the program assigned to the button is not triggered after 1 second. It takes almost any amount of time before that OSPI recognizes that the program must be started. Actually, the keystroke should be registered if the key is pressed for >1 second.

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

    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 switch.

    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 takes a random time for the input to switch. Should I connect the sensor input to GND or +5V using a resistor?

    #24313
    adminadmin
    Administrator

    Hallo,

    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
    Anonym
    Inactive

    Hi,
    I have now solved the problem with the sensor input by attaching 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 to 3 (of 3 total)
  • You must be logged in to reply to this topic.