After some time with the sensor v1.0 working and seeing that results were not optimal I decided to redesign the whole project. I was attending a very interesting workshop about fertilization, L'Era and I found that sensor used was not the adequated to know plant water needs. That supposes an important change in the jardiNet node, as to do it right it is required now several sensors. In fact, measurements can be done also with tensiometers, a very reliable and precise device but expensive and require maintenance and they're only useful for ad-hoc measurements.
In this way, I started to look for sensors to measure water tension, that can be easily integrated and within my budget. I end up with Irrometer Watermark sensors. Now we need 3 sensor in every node: two water tension sensors (200SS), to have measurements at same point but in different depths, and one temperature sensor (200TS) to compensate sensor readings. Calculations from sensors are well explained in the Irrometer documentation and they're easy to program. In Irrometer site 'Reading WATERMARK Soil Moisture Sensors' you will find everything I needed to design measurement circuit and the mathematic model to convert sensor readings into water tension values (cBars). In other way, you can find useful information in page 'Fundamentos de la humedad del suelo' about how to interpret these values and decide if it's needed to water or not.
Now we should manage 3 sensors instead of 1. It could be interesting to continue using only the XBee ADC, as in v1.0, but now power requirements are increased for all these sensors and require complex electronics. So I've decided to manage the sensors with a microcontroller Arduino MKR Zero and to be honest, this is not difficult at all as we only need to design a circuit based on tension dividers and some protection diodes. Irrometer recommends to power the 200SS sensors with AC to have a long life, but that's not possible with the Arduino. So I've built a pseudo-AC using two Ardunino outputs as suggested in sensor docs shown before. The Arduino is sending data to the XBee through a serial port and also sends a pulse signal to the timer to shutdown completely the circuit and start the next reading cycle. The XBee sends data to the datalogger and writes it to a database. XBee programming has been simplified a lot as it is needed only to setup the power and serial port pins. Arduino code is really easy and can be shared, just send me a mail.
Time to power the whole circuit, and to simplify I'm using several boards from Adafruit. I'm still using the Adafruit 390 circuit, which allows a solar panel, a battery and even USB power. Also the battery is charged when power comes from Sun. Immediately after I use a timer circuit, based on chip TPL5110, to wake up the circuit every hour during the required time (just few seconds) to feed the sensors, read data and send it to the datalogger, and this is done once per hour aproximately. These two components are the only ones that are always powered. It is the Arduino that generates the required pulse to signal the TPL5110 timer that shutdown time is arrived, so it is the last statement in code. Note that even with sleep modes available in Arduino and XBee they're not so efficient as a complete shutdown from timer. The timer circuit is again a block: Adafruit 3435.
Just to mention now an issue found with the Arduino pulse to signal the timer to shutdown. I'm using the 'DONE' signal in timer board to receive the pulse from Arduino but I've needed a lot of time to have it working and I've lost a lot of time to figure out the solution. Chip manufacturer specifies that a pulse of 100 ns of length is required to be a valid DONE signal in TPL5110. Arduino docs do not specify what is the status of digital outputs during boot sequence so it is probable that at some point the output reaches the high state during enough time to be considered as a valid DONE pulse in the timer an in consequence shutdown everything. That's and endlessloop if the Arduino boot process is sending the undesired shutdown signal. I don't have an oscilloscope to confirm this hypothesis so it has been really difficult to arrive here. The solution has been to filter the output signal to remove short pulses ( more than 100 ns ) with a capacitor, see the design, and ensure only that desired pulses ( few msecs. ) arrive to the timer.
Finally the last board in the power supply: Adafruit 2030 that converts any input voltage from 1.8 Volts to an stable output of 5.2 Volts, which is required to power the Arduino MKR through Vin. To consider the limit imposed by the main component, TPS61030, which is about 5.5 Volts and it means that if power comes from solar panel it can have peaks bigger than 6 Volts and I don't want to assume the risk to break the board as it can be easily protected with a voltage regulator, L4940V5 which limits at 5.5 Volts and is linear in lower voltages, see the design. Also to mention that XBee is powered through Vcc output from Arduino, which is 3.3 Volts as required. I've been testing the whole power supply some time and it looks stable after few days installed in the garden.
This is the circuit schema of the jardiNet v2.0, where Adafruit boards are just shown with the required connectors, except the 390 which is represented with the 'Power' input:
Here the schema needed to build the pcb where to weld all components, generated with Kicad:
As usual I always want to optimize this design, replacing all these boards and build a power supply directly as a unique circuit. A good starting point can be to use the board schemas from Adafruit and integrate them in a unique board. Maybe soon... I've been using Kicad to design the electronics, it is an open source application, with all features required and without practical limitations. This tool allows to generate the gerber files required to build the pcb where to place all components and boards. Note that first version of jardiNet had few issues because poor weelding and connections, as everything was wired in a protoboard circuit.
That's the final look of the node when placed in a box:
Now with sensors attached, only missing solar panel and the support:
And now finally installed in my garden, hot glue gun did a good job !!