Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #61992

    Kunstflieger
    Participant

    Hello,
    what do I wrong?
    I connected the 74HC595N as shown in the diagramm. The original diagramm, I cannot understand.
    But in default all relais are on. When i start eg. Relais 1 (S01) than it goes OFF and after the selected time ON again.

    #62001

    Ray
    Keymaster

    Depending on what relay you use: if you use off-the-shelf relay module, sometimes they are ‘active low’, so the logic is reversed.

    #62005

    Kunstflieger
    Participant

    Thanks for this answer. This is correct. I use this off-the-shelf relay modul.
    Is it possible to change this in the source code on the OSPI?

    #62011

    Ray
    Keymaster

    Each relay has two contact pins, one is normally open (NO) one is normally closed (NC). Why not just use the other contact pin, which counteracts the reversed logic.

    #62125

    Kunstflieger
    Participant

    Thanks for your help, Ray.
    I just decided to use transistors 2n3904 as shown in this picture

    #62222

    Aquafluxo
    Participant

    I connected a 74HC595N to a raspberry pi and I had the same problem, by default all relais are on. To solve the problem
    I edit OpenSprinkler.cpp on the OpenSprinkler-firmware directory and in the function “OpenSprinkler::apply_all_station_bits()” at line 1079 add a “~” like this: “digitalWrite(pin_sr_data, (~sbits & ((byte)1<<(7-s))) ? HIGH : LOW );” and recompile the firmware.

    #62257

    Kunstflieger
    Participant

    Thanks for this great point! I just have a question. How should I compile it for raspberry pi?
    Would it also work if I copy all the content from https://github.com/OpenSprinkler/OpenSprinkler-Firmware to my own github account and change the OpenSprinkler.cpp there?

    #62283

    Aquafluxo
    Participant

    I think so, but I gitclone directly to my raspberry pi according to this instructions “https://openthings.freshdesk.com/support/solutions/articles/5000631599-installing-and-updating-the-unified-firmware&#8221;, modify the “OpenSprinkler.cpp” on the “OpenSprinkler-Firmware” directory on the raspberry pi and rebuild with “sudo ./build.sh ospi”

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