The Way Water Warms


I am so happy with my Raspberry Pi now able to obtain real-time measurements from the La Selva biological station. As much as this station measures, it does not measure water temperature. Time for some geeking out!



What I DO have

So the measurements I do get from the biological station are basically all the ingredients I need to synthesize the water temperature. Especially these values will determine the temperature:

  • Light Intensity;
  • Air Temperature;
  • Rainfall;
  • Previous Water Temperature.

I want to use some kind of calculation to create a synthetic water temperature. I’m assuming sunlight will heat the water. The water temperature will somewhat follow the air temperature. Finally rain will seriously cool down water.


Making up a formula to synthesize water temperature

Forming a formula that synthesizes water temperature is kind of hard to do. There are so many variables. In the wild, water will come flowing in from somewhere else. Deep water will flow slowly, and hardly heat up under sunlight. A small pool of 10cm of water will heat up extensively, unless it streams fast.

It is almost impossible to work with all these variables. So I figured to just build a simulation formula, and see how the water temperature will develop as I run through the days. I started out with a formula like this:


WaterTemp = WaterTemp + (Light/settings.get(“synth.lightFactor”))
WaterTemp = WaterTemp + (AirTemp-WaterTemp) / settings.get(“synth.AirTempFactor”)
RainDiff = Rain * ( WaterTemp – settings.get(“synth.rainTemp”) )
if (RainDiff < 0): RainDiff = 0
WaterTemp = WaterTemp - ( RainDiff / settings.get("synth.rainFactor") )


The first line will increase the water temperature from the last sample with (Light/factor). This is the heating of the water by the influence of sunlight.

The second line first calculates the difference between air and water temperature. The further apart, the bigger the effect will be. After dividing by a factor, I add this difference to the water temperature (this cal either heat or cool down the water)

The third line first calculates the difference in temperature between the water and the rain. Then I multiply this number by the number of millimeters of rain (more rain = more cooling). In case the rain is warmer than the water (should never occur), I do nothing.

Finally I subtract the calculated value from the water temperature divided by another factor. I use these factors to tweak and tune the simulation.


The result

I still have to look at the effect in a longer run, maybe import a few weeks of simulated data into excel and graph it out. So far it seems to behave pretty well… Simulated temperatures normally run from 24 degrees centigrade (early morning) up to 27.5 degrees centigrade in the late afternoon (4PM). Rain cools it down 1-2 degrees. When looking at heavy rainfall (like September 11th 2013 where there was over 70mm of rainfall in 1,5 hours), the simulation delivered a water temperature of 21.4 degrees centigrade. Not bad at all!

Paludarium Waterworks

I finally have all the stuff I need for the construction of all of the plumbing around the paludarium. So next was to decide where to place what. And that proves to be quite hard; I have less space than I initially anticipated…

How to place plumbing inside a cabinet

The first question was: How do I place all of the required plumbing in a cabinet while I’ll still be able to work on it properly without having to hang inside the cabinet all the time? The answer was to build everything onto a piece of multiplex and then placing the entire multiplex board inside the cabinet (and then connect up all of the hoses).

I ended up with something like this:

The wooden board where most of the plumbing will go.

The wooden board where most of the plumbing will go.

At the top left tap water will be connected via the hose laying on top. This hose will connect Read more »

Work in Progress: Getting the RaspBerry Pi to talk to the Canopy

In my previous post I managed to program the chips in the Canopy. Now I can adjust the code inside the Canopy where needed. Next thing to get working is to allow the Raspberry Pi to talk to the chips inside the Canopy.

Raspberry Pi, Atmel AVR and serial communications

Luckily the Raspberry Pi has a serial port, because the AVR controllers I used have one too, and they use this serial port to get commands from whoever is controlling the bus… Which should be the Raspberry Pi.

Problem is that the Raspberry Pi does not have a true RS232 serial port: the signals are there (on the GPIO headers), but they have 0-3.3V levels Read more »

Work in progress: Programming the Canopy

As I get closer to actually filling the paludarium with water, plants and eventually animals, I need to put a lot of focus on the electronics. The lighting armature on top, or as I like to call it, the Canopy is fully electronic. Without electronics the lights won’t even go on… High time to put some work into the Canopy to upgrade this piece of hardware to version 2.0.

First things first: Getting the code compiling again

Inside the Canopy I have 12 Atmel AVR controllers (ATtiny2013′s). These tiny controllers have been programmed in three flavors: LED, HALOGEN and FAN units. You guessed it, each type of controller has its own code. Luckily I programmed a single code, and when compiling this code I can tell the code which type it is supposed to compile. These little AVR controllers are programmed in C:


