• Time to order the hardware

    MaBe4203/03/2024 at 15:17 0 comments

    Since I now can provide moisture sensor values via MQTT to OSPi, it's time to order a board and the other necessary hardware. 

    As I understand, there are plans to integrate MQTT subscriptions into the OpenSprinkler firmware. I hope that this will happen in the not so far future. Until then I will use my workaround/hack.

  • Testing MQTT

    MaBe4203/03/2024 at 15:14 0 comments

    There was no big surprise. I wrote another short test program (mqtt-test.py) to subscribe to one of my moisture sensors. They simply provide an unsigned integer value. I merely have to get this value and define a threshold below which the soil is sufficiently wet or too dry if above and then set the GPIO accordingly. 

    The sensor itself is presently not installed (still winter break for my irrigation system). So I provided typical values using MQTT-Explorer. It worked as expected.

  • Does controlling OSPi with the other GPIOs work?

    MaBe4203/03/2024 at 13:16 0 comments

    Yes.

    Again a small program (sensor-test.py) and corresponding programming of OpenSprinkler shows: it works! (From now on, as I directly connected the GPIOs, I did not use any pull-ups anymore.)

  • Can I control other GPIOs while OSPi is running?

    MaBe4203/03/2024 at 08:36 0 comments

    Yes.

    As I use Debian bookworm with kernel 6.1 I can control the GPIOs without using WiringPi (which as I understand is used by OSPi).

    I wrote a short python script to blink LEDs on GPIO 16 and 20. These GPIOs are not used by OSPi by default. As I understand the OSPi documentation, further GPIOs might be used by defining them in the configuration. But for my irrigation project I do not have any such intentions.

    It turns out that I can run the blinking program (gpio-test.py) while running OSPi without any interference between both of them.

    This looks promising!

  • The simulation circuit

    MaBe4203/03/2024 at 08:30 0 comments

    The current version of the OSPi hardware can be found at https://github.com/OpenSprinkler/OpenSprinkler-Hardware/tree/master/OSPi/1.52. I don't need the analog inputs. So my simulation circuit is just a 74HC595 connected to the raspi as in the schematic (however, I powered it from the 3V3 rail) and LEDs at some of the output channels instead of the triacs.

    Running the "Run Once Program" shows that everything works fine.

    For the sensor inputs I provided 10k pull-up resistors to be on the safe side.

    I assigned them to soil moisture sensors and when I connected an input to ground it was correctly recognized as wet soil which does not need irrigation. (The irrigation program was not executed.)