Jump to content

My DIY LED Terrarium with automation

Recommended Posts

Hi everyone,

Now that my Terrarium is up and running I thought I should introduce it properly and show you the steps of the build along the way, which may help to inspire others to create similar projects.

I used to have a small terrarium, which consisted of an old 45x30x25cm fish tank, lit by a 6400K 45W spiral compact fluorescent. It worked ok and the light certainly was powerful enough just to grow plants but it had problems with keeping the heat under control, keeping the water conditions stable and inevitably; I simply ran out of space!

Last year I found a larger, second-hand fish tank and soon put together the idea of an LED build for a more hi-tech and efficient terrarium to allow my plants to really thrive.

Here, finally is the result of my setup...

It's a 75cm x 32cm x 39cm grow space that's warm and humid - in order for me to grow tropical species year round.

I went with 55x 3W star LEDs, comprising 28x Cool white and 27x Warm white in equal spacing. The LEDs came from Michael Houlder at FutureEden (via his ebay shop). He's a great guy and helped me with my initial questions into LED wiring and electronics.

I needed a heatsink to mount the LEDs to and also to form the entire hood of my terrarium. After a lot of searching around, I opted for a custom-made, black-annodised aluminium heatsink from Birmingham Aluminium (http://www.bal-group.com/home). They were very helpful and communicative to discuss my needs and clarified the thermal properties of the heatsink would successfully handle the proposed 55x 3W LED heat load.
This was the single most expensive item in the entire build, but was critical to ensure I had a lasting terrarium with safe temperatures.
The heatsink sits perfectly flush with the top, left and right sides of the tank, but has a very small 1cm air gap at the back - providing a small but useful exchange of fresh air as well as some space for any wiring to go into, or out of, the tank.

Here's the heatsink, with a pair of T-bar handles installed so that I can lift the hood off (relatively) easily...


The spacing for the LEDs was carefully checked using a handy PAR calculator via an excel spreadsheet. This had been set up for aquarium enthusiasts to calculate that the proposed spread of light would achieve a desired PAR level. If I remember correctly, I shot for a PAR around 2000, which is close to full sunlight (aim high, right!)

LED's glued in place with thermal adhesive...

With the spacing sorted, I then planned the wiring, making sure it was as neat and efficient as possible but still allowing for an even distribution of cool and warm white. The two 'sets' of LEDs are run on different drivers so I have the option of having the Warm and/or Cool white banks on at any one time. This also allows for future adjustment to light schedules and time overlaps. The wire used is silicon-sheathed which is heat proof and highly flexible.

Planning the wiring..

Main wiring paths soldered in place...


First test of the drivers and warm white LEDs...

Wow, extremely bright and painful to look at. A stopped-down photograph shows the individual LEDs better than our blinded eyes can see..

Here is the hood in place with tested lights on - remember this is still only the warm white set (half the total)...

Time to wire and test the Cool white set...

All LEDs on together (camera stopped down to be able to see properly)...

(The yellow wire is an earth - connected all the way to the plug earth and will be attached to the aluminium hood for safety in case of any wiring faults that may occur)

Full brightness over the tank...



My original ideal PAR calculations, incorporated the use of 30° lenses in order to direct the LED light efficiently downwards onto the plants. At this stage I hadn't installed them yet and it is quite clear that a lot of light is being wasted in all directions. The following composite photo shows the light spill of the LEDs by highlighting what little effect the main room light had when on or off! If you look at the carpet, you can see the bands of shadowing as the different rows of LEDs catch the edge of the sideboard...

I glued each individual lens on as the holders they come with did not offer a good enough fit, especially with the soldered wires in place. I discovered that stacks of 2p coins formed the perfect sized weight whilst the epoxy was setting. (I opted for epoxy as the chemicals in superglue can apparently fog up the clear lenses!)...

With all the lenses in place, the light spread is much more defined inside the tank with very little over spill outside..

Out of curiosity, I placed my phone into the bottom of the tank (35cm from the lights) and took a light level reading using it's inbuilt sensor...

38,000 lux; equivalent to sunlight! This was by no means a scientifically precise reading, but it was an excellent sign for me.

Before filling up with water and introducing plants, I was concerned that all of my careful wiring and expenditure was at risk of corrosion from the high humidity conditions. Therefore I decided to fabricate a 'light shield' from 3mm perspex sheet. I checked the specifications and light transmittance is 92% - I could afford to lose 8% light in order to protect my hard work. The shield is simply a box-like structure of epoxy jointed perspex, mounted to the aluminium with clear silicone sealant. I left the threaded rods long, that come from the handles above and allowed them to pass through the perspex by drilling holes. This gives me options to attach anything to the rods in future, and they do not interfere with the light spread...



Now the terrarium was safe and ready to start thinking about plants.
I placed some eggcrate in the bottom, in order to allow me to have a 'reserve' of water in the bottom of the tank for stability, humidity and for the ultrasonic fogger to use...

Here is the fogger in place. The eggcrate is elevated by a series of upturned 8cm net pots, which are rigid enough to hold whilst being fairly open to allow water to pass freely through...

Following Tom Bennet's tutorials, I was able to introduce a Raspberry Pi system into the terrarium, constantly monitoring temp and humidity and allow for the use of autonomous mains sockets.

Here is the 'powerhouse' (the raspberry pi)...

It reads temperature and humidity via an AM2302 sensor, connected via CAT5 ethernet cable (placed well out of the way of the splashing ultrasonic fogger!!)...

You can view live readings from my terrarium here...

The fogger is connected to an Energenie RF controlled mains socket, which is triggered by the Raspberry pi every hour at one minute past, for a duration of six minutes (day and night). This gives a boost to humidity, yet is unobtrusive and dramatically extends the life of the disc in the ultrasonic fogger as it is effectively only operational for 144 minutes in a 24 hour period. The constant RH monitoring means that the raspberry Pi can be set to trigger the fogger based on a desired humidity range, but I don't think this is necessary for me at the moment.

The last object I added to the system was a simple aquarium algae magnet, which sits permanently in the top left corner of the front glass. This allows me to wipe the front pane clear of any condensation if/when I want to be able to see clearly inside...

That's the whole setup so far. It's been challenging at times but very fun and extremely rewarding to learn along the way. I am more than happy with the results and the effect already on the plants living inside. My next post will show the plants inside.

Edited by Stu
Fixing pictures (photobucket!)
  • Like 4
Link to comment
Share on other sites

Ok, as promised here's a bit of detail about the plants that are currently in the terrarium and how they're doing.

The bulk of them are plants that have got an upgrade from my old inferior terrarium, others that I have had under lights and such around the house and more recently some seeds to germinate.

Firstly, some Nepenthes...

N. cv. 'Bill Bailey' - very dark colouring now on the pitcher!...

N. cv. 'Bloody Mary' - one of two stem cuttings really putting out new growth now...

N. cv. 'Suki' - growing rapidly after a leaf jump...

N. burbridgeae × campanula - after adjusting to the bright lights (leaves turning dark), it is now vigorously growing and putting out new pitchers...


There are also a few different Cephalotus clones in there:

Some great black colouration on this one, after being in the terrarium!...

Also purpley-black colour on this one...


One Utricularia at present - U. calycifida 'Lavinia Whateley', which is constantly flowering...


The biggest and most pleasant surprise for me, since transferring plants from the old terrarium to this new one, has been the development of a first 'true' leaf on my Heliamphora nutans × heterodoxa. It's the only Heliamphora I own and I've had it for two years where it's put out only a few juvenile leaves previously...



I discovered the terrarium can also be used as a very efficient way to germinate seeds. Having sowed some Sarracenia seed from 2015 a few weeks back, they have sat in my greenhouse under full sun and full water trays, but failed to show any life. Out of curiosity, I placed one pot into the LED terrarium and days later, they started to germinate!...

The ones in the greenhouse are now slowly starting to wake up but I may have to swap them in and out of the terrarium to kick start each pot.

Dionaea seeds from 2015 are also all germinating in the terrarium at present.


That's the plant load at the moment - I will eventually move the seedlings out when they are bigger, and as the Nepenthes get too large, I will have to consider moving them, propagating them back to small versions, or more likely; decide I need another, yet bigger and more technical LED terrarium! ;-)

For the future; I definitely need to get some more Heliamphora sp. and I am very interested in true miniature orchids (such as the ones @vincent grows) but have yet to obtain any. I would like to try a few mounted to the sides of the terrarium glass and see how they do in there.

Edited by Stu
Fixing pictures (photobucket!)
  • Like 1
Link to comment
Share on other sites

That's quite the exhaustive topic you made here. Its looks very clean, especially the LED setup with the black wiring. Not to mention the light shield ;).

Congratulations on your first adult Heliamphora pitcher too. I look forward to hearing more from your terrarium, especially from those lovely colourful Cephalotus.

Link to comment
Share on other sites

Thanks Vince.

Will be an interesting challenge to see if I can optimise the substrate and conditions to increase the Ceph growth rate - they colour up lovely but still pretty slow growing!

Also I need to keep an eye on temps - at the moment, in tank temp is topping 35°C at its highest. Don't really want it to get any higher and certainly not over 40°C!

I should set up some coding on the Raspberry Pi to notify me somehow (email?) if temperatures hit a certain threshold value. Also I need to eliminate those erroneous sensor readings from the logging. I'm guessing they occur due to noise interference on the sensor/wires? Just some way for the code to ignore those crazy readings would be fine.

Link to comment
Share on other sites

35/40°C seems quite excessive to me. I hope your plants are coping well with this heat.

Well, I'm no coder, so I can't really advise on a legitimate basis. But I can let you know how I did my own thing. It was easy to do with existing tools in Python. See here.

import email
import smtplib

msg = email.message_from_string('warning')
msg['From'] = "[email protected]"
msg['To'] = "[email protected]"
msg['Subject'] = "helOoooOo"

s = smtplib.SMTP("smtp.live.com",587)
s.ehlo() # Hostname to send for this command defaults to the fully qualified domain name of the local host.
s.starttls() #Puts connection to SMTP server in TLS mode
s.login('[email protected]', 'pass')

s.sendmail("[email protected]", "[email protected]", msg.as_string())


I created an email account just for the RPi, which sends two emails per day + any set up alerts (temperatures, lights, open door, etc.).

You just need to replace the '[email protected]' (sender's address), '[email protected]' (recipient's address), 'pass', and 'smtp.live.com' with the adequate email addresses, the password of the sender's address and the smtp mail server of the sender's address (easy to find on Google).

As for the erroneous sensor readings, you might consider saving the data only if it is a plausible one. For instance, an expected terrarium temperature could be comprised between 5°C and 50°C, so any data out of the range should be read again. Then, you could also take 10 readings, and make an average out of them to smooth the curve.

Link to comment
Share on other sites

Thanks for the help Vince. Seems simple enough so should be able to slot it into my system!

The latest erroneous readings show a temp of 15, which is not unusual for a terrarium range, but when it drops to this from a previous value of 35 and comes back up to 35 on the next reading, I know it is an error! At the same time, the RH reads crazy values such as 3500%. Therefore, it's probably easier to get the RPi to look at the RH readings and not log anything over 100%.

Link to comment
Share on other sites

Indeed, 15°C is not that odd. Perhaps, you can take several readings and get rid of the extreme values.

Or, unless you can induce a severe temperature drop, say by watering, you can also have something which could take into account the previous value, a bit as you've just implied.

About making an average, this is a piece of code that I have for my RH sensor:

def mcp3008Inputs(channel, probe): 
        Readout_sum = 0
        for i in range(1,1001,1):
             Readout = readadc(channel)
             Readout_sum = Readout_sum + Readout
	             Readout_avg = Readout_sum / 1000.000

As for the temperature (code freely adapted from Clément Lefranc's one):

def RoomTemp():
        RoomTemperature = W1ThermSensor(W1ThermSensor.THERM_SENSOR_DS18B20, "00000561f4f8")
        RoomTempValue = float(round(RoomTemperature.get_temperature(), 1))
        if RoomTempValue > 45 or RoomTempValue < -10  :
            return RoomTemp()
        print("Room Temperature: " + str(RoomTempValue ) + "C")           
        return RoomTempValue 

Maybe the simplest way would be getting the median of a list of readings.. Up to you, too many choices :).


Edited by Vince81
How come half of my message was deleted during the submission?!? Completed again.
Link to comment
Share on other sites

On 29/9/2017 at 2:49 PM, Stu said:

Have edited this thread so the pictures now show again.

Hello Stu, thanks for the photo, now we can see its.

I have a question about your heatsinks, which is it size? and another question about LED, what distance did you put from one LED to another LED on the heatsinks?

thanks again!

Link to comment
Share on other sites

On 02/10/2017 at 2:28 PM, _link_ said:

Hello Stu, thanks for the photo, now we can see its.

I have a question about your heatsinks, which is it size? and another question about LED, what distance did you put from one LED to another LED on the heatsinks?

thanks again!

The heatsink is part 1440HS from bal-group (Birmingham Aluminium). The profile is 300mm wide, 8mm thick at the base with fins rising to 40mm high. They do it to any length, so I ordered 755mm to perfectly sit atop my terrarium.

Hope that makes sense... you can see a picture of the cross section on their website.. http://www.bal-group.com/heatsink_detail/79

The LEDs are spaced approximately 50mm apart (horizontally and vertically in a grid).

Link to comment
Share on other sites

On 3/10/2017 at 5:04 PM, Stu said:

The heatsink is part 1440HS from bal-group (Birmingham Aluminium). The profile is 300mm wide, 8mm thick at the base with fins rising to 40mm high. They do it to any length, so I ordered 755mm to perfectly sit atop my terrarium.

Hope that makes sense... you can see a picture of the cross section on their website.. http://www.bal-group.com/heatsink_detail/79

The LEDs are spaced approximately 50mm apart (horizontally and vertically in a grid).

Perfect! very clear.

thank you very much Stu!

Link to comment
Share on other sites

  • 3 years later...

Wow. This project is insane! I would love to get on your level to be honest. I am a beginner when it comes to automation, but I am learning new stuff everyday. A friend of mine suggested me to buy some stuff from https://www.automationstop.com/ in order to try new things. I've ordered some components and now I am waiting for them to arrive. I want to create a structure made out of LED lights that is customizable. You can change the colors and even put text on it. I don't know if I will be able to succeed, but I am still going to try out!


Edited by PippaScott
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...