OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) OpenSprinkler Pi with Adafruit LCD

  • This topic has 15 replies, 6 voices, and was last updated 4 years ago by Ray.
Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #22580

    dblessing
    Member

    I added an Adafruit RGB LCD plate to my OpenSprinkler Pi set up. Adafruit ships a library with the LCD to give you all the functions you need. Since it has the keypad on the display I plan to implement the ability to manually control the sprinklers from the LCD. This will be especially helpful for when technicians come out to fix sprinklers. I would also like to place LCD function calls in the existing OpenSprinkler code so when a station runs it will show on the display.

    I’ll keep posting updates and I will share any code I develop so others can do this.

    http://www.adafruit.com/products/1110#Learn

    #25214

    mattguy
    Member

    Does this still fit with the existing clear case cover on?

    #25215

    Ray
    Keymaster

    Cool, looks nice and thanks for sharing.

    I suspect it can’t fit all together to the current enclosure, since the enclosure (Serpac 032C) isn’t very high. However, if you have some way of making cutouts yourself, you can get Serpac 033 or 133 enclosure, which has extended height and I believe can fit with the base of 032C enclosure:
    http://www.serpac.com/sx3x.aspx
    Digikey and Mouser both have these enclosures at very reasonable price.

    #25216

    craigmw
    Participant

    This looks interesting. Are you directly modifying the code in the interval program, or using the add-on approach that has been included in recent updates? I can see this being very useful for the exactly the purpose you state.

    #25217

    dblessing
    Member

    @ray wrote:

    Cool, looks nice and thanks for sharing.

    I suspect it can’t fit all together to the current enclosure, since the enclosure (Serpac 032C) isn’t very high. However, if you have some way of making cutouts yourself, you can get Serpac 033 or 133 enclosure, which has extended height and I believe can fit with the base of 032C enclosure:
    http://www.serpac.com/sx3x.aspx
    Digikey and Mouser both have these enclosures at very reasonable price.

    Thanks for the tip on the enclosure. I hadn’t figure out what I was going to do yet.

    @craigmw wrote:

    This looks interesting. Are you directly modifying the code in the interval program, or using the add-on approach that has been included in recent updates? I can see this being very useful for the exactly the purpose you state.

    The actual menu control code I am building separately so it can be used regardless of what program you run for the sprinklers. I haven’t quite decided if I will put additional code in the interval add-on or if I will just query the interval program for sprinkler status and have that be configurable in the menu program. It would be really nice if you could check the status of a shift register to get the status of a sprinkler station but from what I see you cannot.

    #25218

    craigmw
    Participant

    So, the GPIO pin usage by the LCD display doesn’t interfere with the GPIO pins needed for the OSPi?

    #25219

    Ray
    Keymaster

    I am pretty sure the Adafruit LCD uses I2C interface (the SDA, SCL lines). You can share multiple devices on the same I2C bus, because each device has its own unique ID.

    #25220

    dblessing
    Member

    Yep, ray’s exactly right. The only thing I had to do was buy an extra tall stacking header so there was enough pin to plug the OpenSprinkler cables in once the LCD was soldered on. The stacking header can be found at http://www.adafruit.com/products/1112

    #25221

    craigmw
    Participant

    Good to know, as it would be nice to use the same RPi for doing other things. I’ve already got a mini-stable of them. Two for OSPi and one for my music server. Many more on the way for various other tasks, so it would be nice for me (and my router) to consolidate some of these tasks onto existing RPis. I’d like to be able to use One-Wire devices for some of these tasks. Would that be doable with the OSPi connected as such?

    #25222

    dblessing
    Member

    At a quick glance, I don’t see why One-Wire stuff wouldn’t work. It would be nice to know what I2C address those sensors use. Currently, with the OS board and the LCD my I2C address table looks like this:


    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --

    The above is found my running `i2cdetect -y 1` for the Rev2 Pi. Those addresses translate to 0x20, 0x48 and 0x68. The 0x20 is the LCD and the 0x48 and 0x68 are the OSPi. Don’t quote me.

    #25223

    craigmw
    Participant

    @dblessing wrote:

    At a quick glance, I don’t see why One-Wire stuff wouldn’t work. It would be nice to know what I2C address those sensors use. Currently, with the OS board and the LCD my I2C address table looks like this:


    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --

    The above is found my running `i2cdetect -y 1` for the Rev2 Pi. Those addresses translate to 0x20, 0x48 and 0x68. The 0x20 is the LCD and the 0x48 and 0x68 are the OSPi. Don’t quote me.

    Looks like Maxim/DS provides a 1-Wire/I2C bridge chip called the DS2482 that could handle the interfacing between I2C and the 1-Wire bus.

    http://www.farnell.com/datasheets/1675710.pdf

    According to the data sheet: “The I2C slave address assignment is controlled by two binary address inputs, resolving potential conflicts with other I2C slave devices in the system.” Given the large number of 1-Wire devices (thermocouples, thermistors, switches, ADC, pressure transducers, etc), this could be a viable way to interface with the “outside world” using the RPi mounted onto an OSPi. The downside is that 1-Wire stuff is relatively slow, but fine for most applications that would be hosted by an RPi.

    #25224

    badhairday
    Participant

    You may want to check out One Wire Weather, http://oww.sourceforge.net/. It is a Linux based weather station that can run on the Pi. I plan to move my installation from a 13 year old Dell desktop to the Pi when I have some time.

    As far as the OpenSprinkler Pi doing more than controlling irrigation, I think it can do a lot more then checking the clock for something to do. I have one running in production and another as a test bed. The test bed is running Dan’s program and acts as an Xbee to Ethernet gateway so my Vera Lite can talk to my XBee/Teensy LED light controller. Seems to work fine so far.

    -Chris

    #47628

    wifi75
    Participant

    Hello, which lcd is posible insert on my raspberry pi3 ?

    this is ok?
    LCD

    #47646

    wifi75
    Participant

    hello I connect my i2d lcd but I see only this…

    [IMG]https://uploads.tapatalk-cdn.com/20170910/bd60b0c3d4273fb9e63b5f320f2d42cf.jpg[/IMG]

    Inviato dal mio MI 5s Plus utilizzando Tapatalk

    #47647

    wifi75
    Participant

    one step after installing script.. [IMG]https://uploads.tapatalk-cdn.com/20170910/f194171dc5ab36d8c84d49c3f1fe811d.jpg[/IMG]

    Inviato dal mio MI 5s Plus utilizzando Tapatalk

    #47767

    Ray
    Keymaster

    It may be tricky to get one-wire devices to work with OSPi (I’ve seen reports of this previously) — the main issue is that the hardware one-wire pin happens to be a GPIO pin that OSPi uses to send signals to the shift register. I am not sure if there is a way to swap the one-wire pin to a different pin. It’s certainly possible to swap the shift register pin to use a different one, but that requires minor hardware and software changes.

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

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) OpenSprinkler Pi with Adafruit LCD