Smart Vivarium
In order to monitor the environmental condition for my reptiles, I created a smart vivarium.
My goal is to have a fully living ecosystem within the cage for my reptiles..
Based on these conditions, the terrarium should act upon itself to make sure that all plants are hydrated, and that the temperature and humidity should be suitable for my reptiles.
By releasing this open source, i'd hope to inspire other people, and possibly even help me get some feedback on my own product. Right now this terrarium only contains the right environmental conditions for leopard gecko's, crested gecko's and a bearded dragon.
Feel free to add more data for other reptiles! :)
Supplies
40x70cm 3mm triplex wood x 6
30x30 3mm plexiglas clear x 2
50x30 3mm plexiglas clear x 1
Fluid pump x 2
DHT22 Sensor x 1
Ground Moisture sensor x 2
1 Meter pvc tube x 5
Arduino Uno x 1
The Models
Models for (laser)cutting wood
In order to create the vivarium, I created some models which can be used for lasercutting to create the vivarium itself.
The json file can be used at https://www.makercase.com/ to modify the sizes of the SVG model in case you’d like to create a smaller of bigger terrarium. Besides the size, you might modify the windows in the terrarium as well. This Json file is also required if you’d like to create the terrarium out of a different material than wood. The current file is specifically made for wood material with a thickness of 3mm.
The Json file can be found at: https://github.com/LesleyKras/SmartVivarium/blob/...
The SVG file is the generated model, created from the json file. This file is needed when you want to cut the wood by using a laser cutting machine, or if your gonna cut the wood by hand.
The SVG contains all the different wood pieces at once. When you’re gonna use a laser cutting machine, you have to select each part individually from within the SVG file, and cut them one at a time.
Building It!
Put the pieces of wood together with either nails or wood glue. The bottom and top plates should be similar, just like the side-plates. This helps creating the terrarium itself.
After putting the pieces together, your terrarium should look something like shown in the image
Connecting the Hardware
After the terrarium is set up, it’s time to start putting in the hardware. As I was just developing a prototype, I did not put a lot of effort into hiding the cables and hardware to make it look like a finished product. Of course, this is recommended if you’re going to use the Vivarium for your actual reptiles.
The first thing to do, is connect your Arduino Uno with your computer, and upload the source code from the GitHub page to your Arduino.
Depending on your own wishes, you might use a breadboard (which I did).
If you’re not gonna use a breadboard, make sure that the specific sensors will be connected to the right IO pins in the Arduino Uno.
Temperature & Humidity
Let’s start with connecting the DHT22 Sensor to monitor the temperature and humidity in your terrarium. In order to connect the DHT22 sensor, you’d need to make use of their own library which can be found here.
After installing the Library, you’re ready to connect the pins to the Arduino. Make sure that your connect the voltage pin to the 5V, the GND-pin to the Arduino GND, and the data pin to pin 7 on the arduino.
Ground Moisture Sensors
In order to monitor the ground moisture, we are using ground moisture sensors. These are used to monitor the moisture in the ground for the actual plants that are going to live in your terrarium. If the ground moisture is too dry, the rain system will eventually be activated.
To connect the Ground moisture sensors, you’d need to have the following setup; Connect the VCC-pins to the 5V pins on the arduino. Connect the GND pins to the GND pins on the arduino. And to receive the data, you’d need to connect the A0 pins from the sensors to the A0 and A1 pins on the arduino.
Fluid Pump
I haven’t been able to get the fluid pump to work fully. But fow now I created a simulation for this pump, until I figure out how to connect it properly. I did this by using a simple Led light which should be blinking when the ground moisture is too dry. Based on my research i’d need to get the right type of relais to make the actual pump work.
Connect the VCC pin from the fluid pump to pin 12 on the arduino, and connect the GND pin from the pump to the GND pin on the Arduino.
Setting Up the Code for Your Specific Reptile
As of right now, there are only three type of reptiles configured in the storage on the Arduino. Right now, the data is being saved in a Json string, which can easily be modified to add more reptiles in case your reptile is not present.
The reptiles currently being used are a leopard gecko, a crested gecko and a bearded dragon.
In order to use the data from the Json file, you need to install another Library which is being used to parse the Json into readable data for the Arduino itself. You can find this Library here.
After adding the Library, you can simply search for teh following string in the code: ‘const char* reptiles = doc[“Leopard gecko”]’, and change the name of your reptile into the reptile that you own.
You can check the names of the variables in the json string, inside the variable called “reptileData[]” in order to make sure that you got it spelled correctly. If your reptile is not present, you can use the format of the other reptiles to add the needed environmental conditions for your own reptile.
Make sure to share these conditions, so other people can make use of it too! :)
Enjoy
You should now be set, and be able to make use of the terrarium.
After configuring all these things, and uploading the code, you can open the Serial Monitor to see the data received from the sensors. Check if this is reliable before actually using the set, as it might be possible that a sensor might not be working properly.
By default, it checks the environmental conditions every 5 seconds, but you’re free to change this by changing the ‘Period’ variable in the code (by milliseconds).
Enjoy!