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 Archives > General Interest Forums > Do It Yourself
FAQ Calendar Today's Posts Search

 
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01/05/2008, 03:50 PM
Dustin_p Dustin_p is offline
Registered Member
 
Join Date: Mar 2007
Location: Castlewood, SD
Posts: 21
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.
  #2  
Old 01/05/2008, 04:48 PM
BeanAnimal BeanAnimal is offline
Premium Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 11,710
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
  #3  
Old 01/05/2008, 06:49 PM
Dustin_p Dustin_p is offline
Registered Member
 
Join Date: Mar 2007
Location: Castlewood, SD
Posts: 21
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
  #4  
Old 01/05/2008, 07:54 PM
BeanAnimal BeanAnimal is offline
Premium Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 11,710
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.
  #5  
Old 01/05/2008, 08:55 PM
dixonjk dixonjk is offline
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 12
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!
  #6  
Old 01/05/2008, 09:34 PM
jcm2m9 jcm2m9 is offline
Registered Member
 
Join Date: Apr 2005
Location: Overland Park, KS
Posts: 354
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

40g Cube by ASD, ASD Calc Reactor, Maristar Hood with 250w 14k Phoenix and (2) UVL Super Actinic T5's

SPS Dominated
  #7  
Old 01/05/2008, 11:42 PM
rsw686 rsw686 is offline
Registered Member
 
Join Date: Mar 2007
Location: VA
Posts: 507
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.
  #8  
Old 01/06/2008, 01:08 AM
BeanAnimal BeanAnimal is offline
Premium Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 11,710
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
  #9  
Old 01/06/2008, 09:11 AM
dixonjk dixonjk is offline
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 12
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?
  #10  
Old 01/06/2008, 09:57 AM
BeanAnimal BeanAnimal is offline
Premium Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 11,710
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.
  #11  
Old 01/06/2008, 02:00 PM
dixonjk dixonjk is offline
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 12
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.
  #12  
Old 01/06/2008, 02:56 PM
BeanAnimal BeanAnimal is offline
Premium Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 11,710
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!
  #13  
Old 01/06/2008, 04:19 PM
dixonjk dixonjk is offline
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 12
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!
  #14  
Old 01/06/2008, 05:03 PM
BeanAnimal BeanAnimal is offline
Premium Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 11,710
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.
  #15  
Old 01/06/2008, 05:12 PM
dixonjk dixonjk is offline
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 12
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?
  #16  
Old 01/06/2008, 05:22 PM
BeanAnimal BeanAnimal is offline
Premium Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 11,710
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
  #17  
Old 01/06/2008, 05:28 PM
dixonjk dixonjk is offline
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 12
Well the cables are nice and pretty atleast! And I had a BestBuy gift card... I would not pay that much for cables otherwise.
  #18  
Old 01/07/2008, 07:11 PM
Darroll Darroll is offline
Registered Member
 
Join Date: Jul 2005
Location: Newport News, Va
Posts: 355
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
  #19  
Old 01/07/2008, 11:18 PM
dixonjk dixonjk is offline
Registered Member
 
Join Date: Aug 2007
Location: Charlotte, NC
Posts: 12
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.
  #20  
Old 01/07/2008, 11:39 PM
BeanAnimal BeanAnimal is offline
Premium Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 11,710
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.
  #21  
Old 01/08/2008, 12:51 AM
customcolor customcolor is offline
Brighter the better
 
Join Date: Dec 2006
Location: kaukauna, wi.
Posts: 870
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.
  #22  
Old 01/08/2008, 06:36 AM
Icefire Icefire is offline
Phyto tank master
 
Join Date: Jan 2007
Location: In Quebec, Canada
Posts: 2,342
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.
__________________
2 ocelaris 1-1.5", 1 bandaii cardinal, 1 yellow watchman goby

1 pep. shrimp, 10 nas, 1 astrea , 1 cerrith snails

Some softys

PH 8.1, Alk 11, NH3/4, NO2, NO3 0, Temp 77-79F, SG 1.025
  #23  
Old 01/08/2008, 08:11 AM
BeanAnimal BeanAnimal is offline
Premium Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 11,710
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.
  #24  
Old 01/08/2008, 08:16 AM
Darroll Darroll is offline
Registered Member
 
Join Date: Jul 2005
Location: Newport News, Va
Posts: 355
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
  #25  
Old 01/08/2008, 08:28 AM
BeanAnimal BeanAnimal is offline
Premium Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 11,710
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.
 


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 -5. The time now is 11:37 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Use of this web site is subject to the terms and conditions described in the user agreement.
Reef Central™ Reef Central, LLC. Copyright ©1999-2009