HARDWARE
Netduino3WiFi
Netduino3Ethernet
Solderless Breadboard Half Size
RGB Diffused Common Cathode
Soil Hygrometer Humidity Detection Module Moisture Sensor
Maxim Integrated DS3231MPMB1 Peripheral Module
MicroSD Card (max 2GB)
SOFTWARE
Microsoft
Visual Studio 20151Xamarin
In this project you'll learn how to make your own soil humidity plant monitor that checks the soil moisture periodically and log the data to an SD card stored in the Netduino. You'll query the data using a Xamarin app so you you'll always know when to water your plant.
You will use a soil moisture sensor that is placed directly into the plant pot or soil bed. The sensor has two probes and measures the resistance between them. Since water is conductive, as moisture in the soil increases, the resistance decreases allowing the sensor to determine soil humidity.
The Netduino will periodically poll the sensor and log the value to the SD card along with the date and time (using a RTC module).
To send the humidity logs over the network you'll use the light-weight Maple REST server. Maple makes it easy to build connected devices with Netduino by exposing control via a Web API. Maple is an open source, ultra-lightweight, JSON enabled, RESTful web server built specifically for Netduino devices with network capabilities.
An RGB LED is used to give user feedback based on the state of the soil sensor, for example: when the Netduino joins a network, the soil sensor is active, or Maple receives client requests.
You'll communicate with the sensor using Netduino.Foundation. Netduino.Foundation. is a platform for quickly building connected things using the .NET MicroFramework on Netduino. Created by Wilderness Labs, it's open source and maintained by the Netduino community.
If you're new to Netduino development, I suggest you go to the Getting started with Netduino project to set up your development environment.
Step 2 - Connect your Netduino to the networkDownload and open the Firmware Updater and Configuration Tool for Windows or macOS while your Netduino is connected in bootloader mode. Before using the Network Configuration section, make sure your device is selected automatically in the Model picker control to confirm that your device is properly connected.
If you're using a Netduino 3 WiFi, select the proper encryption, authentication, SSID and pass-phrase settings and finally click on Update to save those settings to the Netduino. Once the network settings are saved to the device, remember to disconnect and reconnect your Netduino back to your computer to leave bootloader mode and its ready to run the project once its completed.
Step 3 - Create a Netduino projectCreate a Netduino project in Visual Studio 2015 for Windows or in Visual Studio for Mac; name the project PlantHost.
Step 4 - Add Netduino.Foundation Maple NuGet PackagesWindowsRight-click on your PlantHost project and click Manage NuGet Packages. In the Browse tab, search for Netduino.Foundation; it should be the first search result. Click the Install button.
Right click on your project and click Add new => Class, and name it RequestHandler. Here is where you will expose all your URL endpoints, which for this project is only /PlantHumidity. Your RequestHandler class should look like this:
using
Comments
Please log in or sign up to comment.