Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Newbie question: Reef Tank Controller?


  • Please log in to reply
10 replies to this topic

#1 Johnny

Johnny

    New Member

  • Members
  • Pip
  • 2 posts

Posted 28 April 2011 - 06:53 PM

Hi all, I don't have a netduino, yet. I have an idea for a project, which if it's practical, I'll buy one. If I can get some opinions from you guys can verify this, I'd appreciate it. My background: I can write code (pro PERL developer) so I'm not afraid to learn the nuiances of coding the device. I can solder, and have built a 120v project that works, and didn't electrocute myself. I can wire basic lights, switches and understand serial/parallel effect on voltage. I'm a DIY kind of person, and not afraid to research/experiment. That said, please pardon my ignorance when I speak of electronics, I'm sure I won't use the correct terminology. My project idea: To build a control unit for my reef tank. I'd like it to have an LCD display and/or a web server interface. Sensors: PH meter thermometer What it needs to control: - Two dosing pumps (120v) (one each to dose PH up, PH down) - Two lights on different schedules (120v) (each based on a 24 hour schedule) - Two water pumps (120v) which can be controlled on a timer - 120v accessory (fan or water chiller) which can be controlled based on the thermometer sensor input. - LCD screen with a few statistics, and/or a simple web server. Logistics: I'd like the ability to save the configurations, in case of a power outage. Either battery backup, or save it to memory. If web server is possible, it would be nice to have a wifi adapter, but I can also hardwire with a CAT5. Assumptions: The Netduino could read the input of these sensors, use my own logic, and send signals to relays that will switch my 120v items on and off. My questions: 1) Is this something that the Netduino would be well suited for? 2) Is this something I can assemble on my own, without a pre-existing intimate knowledge of electronics? This seems to be more of an electrician's job with some logic turning the switches on and off. Thank you, in advance, for reading this and your consideration in answering. =) Johnny

#2 Dan Morphis

Dan Morphis

    Advanced Member

  • Members
  • PipPipPip
  • 188 posts

Posted 28 April 2011 - 07:31 PM

../
My questions:
1) Is this something that the Netduino would be well suited for?
2) Is this something I can assemble on my own, without a pre-existing intimate knowledge of electronics? This seems to be more of an electrician's job with some logic turning the switches on and off.

Thank you, in advance, for reading this and your consideration in answering.


Welcome to the community Johnny! There is no reason you can't do this. I'm not terribly good with electronics, but I've managed to design a circuit to read data in via TTL serial, twiddle and LED or two, and toggle some relays.

For your sensors, you will need to verify the voltage levels they output. Unless you buy super spendy sensors, your sensors are going to output an analog voltage. You will want to make sure you either a) get sensors who's range is 0-3.3v (easiest method), or B) use a voltage divider to get the analog signal into the 0-3.3v range. Anything outside of that, and you will burn up an analog pin on the Netduino.

For driving a relay, this circuit on the Arduino site will work. The safe way to design this is have the relay switch on and off the hot wire (black in the US). I would use a power receptical like this one that way the end-device isn't hardwired in. And then use a power entry module like this to get power into your system.

Provided the total load doesn't exceed 10-15 amps (which I doubt it would given what your driving) you can have one power entry module feeding multiple power outlets. This is how I wired up the add-on relay board for my CNC machine.

Getting started with all this stuff, I would buy everything under the "Prototyping" header of the getting started article. Get a pack of NPN transistors and a pack of resistors (suppliers linked to in the article). Everything in the prototyping section I personally have purchased, except for the male-to-female jumper wire pack and can vouch for how much easier the jumper wire makes things.

For a display, you can either use a HD44780 compatible display, it will cost you 6-7 pins on your Netduino though (the HD44780 can be run in 4 bit or 8 bit mode, the big difference being in 8 bit mode you need 4 more microcontroller pins, I run mine in 4 bit mode). Or you can also use a serial LCD. This one only requires 1 pin from the Netduino, but its $10 more expensive.

For the web server portion, search the forums. One of the regular contributors has posted working webserver code.

Any other questions, just ask in the appropriate forum, everyone here is very friendly and always willing to help!

-dan

#3 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 29 April 2011 - 06:02 AM

Sensors: PH meter

I am just curious: what pH sensor are you going to use?

#4 Michel Trahan

Michel Trahan

    Advanced Member

  • Members
  • PipPipPip
  • 155 posts

Posted 29 April 2011 - 01:23 PM

I see another type of usage ... hydroponics :)
Started with C in 1985, moved to Vb3 ... to vb6 and stopped. Now started with .Net and learning C# and VB.net and wishing VB.net was on MF !

#5 Johnny

Johnny

    New Member

  • Members
  • Pip
  • 2 posts

Posted 30 April 2011 - 04:36 PM

