Reef Central Online Community

Home Forum Here you can view your subscribed threads, work with private messages and edit your profile and preferences View New Posts View Today's Posts

Find other members Frequently Asked Questions Search Reefkeeping ...an online magazine for marine aquarists Support our sponsors and mention Reef Central

Go Back   Reef Central Online Community > General Interest Forums > Do It Yourself
Register Blogs FAQ Calendar Mark Forums Read

Notices

User Tag List

Reply
Thread Tools
Old 01/05/2008, 01:50 PM   #1
Dustin_p
Registered Member
 
Dustin_p's Avatar
 
Join Date: Mar 2007
Location: South Dakota
Posts: 101
Lightbulb Software development for an all in one controller

I have bee thinking about developing a reef controller using a PC.

The cost of the hardware would be fairly inexspensive and would hopefully be able to offer the program to everyone as freeware!

I just need some ideas.

First what should the program control?

Lights, heater, ORP, Co2???

I think I would probably have charting features and other various things.

I think some of the control systems might need to be redundant to avoid disaster....


Maybe this has already been done, I'm not sure. If so lets improve on it.


Dustin_p is offline   Reply With Quote
Old 01/05/2008, 02:48 PM   #2
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,771
Dustin,

I have done exactly what you are looking for...

The platform was orignally VB, but I migrated the application to VB.NET. The core of the program was complete and I was adding "features" when I decided to scrap the project.

My software worked with

X-10 outputs
PCI/ISA I/O cards (NUDAQ, 96 bit)
1-WIRE
USB (Phidgets, activewire)
and a few other things.

I never built some of the specialized PC boards for current monitoring (per device) and other things like that.

PH, ORP, SG, Lumens, sunrise/sunset, moonrise/moonset, web interface, alarms for just about any situation, SMS messaging and voicemail, DTMF control and telephone based reporting (call in and get system status over the phone). And a dozen other things.

Here is the bottom line... The more complex the program became the more clear it became that stability would be an issue, as well as maintenance and upkeep of the code and hardware.

I have since abandoned the project in favor of an AVR based light controller with a stand alone temperature controller and other stand alone devices for monitoring and reporting.

If you go the PC route, I would suggest monitoring only and leave the control up to dedicated devices or a regression tested controller


BeanAnimal is offline   Reply With Quote
Old 01/05/2008, 04:49 PM   #3
Dustin_p
Registered Member
 
Dustin_p's Avatar
 
Join Date: Mar 2007
Location: South Dakota
Posts: 101
Well that in a nut shell is what I was going to do in VB.NET.

I think I might just go with some stand alone systems then.

Do you still have the VB code??

Might be something to look at


Dustin_p is offline   Reply With Quote
Old 01/05/2008, 05:54 PM   #4
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,771
I still have the code... I am am not sure it is something I am willing to share in its entirity though. The Sunrise/Sunset and Moon phase calculations where adapted by me and took a LOT of work and research. The DTMF, SMS, TCP/IP, TAPI, and other interfaces are based on referenced 3rd party controls that I can not distribute. I also put a LOT of work into the real time threaded event scheduler (adapted from some code found on the web).

I may pick the project back up one day, but for now microntrollers have my interest. I am using an Atmega128 with BASCOM-AVR as the language/IDE platform. I have about $300 in the current project and intend to have it up and running within 60 days. It is 50% finished now but I am working on the touchscreen code, a little bit at a time.


BeanAnimal is offline   Reply With Quote
Old 01/05/2008, 06:55 PM   #5
dixonjk
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 97
Me Too

I am currently building a control system for my tank. I am using LabVIEW. If anyone is interested let me know and we can work together. I can show you were to get the software cheap. I bought all industrial electronics from Ebay. And I dont care who gets a copy after its finished... its not an FBI project!


dixonjk is offline   Reply With Quote
Old 01/05/2008, 07:34 PM   #6
jcm2m9
Registered Member
 
Join Date: Apr 2005
Location: Overland Park, KS
Posts: 507
Re: Me Too

Quote:
Originally posted by dixonjk
I am currently building a control system for my tank. I am using LabVIEW. If anyone is interested let me know and we can work together. I can show you were to get the software cheap. I bought all industrial electronics from Ebay. And I dont care who gets a copy after its finished... its not an FBI project!
I would be very interested in the LabVIEW code. I have some experience using LabVIEW in a few classes that I took.


