DIY controller

Status
Not open for further replies.
Sounds like your making some really nice headway.

Just a few questions, are you going to do moon rise/set?
Did you do the moon brightness as a linear function or a sin function?

I have all the hardware done and fully functional on my controller. The basic timers are completed and I'm working on the Thermal control loop now. I wish I could spend more time on it but I have so much going now it may be sometime before its completed.
 
I found a website that has intensities of moon phase based on location. I made a lookup table for that. It is a basic sign function though when you graph it out. I do not have the link currently but I can find it.

i think I am going to tap into my wavebox to simulate surges around the full moon periods.

I plan on adding moonrise and moonset, and have all the hooks just need to finish it. I wrote the code around the shortest day of the year and the longest and then just add or subtract depending upon what the day is.

I understand about being busy, but I have a little OCD and doubt I will sleep until it is done. It also helps that I am between projects and have a little time during the day to play around. I have the coolest job in the world!
 
I already have all the calcs done in the PC for sun, moon rise/set and moon phase. I also have the calcs for brightness of the moon during phases and I have a first pass at the brightness as a function of time for the sun/moon through the day but it still needs work.

I also will be doing lookup tables. I'm going to write PC software that will alow you to type in any latitude/longitude and then download 10 years worth of data into the controller. I would love to do the calcs in the micro but the calcs need at least a full 32 bit floating point number to be even close and I don't feel like spending the time coding all of that. Then there is always the sin/cos thing you would need to code also. Next pass will be with a true floating point micro.
 
Ron,

Can you post a list of all the functions you have completed in your basic kernel, and what method you are using for control (X-10, etc)?

Thanks,

Mike
 
Lighting section

There are a total of 8 on/off light definitions. Each light is programmed to an outlet, given an on time, an off time and a Temp threshold that overrides and shuts the light off. At the present I have VHO dimmer capablilties for two VHO(ic660) lights. The dimmer works as the typical light function however this has the added delay viarable. This time is the amount of time it takes the light to go from 10 to 100 precent. Once the light turns on it turns on at 10 percent then steps up to 100 precent in that delay time. Same process works as the light goes off. At the off time it starts decreasing from 100 to 10 percent in that time. Once the light hits 10 percent it shuts off power to ballast. Dimmer detector needs to still be tested. My Ic660 is older then i thought. The dimmer circuit is not found in the schematics I posted It is a seperate add on that is SPI based.


MoonLight section

Moon light simulation is based on a 29 day cycle. You select the date of the new moon and it calculates the intensity based on the Moon Age. This is not a linear function more of a sin/cos function. I constructed a lookup table from a website I found that gives moon intensisty base on long/lat location. I use the two DAC for this and and gives a 0-5 volt output. I through together a simple controller to control two 15 watt LED cluster arrays. Runs off 12 volts.

Heater/Cooler Section

There are three heater and three cooler functions. Each function has it's own setpoint. You also have a off delay and a threshold value you set to fine tune this to your hardware.


ORP/PH section.

There are four probes inputs for measurement of PH and ORP sensors. Each of these probes will control an output to incorporate control of Kalk, Calcium or Ozone reactor. There are cal routines for each probe for calibration purposes. The blue Pots on the PCB are for rough calibration when you stick the system together. Once that is done everything else is done automatic via software


Switch/Input section:

There are four level switch inputs. These have the ability to be turn on an output for a period of time. The period is defined as the total amount of time in a given 24 hour period. For example: Level one has a period of 20 minutes. Level one switches trips so the output that is mapped for level one turns on for the amount of time level one is tripped for. Once level one opens the period timer stops. If level one trips again then the output will turn on ounce again until the period timer times out. If the level one does not close in the given period the output turns off anyway when the period times out. This prevents overfilling the tank if a level switch sticks. If a period expires an alarm is set.

Kalk Reactor section:

These section does not use a ph probe, if you decide you want a ph probe then the kalk is define in the Ph section. This section works in series with Level switch two. You can use level two to dose kalk makeup water. You can also setup a period of mixing and map an output for the mixing pump. Kalk will not be does during a miking phase. It will wait until the kalk settles for 15 minutes before dosing even though Level switch two trips.

Period/Wavemaker Function:

There are a total of eight output sections that can be mapped anywhere and programmed to run on a period basis. You set an on time and off time in seconds. If you set the On time to zero then the output will cycle for a random time. if you leave off time set to zero then the output will only turn on. This feature is used to turn pumps on and off during a feeding cycle. Feeding cycle duration is user setable.

Output Hardware Section:

All of the above functions can be mapped to any outlet/ouput explained in the section below. What makes this nice is that you can have light/heater/level outputs on the same outlet strip.