Dan, Thank you for your very informative and detailed reply. I'm digesting all the info you gave me, and will place my orders today! I'll be back with tons of questions. =) CW2, I'm not sure which PH sensor I'll use yet. I'll be looking into that shortly. Do you have any recommendations? Michel, for all intents and purposes, yes, this project would be identical to a controller for a hydroponic system. Short of monitoring/adjusting humidity and sensing total dissolved solids in the solution. My reef setup, though small, is very technical. I have a main display tank and two refugiums. Each on their own light cycle. Techincally, I have more refugium space than display tank space. The refugiums have plants that grow and waste oxygen in the water while the lights are on. with a creative light cycle, I have a light on in the system somewhere, at all times. This helps even out any PH swings and saves my rare and precious corals from stressing. This system is set up so a lazy person (me) can enjoy it without all the headaches of a reef system. I travel for work twice a year for 2 weeks at a time. Aside from having my sister turn on my RO/DI unit once in the middle of that trip, the system has always survived (3 years). However, I'm so paraniod and scared that it will go down, I'd really like a web based monitor/controller.. If I HAD to dose PH up or down remotely I could. For the most part, the system is stable, but who knows what could happen while I'm away. Plus I'm a nerd and see an opportunity to build something fun! Perhaps I'll build a hydroponic system next. That sounds like fun, too!! Ok, I'm going to order some stuff to get started! Thanks guys!

#6 JonnyBoats

JonnyBoats

    Advanced Member

  • Members
  • PipPipPip
  • 155 posts
  • LocationPhillips, ME

Posted 30 April 2011 - 11:40 PM

My reef setup, though small, is very technical. I have a main display tank and two refugiums. Each on their own light cycle. Techincally, I have more refugium space than display tank space. The refugiums have plants that grow and waste oxygen in the water while the lights are on. with a creative light cycle, I have a light on in the system somewhere, at all times. This helps even out any PH swings and saves my rare and precious corals from stressing. This system is set up so a lazy person (me) can enjoy it without all the headaches of a reef system.


WOW! Any chance of seeing some photos?

#7 H07R0D

H07R0D

    Advanced Member

  • Members
  • PipPipPip
  • 95 posts

Posted 01 May 2011 - 06:49 PM

Hi Johnny!
I'm actually building the exact same thing as you're looking to do. I'm only a wee bit further into it than you are.

I've just recently got my code to a point where things are actually compiling. I setup my system to handle "Plugins" for the controller. So once I get the main control working solid, I can toss extra assemblies onto the SD card, and add features quasi-dynamically.
Currently I've got a temp sensor input plugin, and a logfile output plugin.

As for the pH, I've been banging my head for the best way to do it. This looks pretty good

Anyway, any luck I have I'll mention here, and if you want to see how mine's going, check the sig.

Cheers

#8 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 02 May 2011 - 08:12 AM

CW2, I'm not sure which PH sensor I'll use yet. I'll be looking into that shortly. Do you have any recommendations?

Well, I don't have anything specific to recommend - the pH meter I am working on is supposed to be a part of a swimming pool data logger, for me the most tedious task is to select a suitable pH probe. Initially, I was thinking about an ISFET probe, but I could not find any for reasonable price here - industrial probes are way too expensive, as is an ISFET pH meter, which I could eventually take apart; and it still requires a reference electrode. So, I am going to get the cheapest pH meter with a (replaceable) combination glass electrode. But in my case, there is no life depending on it ;- )

For the electric part - pH meter is basically a millivoltmeter - I will probably use circuit similar to phduino, or any of the referenced projects. My priority is to have an op-amp with minimum external components (i.e. I might 'cheat' with two batteries to avoid voltage inverter etc.). For automatic temperature compensation I am going to use DS18B20 1-Wire digital thermometer - it is not cheapest, but it is precise (factory calibrated) and easy to work with, and is also suitable for immersion (unless I am missing something, most cheap pH meters I've seen have ATC wrong - they use environment temperature, but to compensate for the pH probe temperature error, the temperature of the probe tip has to be known).

#9 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 02 May 2011 - 11:11 AM

For automatic temperature compensation...

I forgot to mention that I probably would not need to include ATC in the final project, as the meter is intended to operate in range 7 ±1 pH (slightly alkaline water, 7.4 - 7.6 pH) and there is virtually no temperature error around 7 pH (an isothermal intersection for an ideal electrode). But I will have the water temperature anyway and I am really curious about ATC significance, so I'll do some experiments for the sake of education Posted Image

#10 Dan W

Dan W

    New Member

  • Members
  • Pip
  • 5 posts

Posted 14 May 2011 - 05:06 AM

I have been running a reef tank for 13 + years and have the final product you are making for 3 years in what is called an Aqua Controller Jr. Having both a Netduino plus and and the aqua controller jr I would just purchase the finished product based on cost and quality unless you just want the challange. I strongly suspect it is adunio based with a network card. The Netduino plus would be more than capable for the job and I'll bet the pH pen and most of the extra hardware will directly work with the netduino. I will experiment with it some and see what will work with some old spares. Dan

#11 swamplander

swamplander

    New Member

  • Members
  • Pip
  • 9 posts
  • LocationSt Johns, FL

Posted 23 September 2013 - 10:40 AM

Johnny- Any chance you finished this project off? I'm looking to do something similar. I could get an Apex like what DanW suggests, but I'd like to have a little fun with this. 

 

A minimum, I'd like to have probes to monitor:

> temp

> ph

 

But a stretch goal would be to monitor:

> ammonia

> nitrates

> float switch to monitor water level

> ability to control the power on my lights (also a DIY setup)

 

Curious what probes you got or where you got them...






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.