Description
This Analog-to-Digital (A2D) Adapter can convert analog sensor signals, such as from soil moisture, humidity, or temperature sensors, to digital binary signals to be used with the OpenSprinkler (including OpenSprinkler Pi) controller. You can set a threshold for each sensor, such that when the sensor value is above (or below) the set threshold, it triggers sensor activation on OpenSprinkler. Its features include:
- Compact design: plugs directly into OpenSprinkler’s GND, SN1, SN2, +5V terminals.
- Supports two independent sensors: including activation threshold adjustment and indicator LED for each.
- Implemented using a LM393 comparator with hysteresis for reliable and glitch-free sensor activation and deactivation.
- Digital sensor bypass: digital binary sensors like rain sensor can also be connected to this adapter (see instructions below).
Please note that this adapter is internally a comparator, it does NOT perform analog-to-digital conversion (ADC). It compares the sensor value with an adjustable threshold, and outputs a binary HIGH or LOW depending on the comparison result. It is suitable for applications such as ‘stop watering if the soil moisture sensor output is above a certain value’, or ‘stop watering if the temperature sensor is below a certain value’.
Instructions
- Plug the four male pins to OpenSprinkler’s GND, SN1, SN2, +5V terminals and tighten the terminal screws.
- Connect your analog sensor to the blue terminal ports. For example, connect the first analog sensor to GND, SN1 and +5V ports. Use the first potentiometer (on the left) to adjust the trigger threshold. The sensor 1 indicator LED will light up if the sensor value is greater than the set threshold, indicating sensor activation. You can fine tune the potentiometer until you are satisfied with the threshold.
- Configure Sensor 1 in OpenSprinkler settings. You can choose either Rain Sensor or Soil Sensor as the sensor type. Note that the adapter outputs a HIGH signal when the sensor value is below the set threshold, and LOW when the sensor value rises above the threshold. This corresponds to the ‘Normally Open‘ type, which is the default option. When configured this way, OpenSprinkler will receive activation when the sensor value is above the set threshold. If you want to reverse the logic (i.e. activation when the sensor value is below the threshold), simply uncheck the Normally Option checkbox.
- If you have another analog sensor, connect it similarly to GND, SN2, and +5V blue terminal ports. Use the second potentiometer (on the right) to adjust the threshold.
- Digital sensor bypass: if you want to connect a digital binary sensor (e.g. rain sensor) to the adapter: simply connect it between +5V and SN1 (or SN2), and set the corresponding potentiometer to the middle position.