How to Make a Wired Soil Moisture Sensor Wireless with WiFi
By Tim the Techno-Gardener
The Problem with Wired Soil Moisture Sensors
Soil moisture sensors are incredibly useful for monitoring plant health and optimizing irrigation, but they have one major drawback—connecting them to a computer requires long cables, which can be impractical in many agricultural and gardening applications.
Fortunately, there's a solution! In this article, I’ll show you how to convert a wired soil moisture sensor into a wireless one using WiFi. With this setup, your sensor will send moisture readings directly to the cloud, and you’ll even receive text alerts when your plants need water.
The Solution: Using VegeHub for Wireless Soil Moisture Monitoring
- VH400 Soil Moisture Sensor – A high-precision sensor for accurate soil moisture readings.
- VegeHub WiFi Sensor Reader – A battery-powered device that reads the sensor data and sends it to the cloud via HTTPS.
- VegeCloud – A free cloud platform that stores data, visualizes trends, and sends email notifications when soil moisture levels drop too low.
Why Use VegeHub?
The VegeHub is designed to work with any analog sensor, including:
- Soil moisture sensors
- Soil temperature sensors
- Humidity sensors
- Barometric pressure sensors
If the sensor outputs an analog voltage, the VegeHub can read it and transmit the data wirelessly.
Key Benefits of VegeHub:
- Battery-Powered Efficiency – A set of AA batteries can power the hub for about a year while reading the sensor once per hour.
- Weatherproof Design – The rugged casing ensures the hub functions reliably in outdoor conditions.
- Local Network Communication – The hub works as both a web client and a web server, meaning multiple hubs can communicate with each other.
- Automated Irrigation Control – A moisture sensor can directly trigger a sprinkler controller to shut off once the desired moisture level is reached.
Step-by-Step Guide: Setting Up Your Wireless Moisture Sensor
1. Wiring the Sensor to the Hub
To connect the VH400 sensor to the VegeHub, you’ll need to attach three wires:
- Ground (GND)
- Power (VCC)
- Sensor Output (Analog Signal)
If your sensor has more or fewer wires, feel free to reach out for assistance, and I’ll help you set it up.
2. Adding a Hub to VegeCloud
- Log in to your VegeCloud account.
- Add a new VegeHub device.
- Copy the generated API key—this will allow your hub to send data to the cloud.
3. Configuring the VegeHub
- Power cycle the hub—it will become a WiFi access point.
- Connect to it using your phone or computer.
- Open the hub’s settings page and enter your local WiFi network credentials.
- Power cycle it again, and it will connect to your local network.
- Reconnect to it as a hotspot to find out its IP address.
Now, you can access the hub directly from your phone or computer.
4. Linking the Hub to VegeCloud
- Enter the API key from VegeCloud into the hub’s settings.
- Press the "Send Data" button (or power cycle the unit) to transmit a soil moisture reading.
- When the LED turns green, it means the data was successfully sent to the server.
5. Viewing Data & Setting Alerts
Now that the hub is linked to VegeCloud, you can:
- Visualize data using tables and graphs.
- Set up email notifications for when your plant needs water.
Real-World Application: Automating Irrigation
To demonstrate the system, I simulated dry soil by removing the moisture sensor. Within moments, I received a text alert letting me know the plant needed water!
This setup is not just for houseplants—it can be used for:
- Outdoor irrigation systems
- Greenhouse automation
- Smart farming
Many people overwater their plants, wasting thousands of dollars, or underwater them, leading to plant loss. With a smart soil moisture monitoring system, you can save money, conserve water, and improve plant health.
📩 Contact me if you need help setting up your VegeHub.