NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » Reef tank controller

August 01, 2010
by jimstickney
jimstickney's Avatar

I have a small reef tank (a fish tank where I keep both fish and corals). For my animals to thrive, they need a very stable environment. I currently use a hodge podge of different controllers i.e. timers for the lights and fans, a thermostat for the heater, and a wave maker (a timer that switches a pump on and off ever few minutes). There are commercial controllers for around $500, but I think I can build one using my Nerd kit.

I think I've figured out nearly everything I need to use a MCU to control my tank. ADC for reading temperature (and maybe PH). PWM for controlling fan speed and led moon light brightness. Relays (solid state?) for switching pumps and lights on and off.

My current problem is that I'm very quickly running out of pins on the MCU, so I think I need to use several MCU's for my project. I'm not sure the best way to do this.
Which communication protocol should I use?

What I'm thinking now is to use SPI with: a master controller, a slave for measuring the tank parameters (maybe 3 temp probes for now), and a slave that turns the lights, pumps, and heater on and off.

Thanks, Jim

August 02, 2010
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Jim,

SPI is a great way to communicate between different MCUs. It is for the most part pretty easy to use and reliable. Are you still running out of pins even without using the LCD? While 3 temp probes some lights and some pumps might be alot to keep the MCU, busy, I think you can manage to wire them up with the 17 pins available. Unless there are a whole bunch of motors and lights.

Humberto

Post a Reply

Please log in to post a reply.

Did you know that LEDs (light emitting diodes) only conduct current in one direction, like normal diodes? Learn more...