I've had a little more spare time then usual and have gotten into tinkering with electronics. So, I built myself a fishtank monitoring system and heater controller. Over time, the project had serious scope creep, but in the end, I think it came out pretty cool.
What is this thing?
Well, it started out as a heater controller. The idea was to try to keep the tank temperature a little more steady than the cheapo aquarium heaters. Then I decided to add data logging. Then I found out flow meters are pretty cheap. Then, eventually, I was limited by the memory of the microcontroller, so I had to stop.
I had two design goals:
- Maximize safety for the fish
- Look cool doing it
The system has multiple redundancies. In the photo above, you'll notice three temperature probes. Voting logic is used - if one guy is out of whack, show an error and ignore it. Otherwise, take the average. I'm going to use aquarium heaters (as opposed to heating elements) as an additional level of safety. The box can really only fail in two ways - heaters on when they should be off, or off when they should be on. If the heaters stay on, the temperature wont rise any higher than the heaters themselves are set to (the situation would be identical to just plugging them in to the wall). I'll keep the set heaters a degree or two above nominal temperature. If the heaters go off, there could be a third heater, not plugged in to TankBrain and set a degree or two below nominal temperature.
Additionally, I'm measuring the heater current. If current is flowing when it shouldn't be (because the relay in TankBrain is stuck), it will show an error. If current is not flowing when the heaters are on, show an error for a broken heater.
Errors also persist until manually cleared, so if something happens at four in the morning, I'll know.
- 3 Temperature probes
- Two 500W heater channels
- One 500W chiller channel for a home brew chiller I'll make come summer time
- Current measurement on the 2 heater channels
- Flow meter
- Data logging to non volatile memory (settings, temperature and flow data aren't lost if we lose power)
- Can also transfer data to a PC via USB if I want to make graphs or do other analysis
- Joystick for control
- OLED screen - this looks a lot better in real life than in the pictures
- 2 settable timers to remind me to clean the prefilter and filter
Here's what the main screen looks like. Time/mode info on top. Then temperature, flow and status below.
Here's another shot of the main screen with an error (in this case, because the flow meter is unplugged). Also, the circle R icon shows the right heater should be on.
Error screen - shows which errors have occurred. Also shows when its time to clean the filter.
Reset screen - allows you to clear errors and data in memory. This scrolls down,
Settings screen. Almost everything is adjustable. 16 menu items.
Temperature Screen - shows values from the three sensors, delta between them, what TankBrain thinks the current temperature is, room temperature, and some records. The numbers aren't right because I've been messing around with it for testing.
Heater screen - shows heater status, current and power. Currently reading zero because the heaters arent plugged in.
Temperature graph. Midnight on the left, vertical line at the present time. Shows a data point every 12 minutes for 24 hours.
Oops, looks like you can only attach ten images... I'll add another post tomorrow with a picture of the flow graph and a bunch of info about how it works under the hood.