Monday, 22 October 2012

Fish tank Part 2

Ok some more about the fish tank.

Why settle for a manual control of the fishtank lights when you can automate it?  (OK there's a bunch of valid reasons, but we're hackers so you already know where this going)

Just by adding a simple Arduino controller, a little bit of hardware, and a little bit more software we can provide the following features:

  • Tank lights turn on automatically at sunrise/sunset,  with a gradual turn on and turn off.  Plants and fish apparently like this. 
  • Monitor the temperature of the tank and sound a warning if it gets too low or too high.  Even though its a 100W heater in a 400 litre tank, a stuck thermostat could make things uncomfortably warm for the fish.  This doesn't require any changes to the thermostat - but if we want to take over temperature control we can do that too with a Solid State Relay connected to the heater. (We can still set a maximum temperature using the heater builtin thermostat, the controller will then have a temperature range of ambient up to the maximum set by the thermostat.  Changing temperature and/or other water parameters can be used to trigger spawning in some fish) 
  • Turn on blue 'moonlights' during the night, so you can still see the fish but it's not a bright.  Looks cool, but the plants won't care.  For bonus points, have the intensity vary over the night and over days to signify the moonrise/moonset times and the phases of the moon, using some almanac equations and a real time clock. 
  • Sound reminders when its feeding time, just in case we forget 
  • A small LCD with a few buttons, or a touch LCD can improve the useability.

A 12V LED string can easily be PWM controlled from the Arduino using the built in PWM features, and a power MOSFET, or bipolar transistor.  A timer just needs a simple RTC chip that interfaces with just 2 wires.

Future enhancements could include the following:
  • Control over the filtering system to run different pumps at different times of the day or to turn them off during feeding time
  • Control over the heater elements (already mentioned)
  • Control of an automatic feeder. A servo motor and a sensor or two could turn a small food hopper at a certain time every day, dispensing a fixed amount of food. Mechanical design could be tricky, this would work well for pellets but probably not well for flakes, which is the actual food I use in this tank.
  • Water condition monitoring - e.g. turbidity, salinity, pH, etc.  Not worth it for this tank, but might be worthwhile if we had a marine reef tank.
 Someone's already written software that does all this - with the Jardiunio Aquarium Controller.  Video here. That looks like a great system but is more designed for large marine tanks - plus it needs an Arduino Mega, and I'm trying to keep this small.  I might end up building a Jarduino Mini, if I can get it all to fit into the smaller flash of the 328P.

Steve

No comments:

Post a Comment