This is a capacitive soil moisture sensor which runs with a standalone ATmega328P and utilizes the [MySensors] framework. It can however be adapted to any other framework that uses 2.4 GHz radio communication with an NRF24L01 if you upload your own code.
A short summary of the features is:
Note: Take care when inserting the batteries as there is no reverse polarity protection on this board. Also check the pin assignment of the FTDI and AVR ISP headers as these might be non standard to save some space.
If you want to work on the repository you just have to run:
git clone --recurse-submodules https://github.com/RonMcKay/capacitive-soil-moisture-sensor
The PCB design is done in KiCad 6. You are pretty much good to go if you open the project with KiCad.
You can generate production/documentation files and run ERC/DRC tests by running
make in the root directory. All production files are then placed under the hardware directory. The Makefile utilizes docker containers so you should have docker installed.
When working on the project you need the following installed locally and available in the development environment:
In recent years the DIY PCB industry segment has been growing and thus there are numerous options to quite easily order your boards online for low prices. Just download the Gerber-files from the release page or clone the repository and generate them yourself by running
For the assembly of your boards there are currently no SMT assembly files supplied with the release, although there are pick and place files for JLCPCB generated by
make they are not yet optimized or tested, so use them at your own risk. For manual assembly you can find the BOM attached to the release as well as a nice interactive HTML BOM which eases component placement. You only need to take care that the two battery holders which are closest to the radio module do not touch each other as this would cause a short. To be really safe you can bend them away from each other.
Note: The ATSHA204A on the board is an optional component. If you do not want to assemble the board with it, you can leave it away together with the accompanying resistor.
You can find the STL files for a case attached to the release. If you want to tweak the tolerances for your printer or add additional features like printed on version or venting holes you can edit the
hardware/case/case.scad file and generate the STLs by yourself by running
make case in the root directory of the repository. The STL files are then placed under
The minimum (air) and maximum (water) sensor values need to be calibrated. For this, get a glass of water and flash the sensor with
#define CALIBRATION_MODE. While reading out the log messages of the sensor, note down the sensor values for air and submerged in water. Change
WATER_SENSOR_VALUE accordingly and reflash the sensor after commenting out
#define CALIBRATION_MODE. Your soil moisture sensor is now ready for operation.
Here is a list of possible future improvements that might be worth looking into:
Any contributions are highly welcome and I am happy to discuss remarks in the github discussion section.
I am happy to discuss and accept improvements on the project. Please make all your pull-requests against
master. It is also a good idea to discuss your planned changes in the github discussion section to avoid unnecessary work.
This project is licensed under the CERN-OHL-P v2
P.S.: The sensor on the photos is only a prototype where I accidentally soldered some wrong value capacitor and forgot a capacitor for the FTDI connector. These are however already fixed in the pcb design.
|rev1||3 years ago||2||186 × 23|