There are 28 individual outputs that can be memory mapped to a given function. For AC switching functions these are banked in a group of 4. Two groups of four are connected to a port. Three full ports total and one half port are present.

The AC outlet I designed is opto isolated and connects to the main controller via a RJ-50 cable.

Each output will switch 6 amps.


Input Harware Section.

This is a basic circuit that gives you a place to attached level switches and then controls a DC output (valve). It was designed for a little mechanical backup. The level switch controls the supply voltage to the valve and the switching section of the valve is controlled via the controller. Basically the valve will not turn on the output unless the switch is set and the controller enables the output. You have to have both. There is also a master level input that shuts down all four outputs if triped. It acts as an overfill prevention function.


Firmware section.

All of these functions are menu driven through a 4x20 LCD display and 4key keypad. There is perhaps a total of 30 menus total for setup and monitoring. You can also do all of this via a host pc but you do not have to. If connected to a host PC there is an override function that allows you to switch outlets on and off.

The controller also stores min/avg/max values for each temp and sensor for a given day. Along with this data sunrise/sunset moon age. Alarm Status and Switch periods is stored as well. There is enough NV memory to store over a 300 days of data.


PC host section.

This is nothing more then a data collection program. All it does is askes the controller for status and sensor readings. You can read the setup and modify it. You can also monitor the controller's outputs and sensors in real time. There is an output section that displays all the outputs locations and their state and what they are mapped to. There are functions to log controlling info on a 5 minute basis and store and graph. There is also a function that stores and displays the daily report data.



Future.

Conductivity probe support. I have a circuit designed I just need to test it.

Web based server. I have the components on the way for this. I hope to replace the PC host program with that.

I am sure I have forgotten something. There is a lot of info here and seems to change on a daily basis.
 
Ron,

Thanks for the comprehensive update. One question I have though is whether the system can be used to switch MH lights. I have 2 250W's and 1 150W. I am not so worried about dimming MH lights, as I plan to add NO Actinic's for dawn/dusk effect and coral fluorescence. Also, when you get the web based server module completed, will it have the ability to e-mail to a pager upon alarm status?

I hope to make a decision on which way I want to go very shortly. It sounds as though your system will do most everything I am looking for.

Thanks,

Mike
 
I can email now with the current software just have not written the application to do it. In the end I want to write the asp so you can log onto it with a web enabled cellphone to check status.

As far as switching MH lights. I am currently switching 5x250W MH and a 175 Mh and two 660 VHO with the controller. I am switching a total of 7 lights. Keep in mind a 250W Mh only draws about 2-2.5 amps. That is well within the driver specs. Each outlet can supply 6 amps. The driver actually is speced for 8 amps however I would not pull 8 amps from all four outlets at once.

R
 
Wow Ron, all I can say is great minds think alike!
I went with 64 outputs at 15 amps each, hey you never know.
Other than that there almost a mirror. I find it funny how close they really are.
 
Wow 15 amps. how are you going to gang those together? In groups of 4 that would be 60 amps. OUCH!!!

Yes they are pretty close.

I finally got my proto-type outlet box today. Looks awsome. Now I have to decide if I am going SS or steal with poweder coating. Price is about the same
 
Yes the power dissapation was a BIG problem.
I'm using a mix of SSR's and Mech relay's. I find the SSR's are great for chillers and heaters but its better to use mech on ballasts. Don't mean to highjack your thread but here is a pic of the the power driver board.

switchpictop.jpg


I'm trying to keep as much stuff modular as possible. If all the SSR's are on at full capacity I will need a heat sink that is 6"x6" and 2-3" think with at least a 4" fan to keep it cool. But for the standard user that can be MUCH smaller. To really get the full capacity of the system you need to be mounted in a service box. It was only a few bucks more to go with 15 amps SSR's compared to 10 or 5 amp.
 
I went with 48. 24 of the outputs are 120v 5A crydom SSRs (random turn on). 12 of the outputs are 20A high current CRYDOM SSRs and the last 12 are 20A mechanical relays, with 6 of these slated to be 2 pole contactors.

All of the outputs are DIN mount packages, as is the opto driver board (yet to be etched). This should give a lot of flexibility.

The setup can use as many branch circuits as needed, but will be wire to take advantage of 3 seperate 20A branch circuits for the tank. That is way more than I need for my current setup.

Bean
 
Anyone out there using Ronc98's controller? If so, can you send me some info on how things are working out?

Thanks
 
