Choose the right plant for you, using Pick-A-Plant. This IoT device will help you find the best match for every location, using Microchip’s AVR-IoT WG Development Board.
We’re notoriously bad at taking care of our plants. We buy one, we put it somewhere in our house and then it dies. So maybe we’re just putting the plant in the wrong place? This is why we decided to create the Pick-A-Plant, to help us choose which plants we should buy for our house.
To start off, let’s set up our AVR IoT WG Development Board using these two tutorials to setup the board and connect it to your own Google Cloud. After following these steps, we will have a working chip with a premade frontend, hurray!
We’ve set everything up on our own Google Cloud Platform meaning we can access the data directly on our Firebase app.
You can check your Firebase database under “Database” in your Firebase project.
Based on the light and temperature data collected with our board, we want to select the ideal plant for the chosen location. We gathered data about ten common houseplants from the website House Plants Expert and saved in a JSON file. For each of the plants, we saved data about their ideal condition in the following format:
“description”: “The African violet is one of the most popular flowering house plants from the saintpaulia genus. The genus has about 20 species and thousands of varieties. These have become easier for the average home grower to produce perfect blooms, although they need to be provided with some special care and attention.” ,
At first we do an initial load of the sensor data to fill our chart, we’ve limited it to the last ten data points in our API url.
Once the initial load is done, we update the chart every two seconds, removing the oldest of the ten records and adding the new one.
When you click on the search icon, the last ten data points are summarized, calculating the minimum, maximum and average for both light intensity and temperature. We show these statistics in the designated tiles. Using this sensor data and the JSON file about our plants, we find the best match. If a match is found, we display the name of the plant and a short description with a link to the House Plants Expert website with more information.
With the software taken care off, we can start on our device. A bright orange casing will make the Pick-A-Plant stand out for sure. So after finding this LEGO flower model on Thingiverse, we added an opening in the top to allow the sensors to do their work, and a hole in the bottom to hold the chip and batteries.
With the model done, we print it and viola, our flashy casing is done.
We hot glued a 2x AAA battery holder to the back of the board and installed it into our designated hole finishes this short assembly step.
Everything is ready, looks neat and is portable. The Pick-A-Plant is ready to help with the next green decision! From now on, only happy plants in our house!
You can find the code and more project details on Electromaker.