Boga's Reef Controller

Victoss

Member
Joined
Aug 6, 2012
Location
Kitchener ON
This is gonna be a cool project, I made an Uno Arduino controller back in collage but all it did was control lights, outlets and some temp probes, not nearly as much as yours. Wished I did the ethernet shield on it but I'm too lazy to go back and change it :). You can see the build in my signature (takes you to the KWAS forums). If you need any help with the RTC or PWM and timing for LEDs or if your using EEPROM memory ask away, besides that dunno much more I remember how to do ;D.
 

Boga

Active Member
Joined
Jan 12, 2012
Location
Dorchester, Ontario
Victoss link said:
This is gonna be a cool project, I made an Uno Arduino controller back in collage but all it did was control lights, outlets and some temp probes, not nearly as much as yours. Wished I did the ethernet shield on it but I'm too lazy to go back and change it :). You can see the build in my signature (takes you to the KWAS forums). If you need any help with the RTC or PWM and timing for LEDs or if your using EEPROM memory ask away, besides that dunno much more I remember how to do ;D.

Thank you Victoss. Great controller. Seeing something that is working gives me hope.  :) I did read and inspired from your thread here in the Controller Programs section. I had in mind to post in the same section, but for some reason I posted under DIY. Not a big mistake :). I did good progress, but there is going to be a lot of work ahead. I hope that you and the other folks will tag along and provide feedback if you sense that I am going the wrong way.

Where did you get the enclosure from?
 

Victoss

Member
Joined
Aug 6, 2012
Location
Kitchener ON
The box was from a local electronics store in Kitchener, they had a whole bunch of electronics boxes of various sizes. For my outlets I just used a regular square metal electrical box and the relay board is even behind the outlets in it (http://imageshack.us/photo/my-images/710/outlet2g.jpg/). For your project sounds like your going to have more than 4 outlets so a power bar shape like your thinking will probably be better. One build I saw that did the relays nicely used a DJ power bar: http://reefprojects.com/wiki/Build-phases and like Adam said you should add a few NC relays on there, if your board stops working then some things will still stay on.
 

Boga

Active Member
Joined
Jan 12, 2012
Location
Dorchester, Ontario
Thanks.
Indeed, I will have more outlets. My plan is to go 7 outlets on the main floor and 7 outlets in basement. This does not include lights, which will be PWM. Controller is going to be in basement. Even if I do not use all seven, I want to keep some spares for future developments (if I get to that point :D).
 

Boga

Active Member
Joined
Jan 12, 2012
Location
Dorchester, Ontario
This is going to be my 10V PWM Module. Seven channels connected to Arduino pins PWM 6, 7, 8, 9, 11, 12, 13 and GND. PWM 4 and PWM 10 will be used by the Ethernet/SD shield. I used free software ExpressPCB, very easy to learn for my purpose.
 

Duke

Distinguished Member
Website Affiliate
Joined
Sep 20, 2011
What sort of failsafe's do you have built into this thing incase it messes up, trusting your tank to a freeware home built controller seems risky doesn't it? Do you have an estimated total cost of this endeavour?
 

Victoss

Member
Joined
Aug 6, 2012
Location
Kitchener ON
Looking at your schematic I see you tie the ground back to the Arduino from your 10V jack but did you know you could also use this same 10v supply for the arduino board too? Better yet you don't even need the jack on the PWM board, you can use the one directly on the arduino with 10v and then use the Vin pin that is on the power rail which connects directly to the jack (which goes through a protecting diode and some capacitors to smooth out the signal for extra measure). So all you would need to do is grab your 10v from the Vin pin on the arduino but just requires another connection from you PWM board to the arduino.

PS: When using a 10V (or even 9V works but you'll be at 90% max instead) wall wart make sure it's regulated otherwise your voltages will be all over the place and you could easily go over 10V which can be bad for the LED drivers. Also make sure it's of sufficient amperage to cover all your needs.
 

Boga

Active Member
Joined
Jan 12, 2012
Location
Dorchester, Ontario
Duke link said:
What sort of failsafe's do you have built into this thing incase it messes up, trusting your tank to a freeware home built controller seems risky doesn't it? Do you have an estimated total cost of this endeavour?
You are right - it is risky. It is a prototype.

- For start I will keep it for monitoring purposes for a period of let's say six months.
- Lights can be connected right away. If they fail to start and stop? I don't think is a big deal with huge consequences to the tank. I should be able to catch them in time before is too late. Anyway  they will not exceed the maximum light level set in LED drivers.
- Looking at the main inputs/outputs, most of them are for monitoring and generate alarms (water level, leak detection, etc). No direct risk to the tank.
- pH is going to be monitoring, no risk if calibrated/verified periodically.
- Power heads for water flow are somehow medium risk. If they fail the tank is going to be without internal circulation for ....  until I catch them. One day, two?
- Skimmer and return pump have high risk. I will keep them in testing for longer time. I will connect dummy bulbs and monitor their functionality for long time before I put them in service.
- Heaters in my opinion are very high risk. If the logic fails you can have the tank "boiling" or "freezing". I plan to have a sort of redundant system in place between this controller and the current temperature controllers that I have right now. At least for a while.
- If the controller is freezing, there is an auto-reset function (thanks KBennett).
- I will make provisions for heater, skimmer, ret pump, etc, if the board or connection fail they will stay ON (thanks Adam and Phil).

In terms of money, the cost would probably be 50% of a commercial controller. In terms of time spent .... is not worth, unless you like doing it.
 

Boga

Active Member
Joined
Jan 12, 2012
Location
Dorchester, Ontario
Victoss link said:
Looking at your schematic I see you tie the ground back to the Arduino from your 10V jack but did you know you could also use this same 10v supply for the arduino board too? Better yet you don't even need the jack on the PWM board, you can use the one directly on the arduino with 10v and then use the Vin pin that is on the power rail which connects directly to the jack (which goes through a protecting diode and some capacitors to smooth out the signal for extra measure). So all you would need to do is grab your 10v from the Vin pin on the arduino but just requires another connection from you PWM board to the arduino.

PS: When using a 10V (or even 9V works but you'll be at 90% max instead) wall wart make sure it's regulated otherwise your voltages will be all over the place and you could easily go over 10V which can be bad for the LED drivers. Also make sure it's of sufficient amperage to cover all your needs.

Yes. I know Arduino is very flexible in terms of voltage. I did not decide for sure. My thinking was to keep Arduino and the pH shield on the same voltage (5V). I hope this is going to give the pH more stability. Also in case the PWM module fails and sucks to much Amps, I wanted to have Arduino powered by a separate power circuit. I need a 5V source for pH shield anyway. There was an option to use 3.3V from Arduino, but the folks from Atlas Scientific recommended me to use 5V for better stability.
12V 2A from wall wart goes into a 10V regulator for PWM and into a 5V regulator for Arduino and pH shield.

Thoughts?
 

KBennett

Member
Joined
Sep 17, 2012
Location
Brantford
I didn't realize you had your skimmer and return on this controller.  I don't control mine because I don't trust the controller or temp feedback.  I ordered a new mega to test the updated bootloader.  You actually have to program a separate arduino to upload the bootloader via isp to the target arduino.  Once I figure it out, ill write clear instructions.
 

Victoss

Member
Joined
Aug 6, 2012
Location
Kitchener ON
Ya 2 power sources may keep your sensors more stable and keep chances of your PWM board bringing down your arduino with it less, just means an extra plug needed in the end. You don't necessarily need the 10V regulator if you use a 10V wall wart (or I used a 9V because I felt the 10V from rapidLED did not give enough juice) but they can be troublesome to find 10V and they have to be the regulated kind.
 

Boga

Active Member
Joined
Jan 12, 2012
Location
Dorchester, Ontario
Just to keep the subject warm about power sources, I think this is what I am going to use. They are already assembled, from e-bay, around $2-3. They come with LM7805 voltage regulator. I will change one with LM7810.
 

Victoss

Member
Joined
Aug 6, 2012
Location
Kitchener ON
I'm not seeing why you would need one for the arduino, it already has the 5V regulator on it with a jack for convenience, just plug her in and you got your 5V which you can use for your pH with the 5V pin on the power rail. You would need one for the 10V PWM though.
 

Boga

Active Member
Joined
Jan 12, 2012
Location
Dorchester, Ontario
Victoss link said:
I'm not seeing why you would need one for the arduino, it already has the 5V regulator on it with a jack for convenience, just plug her in and you got your 5V which you can use for your pH with the 5V pin on the power rail. You would need one for the 10V PWM though.

I see your point. I was thinking that there would be too many consumers on Arduino's back (LCD, Ethernet, RTC, pH, temp probes, etc). I was afraid that it would overheat and create unstable 5V supply for the pH shield. I really like the idea to have less components. I can go like this with only one 10V module and use Arduino as 5V supply. If down the road I see unstable pH readings and I would suspect the 5V supply, I can easily add another 5V regulator for the pH probe and future ORP, EC, dissolved oxygen.
 

Boga

Active Member
Joined
Jan 12, 2012
Location
Dorchester, Ontario
Today I bought my power enclosures.  :) :) :) :) :) Thank you Victoss for link (idea). There is plenty of room inside to place my relay module and all required connections. Eight outlets at the back. Front switches to override if needed.
 

