Software apps and online services
Hand tools and fabrication machines
This device allows for fast, secure and remote analysis of the environment around an urban garden. Powered by the WIZnet WIZ750SR Serial to Ethernet module in conjunction with an Arduino 101, the Urban Garden Monitor reads temperature, humidity & pressure data and uses an integrated neural network to classify them into a system of categories.
The device was created using a few intertwined ideas:
The WIZ750SR is a serial to Ethernet module that allows any device with a serial port to connect to the internet. The module uses the W7500P processor, which combines an ARM Cortex-M0 with 128KB flash and a hardwired TCP/IP core to allow seamless connections between serial and Ethernet data. In the Urban Garden Monitor, the WIZ750SR bridges the gap between the environment data gathered by the Arduino 101 and the TCP Client terminal accessible on any device connected to the same router as the WIZ750SR.
The Arduino 101 is a unique development board that opens up the capabilities of the Intel Curie module in the Arduino form factor. Featuring a real-time operating system, integrated BLE, a six-axis accelerometer/gyro module and a 128 node Pattern Matching Engine (PME), or artificial neural network. The Urban Garden Monitor makes use of the RTOS and the PME to provide optimized characterization of daily environment data into a 30 category bank that fills up as the device learns different categorizations of this data, allowing users to visualize data trends and adapt their gardens as necessary. The Arduino 101 also comes with an additional hardware serial port, which is crucial to the operation of the WIZ750SR and functions as the link between the two devices.
Featured on the Urban Garden Monitor are two environment sensors, the BMP180 and DHT22, used for collection of data to be interpreted by the Arduino 101 and PME. The BMP180 is a barometric pressure and temperature sensor that uses the I2C bus to communicate with devices, while the DHT22 is a temperature and humidity sensor that uses a single digital pin to communicate with devices. Together, these sensors provide an array of information that the Arduino 101 can interpret and send to the user.
To build this device, first obtain all the components in the included bill of materials. Make note that your computer must have an Ethernet port. If you do not have a DB9 RS-232 port on your computer, obtain a USB to RS-232 DB9 adapter cable.
1. Configure the WIZ750SR. When you purchase the module as part of the EVB kit, the module will come attached to the evaluation board.
- Plug the included DB9 RS-232 cable into the DB9 port of the EVB.
- Plug the included USB Micro to USB A cable into the Micro-USB port of the EVB.
- Plug the included Ethernet cable into the Ethernet port of the WIZ750SR on the EVB.
- If necessary, plug the DB9 end of a USB to RS-232 DB9 adapter cable into your DB9 RS-232 cable and plug the USB end into your computer. Otherwise, plug the DB9 end of your DB9 RS-232 cable into your computer directly. You may need to download a USB to serial driver for your cable if it does not already exist in your computer.
- Plug the USB A end of your USB Micro to USB A cable into your computer.
- Plug the Ethernet cable into your computer. This will allow testing of device functionality.
- Flick the power switch on the side of your board. LEDs will indicate that your device is powered up.
- Download and open the WIZnet-S2E-Tool-GUI using this link: https://github.com/Wiznet/WIZnet-S2E-Tool-GUI/releases/tag/v0.5.4
- Make sure operation mode is set to "TCP Server." If necessary, use the upload button to update the device.
- Unplug the Ethernet cable from the EVB and plug in your own Ethernet cable between your home router and the board. This will allow testing of device connectivity. Reopen the S2E-Tool software and check the "Local IP" and "Local Port" of your device. Once you have these, your device is ready to go.
2. Test the transmission of data through the WIZ750SR. Keep the device plugged in.
- Download SocketTest from this link: https://sourceforge.net/projects/sockettest/. This is a TCP Client/Server terminal program which will allow testing of Ethernet functionality.
- Download the latest version of the Arduino IDE from arduino.cc under Software->Downloads.
- Open the Arduino IDE. Go to Tools->Port and select the communications port of your EVB. If there are multiple ports, check your computer's device list to see which one belongs to your board.
- Go to Tools->Serial Monitor and open the monitor. Change the baud rate to 115200 baud.
- Open SocketTest and go to the client tab. Type your EVB's IP address and port number into their respective fields. Hit connect to launch the terminal.
- If everything was set up correctly, you should be able to type strings in the Arduino terminal and see them appear in the SocketTest terminal, as well as vice-versa. Once you're done testing the module, close all applications and unplug the EVB's cables.
3. Build the Urban Garden Monitor using the parts included in the bill of materials.
- Unplug the WIZ750SR from the EVB. Flip the WIZ750SR so the headers face up.
- Follow this circuit diagram to put together the electronics of the Monitor. Place electrical tape around the breadboard after wiring it before putting it in the center of the Arduino 101. Wrap the tape tightly to ensure stable connections, but make sure that the hole in the silver BMP180 unit is left exposed and facing up.
- Note that the WIZ750SR header is composed of male pins. Use 4 F/F jumpers with a solid core M/M jumper on one end of each to create a low-profile connection on the Arduino 101.
- Place the WIZ750SR on top of the mini breadboard and tape everything together. Tuck any loose jumpers to the side pockets of the Arduino 101. Make sure that the three LEDs on the WIZ750SR are still visible, and that the reset buttons along with the Ethernet and USB ports are accessible.
- Attach the Arduino 101 to an Arduino holder to ensure protection of the board.
4. Upload the Urban Garden Monitor code to the Arduino 101.
- Download the included code to your computer and open it in the Arduino IDE. Helpful comments are included in the file to guide you through understanding.
- Go to Tools->Board->Boards Manager and find the Intel Curie Boards core. Download version 2.0.2.
- Close the IDE.
- Download the following additional code libraries to your computer:
Intel Pattern Matching Technology: https://github.com/intel/Intel-Pattern-Matching-Technology
Adafruit DHT Humidity & Temperature Unified Sensor Library: https://github.com/adafruit/DHT-sensor-library
Adafruit Unified BMP085/BMP180 Driver: https://github.com/adafruit/Adafruit_BMP085_Unified
- Open your computer's filesystem and find the "Arduino" folder. Create a folder named "libraries" within it if it does not already exist. Open the folder and paste the three downloaded code libraries into the folder.
- Reopen the Arduino IDE and plug the Urban Garden Monitor's USB port to your computer using a USB A-B cable. Go to Tools->Port and select the port of your Arduino 101. Then go to Tools->Board and scroll down to Intel Curie (32-bit) Boards. Select Arduino/Genuino 101.
- Hit the upload button to upload the code to your board. You're ready to go!
To run the device, first set the Urban Garden Monitor up in the area where you would like to get environment readings. The best place for this would be close by to, if not beside a particular group of plants you may be concerned about, as this will allow you to get the most accurate readings for the plants you want to monitor.
Once you have positioned the Monitor, take a USB wall charger and plug a USB A-B cable into it. Plug the charger into a wall outlet. Take the B end of your cable and route it to where your Monitor is located. After this is ready, take your Ethernet cable from your router and route it to the Monitor as well. Plug the USB cable into the USB-B port and plug the Ethernet cable into the Ethernet port. You should first see a red LED light up, followed by a blue LED once the device has connected to the internet.
After your Monitor has been wired up, you can leave it alone. Go to your computer and open the SocketTest application. Type in the IP address and port number that you recorded earlier for the EVB and hit connect. Please note that the IP address may change if you add or disconnect any other devices between when you first get the IP address and now. If this is the case, you can check your router's homepage to see your Monitor's current IP address.
If the Monitor fails to connect, try again as it may take some time to be fully on the network.
Once you are connected, you should come to this screen:
Type in anything and hit send or the Enter key to activate the Monitor. You should then be prompted to give the current time. Type in the hours first, send, and then type in the minutes and send that. If you make a mistake, you can hit the Reset button on the Monitor and try again.
Once the time has been configured, you should reach a menu prompt. Here are the commands you can enter:
- LD: This command creates a 2 second interval loop of sensor data readings using an Interrupt Service Routine. During this time, the loop will take priority over all other commands, so make sure not to activate any of the other data display commands during this time or they will be interrupted. This command is recommended for when you want to be able to remotely see the environment in which your plants are growing, so you can respond accordingly when conditions change.
- DL: This command turns off the ISR data loop.
- DD: This command sends a single snapshot of current sensor data readings.
- SS: This command shows the previous day's average data and neural network categorization. If you call this command when no previous day data exists, you will be notified and no data will be shown.
- ST: This command shows data categorizations of the past 30 days. Before a day is categorized, it will show up as category 0. Please note that category 0 will also be used by the first categorization that the device makes. You can modify this if you'd like by starting the array index at 1 and making it end at 30 instead of 29.
- DC: This command displays what each saved numerical day data categorization represents. If the category has not been assigned characteristics, the data will show up as zero for all fields.
- SC: This command shows the command list if you need it for reference.
During the operation of this board by the user, the Pattern-Matching Engine will run in the background. Each hour, the device will record a sample of the temperature, air pressure and humidity around the device. This data is then saved to the device in an array. After 24 recorded hours, the device takes an average of each dataset and creates a three variable representation of the environment of those past 24 hours. This data is then loaded into the PME, which categorizes it based off of learning experiences. If there is no prior categorization for which the PME finds a match, the data is given a new categorization and is saved to the PME's memory. Otherwise, an existing categorization is assigned. In both cases, the day's assigned categorization is then saved as well. The categorizations are put into a 30 day array which dynamically adapts to prevent overflow, deleting the oldest saved day and shifting all other data up, allowing the newest categorization to be recorded. This allows the user to see how the environment changes on a daily bases, allowing them to adjust their gardens to adapt to potential increasing or decreasing trends in data.
If the amount of categorizations exceeds 30, the oldest categorization is removed thereafter as the amount of storage space in the PME is limited.
This video shows the operation of the Urban Garden Monitor and how to use the command interface.
Hopefully this project will allow people to have more time available for them in their lives and allow them to provide more benefit towards an urban garden that they may take care of!