__________________
James
14g Biocube that is no longer AIO. I have added a 20g sump, EuroReef RS80, Reef Angel Controller, DIY Led's, MP10, kalk drip, Quiet One Return Pump, 150w heater, custom stand.....
http://www.reefcentral.com/forums/showthread.php?t=2054516

Current Tank Info: 14g biocube that is no longer AIO
jcm2m9 is offline   Reply With Quote
Old 01/05/2008, 09:42 PM   #7
rsw686
Registered Member
 
Join Date: Mar 2007
Location: VA
Posts: 549
BeanAnimal I agree with you that the VB.NET project was too complex and could pose stability issues. Personally I wouldn't want my reef tank running off a Windows box with the .NET language which is interrupted at runtime. That's just too many levels for comfort.

I would take a small linux or freebsd distro with controller software written in C. You could use a WRAP board, commonly used for small appliances like routers (pfSense project), which are reliable, use little power, and have no moving parts.

http://www.pcengines.ch/alix.htm


__________________
The Reptile File Forum (Google It)
Discussion forum dedicated to geckos, lizards, snakes, turtles, amphibians, and other reptiles.

Current Tank Info: 90gal reef w/ 20 gal sump, Aquactinics TX5, Octopus NW150, AquaController Jr.
rsw686 is offline   Reply With Quote
Old 01/05/2008, 11:08 PM   #8
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,771
No dixon, it is not an FBI project... On the other hand, some of the code is fairly advanced and took a lot of work to write. I am not sure that I have aspirations to profit from the code, but I certainly do not want to give it to somebody else so that they can.

I give plenty away for free as it is...

Several folks here use LabView on a daily basis. Some use PLCs and others custom built micros. As I mentioned, my current controller is based on an AVR. The interface is a touchscreen. For the time being it only does sunrise/sunset (on off, 0-10V dimming). As I expand the software, it will do much more, including temperature, PH, Feeding, dosing.... etc.

RSW... I am not big on C anymore. It is powerful but I still can't stand it I am also not a linux fan. BASCOM is pretty damn powerful and if I need to do more, I will use ASM. I


BeanAnimal is offline   Reply With Quote
Old 01/06/2008, 07:11 AM   #9
dixonjk
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 97
I am not sure how someone could profit from the code really. I assume it would be hardware specific and coudl only be used as an example to help others. I want to add a touch sreen too! Do you have any pictures of your setup?


dixonjk is offline   Reply With Quote
Old 01/06/2008, 07:57 AM   #10
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,771
Much of the code is NOT hardware secific. The solar and lunar calculations could be easily ported to numerous platforms. Moreover, I have compiled mine into a DLL that could be used across many platforms. The VB.NET GUI was designed to be used with a standard 800x600 LCD touchscreen as found in POS systems. In a PC based system, a standard LCD toucscreen will respond to mouse clicks. The idea is to make the buttons large enough to be useable with a finger.

Here is an early screenshot

You can see timer events for
Astronomical Twilight Begin
Nautical Twilight Begin
Civil Twilight Begin
Official Sunrise
Solar Noon
Official Sunset
Civil Twilight End
Nautical Twilight End
Astronomical Twilight End

As well as configurable set of intervals between each event. Each event can be assigned to any number of functions, including on/off for specific relays or dimming steps/stepper motor positions.

The new toucscreen is much smaller. 240x128
www.ledsee.com

No photos of the project yet.


BeanAnimal is offline   Reply With Quote
Old 01/06/2008, 12:00 PM   #11
dixonjk
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 97
Very nice! I did not realize who you were at first. I seen the pics of your tank on a post you made about stand pipes. I had alwasys wondered is the network type rack of wires in that pic was for the tank, I assume its not?

Have you heard of Adam modules? Thats what I am working with now. I am thinking about getting the LabView SCADA pacage, I think it may be the best way to make a full graphic control?

by the way I have tried to send you a message before but your box is always full.