KBennett

Member
Joined
Sep 17, 2012
Location
Brantford
Nice.
  Hey, one more thing that I remembered today... The real time clock really slows things down.  I had to change it so that it only queries a new time every 5 seconds.  It was a big deal with my remote control.  I would miss button pushes.  It might not be a big deal for you, but something to keep in mind if your controller is acting oddly.
 

Boga

Active Member
Joined
Jan 12, 2012
Location
Dorchester, Ontario
KBennett link said:
Nice.
  Hey, one more thing that I remembered today... The real time clock really slows things down.  I had to change it so that it only queries a new time every 5 seconds.  It was a big deal with my remote control.  I would miss button pushes.  It might not be a big deal for you, but something to keep in mind if your controller is acting oddly.

Thanks. Currently I do the RTC reading every second, update lights variables every second, update probe readings every 5 seconds. I will keep it in mind. Easy to change if needed.
 

Boga

Active Member
Joined
Jan 12, 2012
Location
Dorchester, Ontario
I powered up the Arduino Mega 2560 R3 and the Ethernet shield with 12V DC . The voltage regulator on the board overheats :(  I even tried 10V DC. Still does overheat. I did not have connected LCD, RTC and PWM modules. It looks that the new R3 version is not too friendly from this point of view.
 

Boga

Active Member
Joined
Jan 12, 2012
Location
Dorchester, Ontario
No. On USB is Okay. USB has 5V and goes after the on board regulator.

copy / paste from arduino site:
"The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts."


So 10V should be OK, unless is defective .....
 
Top