Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Suggestion on adding a moisture sensor to system #65332

    BratNZ
    Participant

    Oh. Using a 74HC165 for the input sensors would require 4 pins from the Microcontroller.
    using a 4021 multiplexer would require 3 pins.

    If there is I2C on board, then a MCP23008 (or MCP23017) would be a great option. No extra I/O pins needed at the expense of loading an I2C library. Pullups/pulldowns can be implemented making this quite reliable.

    If SPI is available, then the MCP23S17 would be even better!

    Can probably pinch the clock signal used to drive the HC595 output shift register if you’re still using that in the V3 board.

    Brett.

    in reply to: Suggestion on adding a moisture sensor to system #65331

    BratNZ
    Participant

    Ray.

    If I understand you correctly, you are not measuring rain or soil moisture. Effectively the sensors are a switch – they just switch on (open state) once the sensor reaches a certain preset level, as defined by the sensor, NOT OpenSprinkler. They switch off (normally closed) once the value of whatever they’re measuring drops below the sensor threshold. There are variables (on and off delays) that give some hysteresis in order to prevent false positives and avoid thrashing.

    Flow sensors are different as they actually read flow data while a program is running and will display realtime flow data (at the footer) and display total flow when the program ends.

    That correct?

    What’s the memory usage and cycle time of the current OpenSprinkler code?
    Just wondering how much room there is to add features with the spare analogue, I2C and SPI pins, etc.
    How many digital I/O ports on the microcontroller are free?
    How many analogue ports are available?

    As a basic hack, would it be possible to multiplex sensor signals onto the sensor pins with a “number of sensors per pin” variable so that multiple “alerts” could be processed with the same sensor input pin? That would meet most of the requirements of what I (and I suspect many others) might want? Especially as we could then get away with alert sensors as are currently implemented. (It might require few code changes especially if the sensor reading block is implemented as a function).
    8 sensor inputs would require 4 I/O pins. 16 sensors would require 5 pins. Each additional sensor would require three extra variables (value, on_delay, off_delay) along with the code required to cycle through reading each sensor.

    Another option without using microcontroller I/O ports is to use RF as per your other adventures with weather sensors and power sockets. Would either need an addressing scheme or a form of multiplexing.

    Thoughts? Am I understanding things correctly? (Generally if I think I understand something, I’m not really comprehending the full complexity of a situation). 😉

    Cheers,
    Brett.

    in reply to: Ac vs DC OpenSprinkler? #65281

    BratNZ
    Participant

    Thanks Ray.

    Was going worst case based on specs. Your reply makes perfect sense.
    The DC unit now looks very attractive – easy to find PSUs, it will automatically cope with bad programming (multiple zones starting at once) and also provides flexibility on the types of valves supported.

Viewing 3 posts - 1 through 3 (of 3 total)