OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Can I invert the output of OSPi in software ? Driving active low logic

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #37107

    Dale March
    Participant

    Hello all,

    I am using the normal shift register logic to drive a relay board, but the relays are all on when the interface shows all circuits off.

    I could add inversion logic, but it seems that it should be an easier fix in software. I am not quite familiar enough with Python (yet) to know where to look?

    I can post my relay interface if anyone is interested.

    #37112

    Ray
    Keymaster

    Some relay boards are ‘active high’ and some are ‘active low’. The default logic of OSPi is ‘active high’, so you will need to use relays boards that are ‘active high’.

    To reverse the logic in software, go to the ‘apply_all_station_bits’ function, and simply reserve the bits that are being pushed to the shift register.

    #37116

    Dale March
    Participant

    I forgot to include that I am using the OSPi software from Dan-in-Ca version 2.2.35. I cannot find the suggested apply_all_station_bits function so I suspect that is the interval version, or I just don’t know where to look.

    Dale

    #37118

    Dale March
    Participant

    OK, Thanks for the hints. I found it in gpio_pins.py in the setShiftRegister(srvals) definition.

    Seems to be working like a charm!

    Dale

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

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Can I invert the output of OSPi in software ? Driving active low logic