Arduino UNO Based Soil Moisture Monitoring with NRF24L01 Wireless Communication
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit is designed to interface an Arduino UNO with a YL-69 soil moisture sensor and an NRF24L01 wireless transceiver module. The Arduino UNO serves as the central processing unit, reading the moisture level from the YL-69 sensor and transmitting the data wirelessly via the NRF24L01 module. The YL-69 sensor is split into two parts: the probe (YL-69 Sonda) that goes into the soil and the module (YL-69 Module LM393) that processes the signal. The NRF24L01 module enables wireless communication, possibly to a remote monitoring system.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button.
YL-69 Sonda
- Soil moisture sensor probe
- It is inserted into the soil and measures the moisture content.
YL-69 Module LM393
- Signal processing module for the YL-69 Sonda
- It has both analog and digital outputs and is based on the LM393 comparator.
NRF24L01
- 2.4GHz wireless transceiver module
- It has configurable data rates and low power consumption, suitable for battery-powered applications.
Wiring Details
Arduino UNO
3.3Vconnected to NRF24L01VCC (3V)5Vconnected to YL-69 Module LM393VCCGNDconnected to YL-69 Module LM393GNDand NRF24L01GNDA0connected to YL-69 Module LM393A0D13connected to NRF24L01SCKD12connected to NRF24L01MISOD11connected to NRF24L01MOSID10connected to NRF24L01CSND9connected to NRF24L01CE
YL-69 Sonda
+connected to YL-69 Module LM393+-connected to YL-69 Module LM393-
YL-69 Module LM393
A0connected to Arduino UNOA0DO(not connected)GNDconnected to Arduino UNOGNDVCCconnected to Arduino UNO5V+connected to YL-69 Sonda+-connected to YL-69 Sonda-
NRF24L01
VCC (3V)connected to Arduino UNO3.3VGNDconnected to Arduino UNOGNDCEconnected to Arduino UNOD9CSNconnected to Arduino UNOD10SCKconnected to Arduino UNOD13MOSIconnected to Arduino UNOD11MISOconnected to Arduino UNOD12IRQ (not used)(not connected)
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
The provided code is a template with empty setup() and loop() functions. The setup() function is intended for initialization code that runs once at the start, while the loop() function contains code that runs repeatedly, forming the main logic of the program. Additional code is required to read from the YL-69 sensor, process the data, and transmit it using the NRF24L01 module.