#include “main.h”
#include “serial.h”
#include “timer.h” Read more »

Hardware ‘n stuff ordered!

Today I finally ordered most of the hardware I’ll require for the further construction of the paludarium. Not computer chips this time, but pumps, filters, pipes, heaters and other cool stuff. In this blog post I’ll highlight some of the components that I’ve selected.

Aquatic Filter

Originally I used an Eheim 2222 external filter for Paludarium 1.0. However, this filter was already too small, so for the new Paludarium 2.0 it would definitely be too small, so I was in need of an upgrade. The price of the larger Eheim filters scared me a bit – So I decided to go for another vendor, JBL. They have a much cheaper filter line, the greenline filters:

The JBL Greenline 1501e external filter

The JBL Greenline 1501e external filter

I bought their 1501e version, which outputs an impressive 1400 litres per hour and Read more »

Raspberry Pi – Fetching live meteorologic data from the web!

In version 1.0 of the paludarium, I had fetched an entire year of data, and I put that into the controlling software. That software in turn simulated that year of weather over and over again. But wouldn’t it be the coolest thing if I managed to pull the meteorologic data live from the web? With the Raspberry Pi I figured it should be possible. Todays goal was to fetch live meteorologic data from the La Selva biological station in Costa Rica. After some fighting with basic Python, I managed to get it going!

Where the data is

The data is actually freely available here: http://www.ots.ac.cr/meteoro/default.php?pestacion=2.

La Selva Biological Station in Costa Rica - Home of the meteo station who's data I'll be using!

La Selva Biological Station in Costa Rica – Home of the meteo station who’s data I’ll be using!

I found out you can build a URL that will fetch half-hour data for one entire day. As an example: Read more »

Some major surgery – Cracked glass, the sequel… (part 2/2)


Today, the glass divider was replaced for free by Ruud from terrariumhuis.nl. Here’s how it was done.



Placing the new glass divider

First thing to do was to make sure all silicon glue was properly removed that was still there from the old cracked divider. Then a new piece of glass was cut to size. At each side it was kept around 1,5mm too short, to allow for the silicon glue to sit between walls and divider to prevent it from cracking again.

Then silicon glue was applied to the base of the divider, and the divider was placed inside. Next, the sides where glued and the divider was fixed with a piece of tape to dry.

The new glass divider is glued in place and looking good (and no cracks this time :) )

The new glass divider is glued in place and looking good (and no cracks this time :) )

Within a few days I’ll start to fill the paluarium with water for the first time, to make sure all is water tight before I start glueing in other stuff.

The first two hours playing with Raspberry Pi

Unbelievable what can be accomplished in only two hours. Today I finally unpacked my Raspberry Pi and started to play with it. Pretty soon I had it up and running… This is going to work out just fine :)

The Raspberry Pi. This will be the new brains behind the Paludarium v2.0!

The Raspberry Pi. This will be the new brains behind the Paludarium v2.0!



Getting the Raspberry Pi to boot

I just typed up the downloads page at raspberry.org, found the tool to Read more »

Some major surgery – Cracked glass, the sequel… (part 1/2)

After I applied the fix to the cracked glass divider inside the paludarium, I noticed… Another crack in the same divider, but now on the other side. I had had enough. More drastic measures were needed… But how to go about that? Luckily, the supplier that built the glass paludarium stepped up and offered to help!

How to fix this issue for good

I figured it would be virtually impossible to remove the glass divider and glue in a new one. I needed more knowledgeable advice. So I contacted the supplier of the paludarium that originally built it for me, Terrariumhuis in Rotterdam. They gave me some good advice on how to apply a fix, but even better: They offered me to replace the glass divider free of charge! Read more »

Paludarium Feed-throughs mounted

After the cracked glass of the paludarium was fixed, I could continue to mount the feed-throughs. This is a vital part to build before any water can be put into the paludarium, as right now there are some huge holes drilled in the glass bottom :O

Different types of Feed-through

There are several types of feed-throughs planned for the paludarium:

  1. Feed-throughs feeding through the back that will run into the waterfall (3x);
  2. Feed-through feeding through the back for cabling;
  3. Feed-through in the bottom where the filter will draw dirty water from;
  4. Feed-through in the bottom where waist water will stream from into the sewer.

All the feed-throughs have rubber rings in order to make them watertight. I applied some vaseline to the rubber rings which will help to make them waterproof. Read more »