dixonjk is offline   Reply With Quote
Old 01/06/2008, 12:56 PM   #12
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,771
The rack has nothing to do with the tank. It is a termination point for the Cat6 cabling in the house. This panel feeds the phone system (currently an Avaya Partner ACS that will be upgraded to a Cisco IP phone system) and the ethernet network in my home. It also holds the phone system, ethernet switch, DirecTV multiswitch and distribution panel as well as a power distribution module for UPS power to the network equipment.

Yes the ADAM modules are nice. LabView can get expensive but it is nice software. There are a few dozen SCADA packages available. Some are MUCH more graphics friendly, but very spendy. I am bidding a job with one such system right now. I will get the name of it when I get home... it may be worth looking into for ideas.

Box full? Yeah, the hate mail piles up as fast as I can delete it!


BeanAnimal is offline   Reply With Quote
Old 01/06/2008, 02:19 PM   #13
dixonjk
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 97
If you want a cheap source of LabVIEW, email me at dixonjk@earthlink.net. Thats quite a fancy network system for a house! I want one!


dixonjk is offline   Reply With Quote
Old 01/06/2008, 03:03 PM   #14
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,771
Not really that fancy... when I rewired the house, I pulled a few CAT6 and RG6 runs to each room. I am an IT consultant by trade and build network infastructure for a living anyway

The Home Theater wiring is much more "fancy" and was done with mini RG59 cable (Belden 1855A) and some fairly nice speaker wire and other signal cabling. It terminates in the theater rack adjacent to the other wall of the room.


BeanAnimal is offline   Reply With Quote
Old 01/06/2008, 03:12 PM   #15
dixonjk
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 97
I must have $700 in Monster cable on my TV, I assume it made it sound better!

I am looking for soem 3-phase motors and can not find any small ones. I am wanting to convert a Hammerhead for my main pump and a Dart for my skimmer pump. Can you tell me where to get them?


dixonjk is offline   Reply With Quote
Old 01/06/2008, 03:22 PM   #16
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,771
I will not comment on the cable other than saying that as long as you are happy with it, then all is well If it is lamp cord or Kimber cable... the only thing that matters is the happiness of the guy who paid for it.

As for the 3-phase motors... I don't have any great sources other than searching eBay and using google


BeanAnimal is offline   Reply With Quote
Old 01/06/2008, 03:28 PM   #17
dixonjk
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 97
Well the cables are nice and pretty atleast! And I had a BestBuy gift card... I would not pay that much for cables otherwise.


dixonjk is offline   Reply With Quote
Old 01/07/2008, 05:11 PM   #18
Darroll
Registered Member
 
Darroll's Avatar
 
Join Date: Jul 2005
Location: Newport News, Va
Posts: 358
When I was in the Air Force I wrote a program to calculate the sunrise and sunset and although I don't have the code anymore I can tell you that it is a comon algorythem on the net. Some only work for certain hemispheres. Here is a link that you can grab the source code from several different languages. If you need help converting it to C# I can help.

http://www.sci.fi/~benefon/stuff.html

I'd be interested in a plugin based web application that was open source. I am a C#/.Net programmer by trade.


__________________
ME == Still Learning

Fish are friends, not food

Current Tank Info: 75g w/ 20g sump, 250w MH 10K, 2x65 actinics, ~40lbs LR, Coralife Super Skimmer 220
Darroll is offline   Reply With Quote
Old 01/07/2008, 09:18 PM   #19
dixonjk
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 97
For my X10 home automation program there is a plugin that links to a news type website that will give you the sunrise-info.

I guess everyone has seen this http://www.automatedaquariums.com/ ? They have opensource VB software, you just have to buy it.


dixonjk is offline   Reply With Quote
Old 01/07/2008, 09:39 PM   #20
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,771
Darroll, thanks for your service.

Yes, there are several common methods to calculate the position of solar objects. Most of the common ones get pretty fuzzy at certain times and locations.
http://www.bodmas.org/kepler/sunrise.html
http://www2.arnes.si/~gljsentvid10/moonrise.html
http://www.stargazing.net/kepler/moon.html
http://www.skyandtelescope.com/resou...e/3304911.html
http://www.bythom.com/calculate.htm
http://personal.inet.fi/cool/jjlammi/stuff.html

I have about 200 more links... many of them good.

You can also cheat and scrape the data fron the USNO website. They even have publish information on exactly how to do it.


