OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › OpenSprinkler Pi with Adafruit LCD
- This topic has 15 replies, 6 voices, and was last updated 7 years, 4 months ago by Ray.
-
AuthorPosts
-
August 3, 2013 at 2:33 pm #22580
dblessingMemberI 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.
August 4, 2013 at 2:28 pm #25214
mattguyMemberDoes this still fit with the existing clear case cover on?
August 5, 2013 at 2:54 pm #25215
RayKeymasterCool, 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.August 5, 2013 at 7:16 pm #25216
craigmwParticipantThis 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.
August 9, 2013 at 6:57 pm #25217
dblessingMember@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.
August 10, 2013 at 3:43 pm #25218
craigmwParticipantSo, the GPIO pin usage by the LCD display doesn’t interfere with the GPIO pins needed for the OSPi?
August 12, 2013 at 5:13 am #25219
RayKeymasterI 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.
August 14, 2013 at 1:04 am #25220
dblessingMemberYep, 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
August 14, 2013 at 1:21 am #25221
craigmwParticipantGood 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?
August 14, 2013 at 1:41 am #25222
dblessingMemberAt 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.
August 14, 2013 at 4:32 am #25223
craigmwParticipant@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.
August 16, 2013 at 8:46 pm #25224
badhairdayParticipantYou 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
September 8, 2017 at 8:19 am #47628September 10, 2017 at 8:18 am #47646
wifi75Participanthello 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
September 10, 2017 at 9:13 am #47647
wifi75Participantone step after installing script.. [IMG]https://uploads.tapatalk-cdn.com/20170910/f194171dc5ab36d8c84d49c3f1fe811d.jpg[/IMG]
Inviato dal mio MI 5s Plus utilizzando Tapatalk
September 18, 2017 at 8:59 am #47767
RayKeymasterIt 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.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › OpenSprinkler Pi with Adafruit LCD