OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) OSPi 1.2 – ADC – Rain Sensor – Garage Door Control

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #22530

    dennyfmn
    Participant

    Hi,

    I’ve just received an OSPi ver 1.2 with the on-board ADC, very cool! I have the 7/10/2013 update of the Interval program running on the bench with a version 1 Pi and set up like my existing Hunter SRC programing with 6 active stations. I had to cut out the cover to allow the ethernet cable to connect; I plan to use it wired in parallel with the existing controller so any service people can run the values if I’m not around.

    When I run i2cdump I see an address detected at 48, I presume this is the ADC.

    root@mypi2:/usr/local/src/OpenSprinkelerPi/IntervalProgram/OSPi/data# i2cdetect -y 0
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: — — — — — — — — — — — — —
    10: — — — — — — — — — — — — — — — —
    20: — — — — — — — — — — — — — — — —
    30: — — — — — — — — — — — — — — — —
    40: — — — — — — — — 48 — — — — — — —
    50: — — — — — — — — — — — — — — — —
    60: — — — — — — — — UU — — — — — — —
    70: — — — — — — — —

    I looked up the schematic and see that the ADC has 4 inputs and one output.

    Will you be publishing any software to show how to use the ADC?

    In my case I’m considering using the ADC and an unused sprinkler channel as follows:

    1. Rain Sensor -Use an A/D channel for a rain sensor input. Probably needs a pullup resistor with the rain sensor switch closure to ground. I see the rain sensor config settings in the Interval program Options; is the rain sensor logic active in the program? If the program were told where to get the rain sensor input would it function properly?

    2. Garage Door Control – Use an A/D channel to sense the garage door OPEN/CLOSED state and report it on the front page. A micro switch to ground with a pullup resistor should do the trick for sensing the state of the door. I would use a 24 VAC relay on one of the two unused station outputs to send a momentary contact closure in parallel with the door open/close button to raise/lower the door. There was another post that proposed a run-once command via url to provide a contact closure for a couple of seconds.

    Any other ideas or tips on implementing this would be greatly appreciated!

    #24807

    virtus
    Participant

    I’ve been posting a lot in the other garage door thread. I’m glad to see more discussion about it and a different approach. I’m not familiar with the 1.2 board, but I’m going to try to use the GPIO pins on the raspberry pi itself for my garage door sensors since they are fairly well documented and I believe they already have pullup / pulldown resistors.

    #24808

    danimal1228
    Member

    If you just need to determine the state of a switch then a digital input would suffice. If your rain sensor is the on/off type then a digital input would also suffice. I believe the analog input is meant for things like soil moisture meters that output a range of voltage based on moisture content.

    #24809

    dennyfmn
    Participant

    No matter whether the rain sensor input comes from the Raspberry GPIO or the OSPi ADC I was hoping to get a little insight into how to incorporate the rain sensor signal into OSpi.

    Thanks for any tips…

    #24810

    Ray
    Keymaster

    For reading rain sensor, one GPIO pin is sufficient (since most rain sensors return a digital signal, i.e. closed or open, instead of an analog signal). This is essentially the same as reading a button (pressed or released), so if you just search for how to use RPi to read a pushbutton that should work for rain sensor as well. The standard way is to use a pull-up resistor (e.g 10K), one pin goes to +3.3V, the other pin goes to one wire of the rain sensor, and the other wire of the rain sensor goes to ground.

    #24811

    dennyfmn
    Participant

    Thanks for the hardware hookup tip Ray. How do I tell the Interval program where to find the GIO signal?

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

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) OSPi 1.2 – ADC – Rain Sensor – Garage Door Control