BeanAnimal is offline   Reply With Quote
Old 01/07/2008, 10:51 PM   #21
customcolor
Registered Member
 
customcolor's Avatar
 
Join Date: Dec 2006
Location: kaukauna, wi.
Posts: 3,879
y cant you use a Serial Port Relay Board and a simple program that most people provide to do the timmers with out the sun and moon thing going on. i have seen some programs that can do at 1 sec intervals.


__________________
PLEASE DONT USE GREAT STUFF (THE YELLOW STUFF) IN YOUR TANK........USE POND FOAM (THE BLACK STUFF).. I BEG YOU!

Great stuff====$5 a can
24-48 hour cure
Epoxy to cover it====little as $5 for small projects or up to $100+ for larger projects
and another 24-48 hour cure
I hope you covered it well cuz if you didnt it will start to break down in a few months
sand is another added cost to cover up the yellow.

Pond foams====$9-$15 a can
24-48 hour cure
DONE! You can cover it with sand if you want to (YOU DONT HAVE TO) though but thats added cost again

Current Tank Info: 75 gal under way
customcolor is offline   Reply With Quote
Old 01/08/2008, 04:36 AM   #22
Icefire
Seasoned reefer
 
Icefire's Avatar
 
Join Date: Jan 2007
Location: In Quebec, Canada
Posts: 3,653
Unless you have an independant controller, a PC controled tank will never work as as soon windows is gonna crash our you gotta have a reboot, your tank will close.


__________________
Temp 80F, PH 8.5-8.0, Alk 6.8-7.2, Ca 430, Mg 1700, NO3 0-0.25, PO4 0.04, 34.4 PPT
Lights @ 100% all others, 35% White

Current Tank Info: 60g Cube, 120lbs live rocks, Hydra52 2x120W, 2 MP40+ 1 MP10 @ 70%, Phosban 550 GFO+Carbon, 200W Heater, SWC Skimmer, Kalk ATO, 150 gpd RODI
Icefire is offline   Reply With Quote
Old 01/08/2008, 06:11 AM   #23
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,771
A dedicated windows machine is not that bad. I have systems up for months at a time without a crash or reboot.

If you want to use a PC, you should be looking at a MiniITX motherboard with a Core2 CPU and intel chipset.

On the other hand, a dedicated microcontroller is magnitudes more reliable.


BeanAnimal is offline   Reply With Quote
Old 01/08/2008, 06:16 AM   #24
Darroll
Registered Member
 
Darroll's Avatar
 
Join Date: Jul 2005
Location: Newport News, Va
Posts: 358
I've been programming on both linux and windows for years now (since 95) A properly configured install of Windows XP or 2000 is as stable as linux, though a dedicated controll board would be better.

For a cheap way of doing automation look into x10. They have a module that will run macros while the computer is off. Just create a program to update that box with updated times etc.

There was/is a forum where people were creating/talking about a dedicated controller. RC3A forum. These things don't ever seem to take off. I'm guessing that those that can do it don't want to give away their hard work. Glad programmers aren't like that.

Also if you don't like X10 look into Phidgets but they don't have a stand alone board. also look into the link below.
http://www.automatedaquariums.com/

Hope this helps someone.


__________________
ME == Still Learning

Fish are friends, not food

Current Tank Info: 75g w/ 20g sump, 250w MH 10K, 2x65 actinics, ~40lbs LR, Coralife Super Skimmer 220
Darroll is offline   Reply With Quote
Old 01/08/2008, 06:28 AM   #25
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,771
The phidgets are nice devices and a much better idea than x10.

X10 has no feedback or fault tolernace. It is a broadcast protocol. If a device does not respond, the controller has no way of knowing.

It is not that people do not want to share. These "projects" get complicated becasue everybody and their brother does nothing but add feature requests. The projects get mired in talk instead of action. If somebody makes a decision on a feature, those who do not support the idea drop off the project. In the end only a few people stay interested and the project fades into oblivion.


BeanAnimal is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -6. The time now is 06:11 AM.


TapaTalk Enabled

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2021 Axivo Inc.
Use of this web site is subject to the terms and conditions described in the user agreement.
Reef CentralTM Reef Central, LLC. Copyright 1999-2014
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.