Introduction: Project Oasis: Voice Terrarium
Project Oasis is a Voice Terrarium you can talk to. It's a self-sufficient closed ecosystem that mimics outside weather but inside a box. You can ask the terrarium about 'Weather in Seattle' as a response to which it might start pouring inside the box. The terrarium can also generate clouds, mist or change lighting to represent other weather conditions.
Step 1: Motivation
The medium of our conversation with nature is so visual and multi-modal, in contrast to what we do with do with technology today. Weather on phones or computers don't invoke the same senses as literally seeing or feeling the weather. I thought about this during my time at Google Creative Lab and created Project Oasis.
It's a terrarium you can talk to it using the Google Assistant. You can ask it to create certain conditions or show you the weather in a specific place. This experiment expands our conversation with technology and the natural world. We live in between nature and technology and traditionally look at them as two very different worlds. Oasis is an ecological conversation but in a natural way; neither programmed nor chaotic. Following are the steps on how to create one of your own active terrariums.
Step 2: General Mechanism
The terrarium as mentioned creates rain, mist and light conditions. The top of the terrarium has LEDs, a Rain Tray plus a small enclosure with ceramic resonators in contact with water. These small discs resonate at ~1-1.7Mhz to atomize water to what seems like mist.
The bottom of the terrarium houses two peristaltic pumps and other electronics. A reservoir at the bottom of the terrarium holds excess water. The water is recycled/fitlered and is pumped up to the rain tray using one of the silent peristaltic pumps.
Step 3: Enclosure Design
List of Tools/Materials:
- Acrylic/Plexiglass sheets 0.25" thick (24" x 18" - Qty: 4)
- Acrylic Glue
- Drill Set with 1/4" and graduated lower bits
- Measuring Tape + Calipers
- Epoxy Glue (~15min cute time)
- GE Sealant for waterproofing
- Clear PVC Tubing 1/4" OD + Barbed Connectors
The design guidelines for this terrarium are flexible and not hard and fast rules. I chose to build one that I could keep on my desk or one that would look nice on a countertop. In addition, I had a general idea about the space my electronics, plants and water reservoir would take. I decided for the whole enclosure to be H:15" W: 6" L: 10"
The CAD dimensions in the above figure show the general breakup; broadly the top and bottom electronics occupy 4" of height each. The reservoir takes up 4" L at the bottom leaving 6" L for the electronics (more on the electronics later).
I decided to use Acrylic/Plexiglass for this version of terrarium since it's easily available, very easy for to machine on laser and the parts can be glued/welded together with a variety of acrylic cements. Glass or transparent plastics are good candidates depending on how far you want to go with the look, especially if the terrarium is going to have curves. In addition, scratch proof versions of plexiglass are also available in many stores, so that could still leave it as an ideal choice.
I designed the 3D model for my terrarium in Fusion 360, just because I wanted to give it a shot. The CAD files for this project are attached with this step. I flattened all the sketches to get Laser Machine files and the standard laser machining process follows. Setup the laser (Epilog in my case), Open the files in Corel Draw and run the machining.
You should have the acrylic parts needed for enclosure assembly now. Refer to CAD and going from bottom to top, assemble the parts with acrylic cement together to get a box, with scaffolding at the top / bottom. Use calipers and ruler mat (since your box is transparent) as a guide for an easier assembly process.
Step 4: Electronics Design
List of Components / Electronics:
- 5V/10A Power Supply (Qty: 1)
- 3V-35V Boost Converter (Qty: 2)
- 12V DC Dosing Peristaltic Pump (Qty: 1)
- 2200 mL/min Peristaltic Pump (Qty: 1)
- Icstation 20mm Ceramic Discs freq = 113KHz, with driver boards (Qty: 2)
- RGB LED Strip (Qty: 1)
- 18 AWG and 24 AWG wire set
- Wire loom 1/4"
- Raspberry Pi 3 + Google Voice Hat (you just need the voice hat + microphone here and not speaker itself)
- Arduino Nano with Mini USB cable
- ~3-24V Voltage-Load Through Hole SSR Relays
- Half-Sized Protoboard
Note: This is a rapid prototype and there are better alternatives to some of the components and connections. If you know what you're doing, feel free to change with viable alternatives.
I hacked the single output 5V/10A power supply into a muti-output supply by stripping off the plug and adding my own multi-stranded cables for individual components.
- 5V line for Icstation driver boards
- 5V line for RGB LEDs
- 5V line for Raspberry Pi 3
- 12V line (variable via Boost Converter) for dosing peristaltic pump
- 24V line (variable via Boost Converter) for high flow rate rain peristaltic pump
I took the individual lines and put them together in a wire loom for a tidy look. I also added a cap in the 5V line to prevent power ripples since that connects to Raspberry Pi directly.
I connected one of the 5V lines directly to Raspberry Pi -- back of the board to PP1 and PP6 so as to not use mini usb cable because of limited space. The Pi has a Google Voice Hat sitting on top of it. I took an already existing program I had for serial switching and ported it to an Arduino Nano. This Nano is connected to Pi 3 through a short mini USB cable. The Arduino Nano has connections to a protoboard for switching relays on/off that in turn powers pumps/mist maker on/off.
The protoboard has three relays with 5V, 12V and 24V load lines each. Each relay is also connected to a separate pin on Arduino (D5, D7 and D8). Refer to the relay diagram on how to wire the relay contacts for some switching action. A1/A2 will be the lines from Arduino whereas 13+, 14 will be your lines to complete the circuit for the load. I'm using relays for good isolation but you can replace them with transistors as well. Remember to have common grounding between the load and Arduino for the circuit to work.
The ceramic resonators/piezos come with a driver board each that you can check individually on a variable power supply. The top ceramic surface has to be in contact with water for it to create mist. Once you have the driver boards tested, wire them up directly with 5V power line, with a relay in between (as above). As the relay is switched on and the circuit is completed, you'll see the water being converted to mist.
Neopixel LEDs from Adafruit are controlled directly with a control line to Arduino, without using any relays. I cut this long strip into multiple sections of ~15 LEDs each. Refer to this page on how to cut and connect these LEDs. After creating multiple sections of LEDs (as also seen in the picture), I kept the silicone covering on and added hot glue on the ends to waterproof everything. I stuck individual sections on the bottom of the rain tray for a nice and even lighting distribution.
As noted before, there are two peristaltic pumps in this terrarium. The dosing peristaltic delivers only small amounts of water for the mist generator. The mist reservoir has two ceramic resonators in contact with water, but the water doesn't finish up very fast. As a result, this pump doesn't run very often to fill the mist reservoir with water. (In fact, I even ended up removing it from code and just filling it up the misting reservoir manually at times by just lifting the terrarium's top lid)
The 24V, 2200mL/min peristaltic on the other hand is used for rain and is thus chosen for this high volume. While 24V itself will produce is too high a flow rate for the terrarium, you can change the voltage on the Boost Converter to change the flow rate of this pump to an optimal setting.
Step 5: Assembly and Testing
The electronics (2 Peristaltic pumps, RPi + Voice Hat/Microphone, Nano, Piezo Driver Boards, Relay Protoboard) stay in the bottom 6"L of the terrarium. I went for the assembly from bottom to top as per the 3D model. Drill two holes (approx 1/4" each) at the back of the bottom electronics sections - one of the holes is for the power lines of the all the components while the other is for tubing of the peristaltic pumps.
Drill one hole leaving 1/4" from the top lid to allow the rain water tubing to come in. Drill another small hole for the LED wiring to come out and go into the Nano at the bottom. Test all the electronics one last time before putting them inside the box.
Placement and Waterproofing
By now, all the acrylic sections should have been stuck in place from the Enclosure Design step. Place the above mentioned electronics in the bottom enclosure and put the lid on it. It is important to seal this lid carefully for it to be waterproof. The lid is not a press fit inside the box, so as to give some space for the glue to flow easily and close the gaps. I used Epoxy, poured it over the sides of the lid and allowed it to run on the scaffolding made to hold the lid. The glue should run and seamlessly close the gaps. Allow it to sit for overnight curing and then possibly do another layer of water proofing with the GE Sealant.
Rain and Mist Assembly
The assembly of rain tray with mist reservoir (with ceramic discs at its bottom) should have come together in the enclosure design step. The LEDs should also be stuck at the bottom of the rain tray from the previous step and the wires for ceramic resonators coming out from the respective hole at the top/back of the box. You can let this rain + mist maker assembly sit on the scaffolding at the top of the box. Before closing the top lid, bring the tubing of pump in through the hole drilled previously above the rain tray for this purpose. Cut small sections of tubing and use barbed connectors to create multiple outlets for even distribution of water when it comes in to the tray. The rain will have a uniform look this way in the terrarium. You can use a squeeze water dispenser bottle to add water in the mist reservoir before putting the lid on for testing once everything is inside the box.
I plugged the power in that makes the RPi come online. It had previously been configured to get connected to my local wifi network. I can query the network for the IP of Pi, following which I use inbuilt screen sharing on Mac to log into the Pi. This allows me to test and run things remotely and not having to plug an HDMI cable in the box. I use my preset programs (refer to Software step for programs running on Pi/Arduino for diff. components) to test everything is in place before heading to the next steps.
Step 6: Terrarium Design (Landscaping)
This is probably the most fun part of the whole process. You get to hunt or shop for plants! I went around in local garden centers including the one in local Home Depot, nearby plant shops and even just walked in my neighborhood which has a lot of green spaces. Since the climate is humid, closed and changes a lot inside the terrarium, I was trying to find resilient tropical climate plants. You'd need the following items to have the bed ready for planting:
- Black Soil
- Activated Charcoal
The water filters through the soil bed down to the reservoir to be recycled as rain again. Use a fine wire mesh (fiberglass mesh e.g) as the base before putting on the soil bed. Place activated charcoal as the bottom most layer in the terrarium. This prevents moulds growing inside the terrarium and also keeps any bad smell in check. Cover this layer with some gravel so the water has another layer of filtering and dirt doesn't keep flowing freely to the reservoir. Mix black soil and perlite in 1:1 ratio so you have a really airy and drainy growing media. You are now ready for planting.
Note: To drop all of this stuff in the box without touching the walls, I made a funnel-like shape with a paper and poured material in the box through that opening and not throw it in directly.
I gathered small logs and moss from tree trunks in my neighborhood and more variety of small tropical plants in local plant shops. I found an Bonsai Orange tree that suited my needs for look and something that'd survive in a topical climate at Home Depot. I use some Sheet moss and some Spanish moss (both commonly found in garden centers) for some natural green look above soil in the terrarium.
In terms of planting, I go from the small to big size. I use tweezers to put in the small plants and placed moss/logs just with hands, before reaching the look that I was finally happy with. You should one time light watering of the terrarium and let it sit for a day or two for the plants to acclimatize and grow roots in this new bed.
Step 7: Software
These instructions for the most part come from the github here with all the code. I'm still going to leave them here for completion. While I use Google Assistant as seen in the video, the terrarium also a Google Voice Hat with a microphone in the terrarium itself, listening to commands. You can choose to just use the AIR Voice Hat as per the instructions here.
Before you start
DialogFlow / Actions on Google
Follow the steps here to create a Dialogflow agent. We use a welcome intent that allows the user to start talking to the terrarium. There are additional intents for the user to enquire about the weather at certain location, time (e.g: 'show me the weather in seattle') or invoke an explicit action (e.g: 'make it rain')
You will need to deploy your cloud functions which are mapped to user's actions.
Setup a Cloud PubSub project as in this link
Follow the steps to create a topic. We created a Topic named 'Weather' in our project, to which we added our subscriptions. We only use pull subscriptions in this project. The subscription was terrarium was named as weather-detail
Note the project id for this project as it'll come in handy to run the listener client later.
Get your API key from openweathermap.org. Add this key in the cloud functions so that those functions can ping the weather servers when the user asks for specific info.
Install NodeJS on your RPi
How to run these modules
Dialogflow Cloud function deployment
Navigate to the directory of your functions and the run the following in order
$ npm install
$ firebase login
$ firebase init
And finally run the following to deploy your functions:
$ firebase deploy
The deployed functions' link becomes the webhook URL for Dialogflow.
Naivgate to the directory of the subscription.js & package.json file and run npm install to install the dependencies. When you're ready, run node subscritpions.js listen-messages weather-detail where weather-detail is the subscription you created from a previous step.
Google Assistant / AIY Voice Kit test deployment
Your can either use a Google Home or an AIY Voice Kit to interact with the terrarium. The app setup above remains the same for both.
Follow the instructions here to test and deploy your app on Google Assistant. You can then use a Google Assistant associated with your account by talking to it to trigger the terrarium and asking it about the weather.
Step 8: Run the Terrarium!
Following this whole setup seems arduous but is actually fun and engaging while working with the plants. If done right, you should finally be able to say something like
'Hey Google, What's the weather in Seattle?', 'Hey Google, Make it Rain' etc. and see the magical output in your terrarium.
Enjoy your new terrarium and show it off to your friends!
Step 9: Contributors / NOTE
- Made by Harpreet Sareen and friends at the Google Creative Lab.
- This project follows Google's Open Source Community Guidelines. Refer here for license and other guidelines.
- Note: This is not an officially supported Google product.