Gravity Soil Moisture Sensor
Project #15: Environment – Soil Moisture Sensor – Mk20
——
#DonLucElectronics #DonLuc #Arduino #ASM #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant
——
——
——
——
Soil Moisture Sensor
Soil moisture is the critical parameter in agriculture. If there is a shortage or overabundance of water, plants may die. At the same time, this data depends on many external factors, primarily weather conditions and climate changes. That is why it is so vital to understand the most effective methods for analyzing soil moisture content.
This term refers to the entire quantity of water in the ground’s pores or on its surface. The moisture content of soil depends on such factors as weather, type of land, and plants. The parameter is vital in monitoring soil moisture activities, predicting natural disasters, managing water supply, etc. This data may signal a future flood or water deficit ahead of other indicators.
DL2411Mk03
1 x SparkFun RedBoard Qwiic
1 x Gravity: Analog Soil Moisture Sensor
2 x LED
1 x ProtoScrewShield
1 x USB Battery Pack
1 x USB Micro-B Cable
SparkFun RedBoard Qwiic
ASM – A0
LEDP- 13
LEDG- 12
VIN – +5V
GND – GND
DL2411Mk03p
DL2411Mk03p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #15: Environment – Soil Moisture Sensor – Mk20 15-20 DL2411Mk03p.ino DL2411Mk03 1 x SparkFun RedBoard Qwiic 1 x Gravity: Analog Soil Moisture Sensor 2 x LED 1 x ProtoScrewShield 1 x USB Battery Pack 1 x USB Micro-B Cable */ // Include the Library Code // Gravity: Analog Soil Moisture Sensor int iSoilMoisture = A0; int iSoilMoistureVal = 0; int zz = 0; // Change Your Threshold Here int Threshold = 300; // LED ProtoScrewShield Yellow int iLEDProto = 13; // LED Green int iLEDGreen = 12; // Software Version Information String sver = "15-20"; void loop() { // Gravity: Analog Soil Moisture Sensor isSoilMoisture(); // Delay 1 Second delay( 1000 ); }
getSoilMoisture.ino
// Gravity: Analog Soil Moisture Sensor // Soil Moisture void isSoilMoisture(){ // Connect Soil Moisture Sensor to Analog 0 zz = analogRead( iSoilMoisture ); // iSoilMoistureVal => 0~900 Soil Moisture iSoilMoistureVal = map( zz, 0, 715, 0, 900); // Serial Serial.print("Moisture Sensor Value: "); // Threshold if (iSoilMoistureVal > Threshold) { // 300~900 - Humid Soil // LEDProto digitalWrite(iLEDProto, LOW); // Serial Serial.print( "Humid Soil " ); Serial.println( iSoilMoistureVal ); // LEDGreen digitalWrite(iLEDGreen, HIGH); } else { // 0-300 Dry Soil // LEDGreen digitalWrite(iLEDGreen, LOW); // Serial Serial.print( "Dry Soil " ); Serial.println( iSoilMoistureVal ); // LEDProto digitalWrite(iLEDProto, HIGH); } }
setup.ino
// Setup void setup() { // Delay delay(100); // Serial Serial.begin(57600); // Initialize the LED iLEDProto pinMode(iLEDProto, OUTPUT); // Initialize the LED iLEDGreen pinMode(iLEDGreen, OUTPUT); // Delay 1 Second delay( 1000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Electronics, IoT, Teacher, Instructor, R&D and Consulting
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Automation
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- Artificial Intelligence (AI)
- RTOS
- Sensors, eHealth Sensors, Biosensor, and Biometric
- Research & Development (R & D)
- Consulting
Follow Us
Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/
Don Luc
Project #29 – DFRobot – Gravity Soil Moisture Sensor – Mk04
——
#DonLucElectronics #DonLuc #DFRobot #SoilMoistureSensor #FireBeetle2ESP32E #ESP32 #IoT #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant
——
——
——
——
Gravity: Analog Soil Moisture Sensor
A soil moisture sensor can read the amount of moisture present in the soil surrounding it. It’s an ideal for monitoring an urban garden, or your pet plant’s water level. This is a must have component for a IOT Garden / Agriculture. The new soil moisture sensor uses Immersion Gold which protects the nickel from oxidation. Electroless nickel immersion gold has several advantages over more conventional surface platings such as HASL, including excellent surface planarity, good oxidation resistance, and usability for untreated contact surfaces such as membrane switches and contact points.
This Soil Moisture Sensor uses the two probes to pass current through the soil, and then it reads that resistance to get the moisture level. More water makes the soil conduct electricity more easily, while dry soil conducts electricity poorly. This sensor will be helpful to remind you to water your indoor plants or to monitor the soil moisture in your garden.
DL2402Mk04
1 x DFRobot FireBeetle 2 ESP32-E
1 x Gravity: Analog Soil Moisture Sensor
1 x 1 x Lithium Ion Battery – 1000mAh
1 x Rocker Switch – SPST
1 x Resistor 10K Ohm
1 x USB 3.1 Cable A to C
DFRobot FireBeetle 2 ESP32-E
LED – 2
RSW – 17
SMS – A0
VIN – +3.3V
GND – GND
——
DL2402Mk04p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #29 - DFRobot - Gravity Soil Moisture Sensor - Mk04 29-04 DL2402Mk04p.ino 1 x DFRobot FireBeetle 2 ESP32-E 1 x Gravity: Analog Soil Moisture Sensor 1 x Rocker Switch - SPST 1 x Resistor 10K Ohm 1 x 1 x Lithium Ion Battery - 1000mAh 1 x USB 3.1 Cable A to C */ // Include the Library Code // Bluetooth LE keyboard #include <BleKeyboard.h> // Bluetooth LE Keyboard BleKeyboard bleKeyboard; String sKeyboard = ""; // Send Size byte sendSize = 0; // Gravity: Analog Soil Moisture Sensor int iSoilMoisture = A0; int iSoilMoistureVal = 0; // The number of the Rocker Switch pin int iSwitch = 17; // Variable for reading the button status int SwitchState = 0; // Define LED int iLED = 2; // Software Version Information String sver = "29-04"; void loop() { // Gravity: Analog Soil Moisture Sensor isSoilMoisture(); // Read the state of the Switch value: SwitchState = digitalRead(iSwitch); // Check if the button is pressed. If it is, the SwitchState is HIGH: if (SwitchState == HIGH) { // Bluetooth LE Keyboard isBluetooth(); } // Delay 1 Second delay(1000); }
getBleKeyboard.ino
// Ble Keyboard // Bluetooth // isBluetooth void isBluetooth() { // ESP32 BLE Keyboard if(bleKeyboard.isConnected()) { // Send Size Length sendSize = sKeyboard.length(); // Send Size, charAt for(byte i = 0; i < sendSize+1; i++){ // Write bleKeyboard.write(sKeyboard.charAt(i)); delay(50); } bleKeyboard.write(KEY_RETURN); } }
getSoilMoisture.ino
// Gravity: Analog Soil Moisture Sensor // Soil Moisture void isSoilMoisture(){ // Connect Soil Moisture Sensor to Analog 0 iSoilMoistureVal = analogRead( iSoilMoisture ); // SData => 0~900 Soil Moisture float SData = map( iSoilMoistureVal, 1, 3000, 0, 900); // bleKeyboard // DFR|Version|Soil Moisture|* sKeyboard = "DFR|" + sver + "|" + String(SData) + "|*"; }
setup.ino
// Setup void setup() { // Give display time to power on delay(100); // Bluetooth LE keyboard bleKeyboard.begin(); // Give display time to power on delay(100); // Initialize the Switch pin as an input pinMode(iSwitch, INPUT); // Initialize digital pin iLED as an output pinMode(iLED, OUTPUT); // Outputting high, the LED turns on digitalWrite(iLED, HIGH); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Teacher, Instructor, E-Mentor, R&D and Consulting
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Automation
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- Artificial Intelligence (AI)
- RTOS
- eHealth Sensors, Biosensor, and Biometric
- Research & Development (R & D)
- Consulting
Follow Us
Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Don Luc