OK... IMO, DIY projects are done to save money and to create something that's not readily available. I know there's also the thing about being custom and the fact that one gets the feeling of getting something done. With that being said, I'd like to know how much money you put in this thing and what's so different about this from something else that's "off the shelf"? I do a lot of PCB layout and I know that the board, with nothing on it, had to cost you at least $100 if you didn't order more than one. We do a lot of prototyping over at the research institute that I work at and know how expensive making one of a kind equipment can get. Keep up the good work and maybe when it's all complete, you can make it (the code, BOM, cost break-down and instructions) available online for free! haha.
 
You can get cheap PCB protos at expresspcb.com

In any case, I etch my own stuff and that suffices for most of my designs. None of us have saved money. We have likely all spent a lot more than a full blown off the shelf controller would cost.

However... most of our designs allow us to achieve a much greater level of control and monitoring than anything off the shelf can offer.

Most of us also have a lot of "proposed additions" that may never make the protoype stage, let alone end up on the tank.

It's a hobby :)

Bean
 
My main reason for my DIY controller is because even with the boards (I never order 1, its all tooling charge so its only a few bucks to get at least 2-4) and all the parts its still cheaper than something that wont even come close to what mine will do. I have given a lot of serious thought about selling my controller. Depending on product liability insurance and other misc costs I should be able to sell my unit for at least $100 less than whats out there. Don't get me wrong there are units out there that have a realistic price but the more powerfull ones are a little out of line IMHO.

So when everything is said and done, yes it is cheaper and I addressed the fail safe issue. With these other off the shelf controllers what happens when the ONE temp sensor breaks? What if the relay for the heater or chiller sticks? What happens when the micro dies? Coming from Aerospace we spend a lot of time thinking about what if's and try to address as many as possible.
 
I feel about the same as fppf. High end controllers are starting around the 800 dollar mark and that does not include many things. When it is all said and done I will have perhaps that much in mine minus the time I put into it. In the end I will have the features I want, will be able to change them when I decide on something else and know that there is a backup plan when something fails.

If you decide to do this to make money you might as well go out and sell pencils. There is no money in this. Once you factor in all the components and then support you will loose money.

I post my stuff because it is cool to be able to bounce ideas off each other.

Update on the light dimming. Very disappointing dimming an icecap ballast. It is not as simple as throwing a pot across the io port pins. You can do it however you are only going to get a 20 precent range. Their protection circuitry shuts off the ballast. You can by pass the circuit however you need to activitly monitor your self for bulb failure. If a bulb fails and the fault circuit is by passed you loose the ballast.

In stead of using an icecap ballast I am going to use a stardard industrial ballast that is dimmable and go that route. I got this idea from fppf(thanks!). I just got done firing my 160W VHO with a standard NO ballast and it drives the VHO at 160 watts which is what it is suppose to be. My life got just got ALOT easier
 
Last edited:
Update!

As easy as dimming a light should be It seems a little harder getting a ballast that dims the way it should without flicker. I have been through three different types and ended up with an advanced transformer Mark 7. Works very good however you are pretty much limited to NO bulbs. Not much luck finding one that will drive 72 inch VHO. So I am back to the IceCap 660 ballast. I already have the hardware and code for controlling a ballast with 0-10V so if I go the icecap way I am going to make a simple 0-10v converter that will dim the icecap and monitor for bulb failure. This is a little more work then using a standard dimmable ballast but I really want to keep my VHO's. Plus I like having an excuse to switch gears a little.

Code update to date is as follows.

The big push now a mode that will vary the sunrise/sunset/ light duration and temp based on seasons. You give it a summer solstice sunrise/sunset/temp and a winter solstice sunrise/sunset/temp and it will ramp light and temp based on seasons.

The output section used for wave making I added a feeding mode it will turn off the pumps for a settable time. It will also double the off period timers in the night mode. While I was doing that I added a mode where it will vary the timers based on lunar cycle where you can simulate surge strength around the full moon period.

Huge change in PC software layout. In the past each output was labeled for what it controled, light, heater, chiller or wave maker. Now you can customize the labels to anything you want. Beer cooler, TV ET. :)

Those that want new source Pm me with a real email address. I will send you the new source. My machine crashed and I do not have me emails backup.
 
Hardware update. I finally got my outlet boxes. Went with 20 gauge stainless steel because it would have been cheaper then going steal and getting it poweder coated. I stuffed 20 of these today makes my life so much easier then ripping apart outlet strips.

P1010103.jpg



This weekend I am going to revisit my quest of making a 0-10 V input dimmer for my icecap 660 ballast. With bulb blow-out protection.
 
Simply Awesome I must say. I think if you ever did go into this for a business you would have a fair amount of customers lined up waiting for a unit. You are totally correct that any unit off the shelf is not going to provide everything you are looking for, the only way is to DIY or have someone do it for you.

Chris
 
Status
Not open for further replies.
Back
Top