Reef Central Online Community

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

Notices

User Tag List

Reply
Thread Tools
Unread 03/28/2016, 10:53 AM   #26
cslamar
Registered Member
 
cslamar's Avatar
 
Join Date: Nov 2015
Location: Illinois
Posts: 14
Metzz71, thanks for the pictures! Would you out be willing to provide some code examples?


cslamar is offline   Reply With Quote
Unread 03/28/2016, 12:40 PM   #27
fishinthewall
Registered Member
 
Join Date: Mar 2016
Posts: 125
I've been speaking with the head electrical engineer at my job and I think he is willing to help. He designs and programs ladder logic for Fanuc controllers so this should be pi (hehe) for him. First thing he asked me was if we could default everything in case of failure using normally open/closed circuits. I couldn't think of anything that is critical, any thoughts?


fishinthewall is offline   Reply With Quote
Unread 03/28/2016, 01:08 PM   #28
Pellikan
Registered Member
 
Pellikan's Avatar
 
Join Date: Feb 2016
Location: San Diego
Posts: 32
The Smartsain relay allows you to choose normally open or normally closed, depending on which terminal you wire it to. I'll leave it up to more experienced folks to say what's critical though.


Pellikan is offline   Reply With Quote
Unread 03/28/2016, 01:31 PM   #29
fishinthewall
Registered Member
 
Join Date: Mar 2016
Posts: 125
Ok something like this then. Heater without thermostat, normally closed, backup heater with thermostat set slightly higher, normally open, wave makers and sump return normally open, dosing pumps, ato, water change pumps ,etc normally closed. So system failure leads to backup heater, sump pump and powerheads being left on uncontrolled. Sorry kind of thinking out loud to make sure I get all this


fishinthewall is offline   Reply With Quote
Unread 03/28/2016, 05:30 PM   #30
djbon
Registered Member
 
djbon's Avatar
 
Join Date: Jan 2015
Location: Kota Kinabalu, Sabah, MY
Posts: 813
Dual pole relays (normally closed/opened when turned on or vice versa) is not meant for heaters unless you build a controller with temperature sensor. These relays are meant for equipment that you want to turn on/off according to your codes.


djbon is offline   Reply With Quote
Unread 03/28/2016, 05:47 PM   #31
Pellikan
Registered Member
 
Pellikan's Avatar
 
Join Date: Feb 2016
Location: San Diego
Posts: 32
Djbon; I think fish understands that but merely has his terms reversed. He's talking about what happens in the absence of any input from the controller: ie the Pi is down.

fish: a closed circuit would be equivalent to a light switch in the on position. Open=off It's kinda counterintuitive but that's the way it is.


Pellikan is offline   Reply With Quote
Unread 03/28/2016, 05:58 PM   #32
djbon
Registered Member
 
djbon's Avatar
 
Join Date: Jan 2015
Location: Kota Kinabalu, Sabah, MY
Posts: 813
Quote:
Originally Posted by Pellikan View Post
Djbon; I think fish understands that but merely has his terms reversed. He's talking about what happens in the absence of any input from the controller: ie the Pi is down.

fish: a closed circuit would be equivalent to a light switch in the on position. Open=off It's kinda counterintuitive but that's the way it is.
I bet he does. I'm sharing this info with those who wants to build their own controller with extra caution. Heaters with built in controller is okay, but those without will boil your tank if the controller hangs with relays in on position.


djbon is offline   Reply With Quote
Unread 03/28/2016, 06:22 PM   #33
fishinthewall
Registered Member
 
Join Date: Mar 2016
Posts: 125
I'm planning on building one with a temp sensor and coding to to cycle the primary heater. Maybe i shouldn't haven't assumed I couldn't connect a t sensor to the pi


fishinthewall is offline   Reply With Quote
Unread 03/28/2016, 06:24 PM   #34
fishinthewall
Registered Member
 
Join Date: Mar 2016
Posts: 125
Quote:
Originally Posted by djbon View Post
I bet he does. I'm sharing this info with those who wants to build their own controller with extra caution. Heaters with built in controller is okay, but those without will boil your tank if the controller hangs with relays in on position.


I need to re read my post to make sure I didn't mix anything up. That is how I meant. So in case the controller goes down primary heater is off secondary is on. So primary is normally open secondary is normally closed


fishinthewall is offline   Reply With Quote
Unread 03/28/2016, 06:45 PM   #35
fishinthewall
Registered Member
 
Join Date: Mar 2016
Posts: 125
Ok sorry for the multiple posts.
My thoughts on heaters, have one primary without a thermostat on a normally open circuit. it will cycle as needed from the controller and temp sensor. Then have a backup heater with a thermostat set slightly higher and on a normally closed circuit. in case of power failure the primary heater will be off and the secondary will be on.
Sorry about the confusion


fishinthewall is offline   Reply With Quote
Unread 03/28/2016, 06:47 PM   #36
djbon
Registered Member
 
djbon's Avatar
 
Join Date: Jan 2015
Location: Kota Kinabalu, Sabah, MY
Posts: 813
Quote:
Originally Posted by fishinthewall View Post
I'm planning on building one with a temp sensor and coding to to cycle the primary heater. Maybe i shouldn't haven't assumed I couldn't connect a t sensor to the pi
You can have a lot of sensors to Pi or other micro controller for that matter, to fully automate your reef tank. I had a few hang ups on my arduino controller due to logic errors and over temperature on built in regulator. Once done properly, it saves a lot of hassle running a reef tank. I guess that what I pay for DIYing instead of spending money on Apex or similar products


djbon is offline   Reply With Quote
Unread 03/28/2016, 07:04 PM   #37
Pellikan
Registered Member
 
Pellikan's Avatar
 
Join Date: Feb 2016
Location: San Diego
Posts: 32
djbon. So far I've just gotten a Pi. Do you think it necessary to include an Arduino in the mix? Would only using a pi make the task overly difficult?


Pellikan is offline   Reply With Quote
Unread 03/28/2016, 07:06 PM   #38
djbon
Registered Member
 
djbon's Avatar
 
Join Date: Jan 2015
Location: Kota Kinabalu, Sabah, MY
Posts: 813
Quote:
Originally Posted by fishinthewall View Post
Ok sorry for the multiple posts.
My thoughts on heaters, have one primary without a thermostat on a normally open circuit. it will cycle as needed from the controller and temp sensor. Then have a backup heater with a thermostat set slightly higher and on a normally closed circuit. in case of power failure the primary heater will be off and the secondary will be on.
Sorry about the confusion
I agree to this, with extra caution if you're doing your own controller. Myself had a few hiccups where my arduino simply stop executing the codes, with my viewing lights and part of my wavemaker relays are stucked in ON position. If that was on a heater without built-in thermostat, a nice and warm soup should be ready by the time I reached home .


djbon is offline   Reply With Quote
Unread 03/28/2016, 07:11 PM   #39
fishinthewall
Registered Member
 
Join Date: Mar 2016
Posts: 125
xD I figured vigorous testing is gonna be necessary I was thinking about hooking it up to a bunch of lights and moving the temp probe around cold and hot water over a couple of days.


fishinthewall is offline   Reply With Quote
Unread 03/28/2016, 07:21 PM   #40
djbon
Registered Member
 
djbon's Avatar
 
Join Date: Jan 2015
Location: Kota Kinabalu, Sabah, MY
Posts: 813
Quote:
Originally Posted by Pellikan View Post
djbon. So far I've just gotten a Pi. Do you think it necessary to include an Arduino in the mix? Would only using a pi make the task overly difficult?
I'm not familiar with Pi, but both are micro controller which should have the same functionality. Arduino itself comes with quite a number of daughter boards to perform specific functions. If I were you, I won't mixed these two products and save you the hassle of cracking your head on programming.

Arduino comes with different main boards, the differences are the available IO ports for you to choose from. Another thing to consider is the logic programming codes which can be very challenging and time consuming if you start from scratch. These codes are out there if you want to save time producing a workable codes.


djbon is offline   Reply With Quote
Unread 03/28/2016, 07:33 PM   #41
theatrus
100-mile-commuter
 
theatrus's Avatar
 
Join Date: Dec 2004
Location: almost nevada
Posts: 4,721
Upside of RPi:

- Full Linux environment, allows use of languages like Python, Go, etc
- Internet connected fully out of the box
- You're not going to run out of CPU/memory resources

Upside of Arduino:

- Can implement hard real-time (timing dependent things)
- Extra features like PWMs, etc
- Simpler operating environment (write some C++, it runs in a loop)
- Analog inputs built in


Me? I use an RPi as supervisory control, and various other microcontrollers as the actual hardware I/O (RPi is the SCADA system, various other things are the actual control points). The easiest way I've found is to string things, like sensors and PWM, off the RPi over the I2C bus (one multi-drop bus - not the most robust thing in the world but totally serviceable over a few meters). In the case of my lights I used Bluetooth Low Energy.


__________________
Custom electronics purveyor. blueAcro.com

Current Tank Info: 90g SPS+mixed reef (10 yrs): LEDBrick LEDs, 40g custom sump, Ca reactor, chiller, Vortech, lots of custom electronics
theatrus is offline   Reply With Quote
Unread 03/28/2016, 10:36 PM   #42
Pellikan
Registered Member
 
Pellikan's Avatar
 
Join Date: Feb 2016
Location: San Diego
Posts: 32
It starts getting complicated real soon, don't it.

In researching I've seen a lot of people with the Pi + Arduino combo making it work. I thought the Pi might be enough and it may be. I chose it because of a passing familiarity with Linux. I guess the most attractive aspect of the Arduino to me would be it handles analog easily where in the case of the Pi you gotta do a work around.

Aie! My head is spinning!


Pellikan is offline   Reply With Quote
Unread 03/29/2016, 05:27 AM   #43
stu.uk
Registered Member
 
Join Date: Nov 2013
Posts: 12
Quote:
Originally Posted by BigDave View Post
Do you know any other programming languages?

Python's heavy use of classes gives it a pretty steep learning curve. If you know any other languages, it will help.

I just downloaded some python examples and started modifying them to fit my needs. After doing that, I was able to start my own app.
I've never really dabbled in programming but learning Python would have dual use as we are about to use a form of ti at work. I will try playing with some examples.

Quote:
Originally Posted by jrhupp View Post
"A byte of Python" was recommend to me by one of the embedded gurus at work. I read it and it made sense at the time, but I have not had need to implement anything in python yet so who knows if I actually learned anything from it. Google it. Its a free resource.
Thank you, I will look it up.


stu.uk is offline   Reply With Quote
Unread 03/29/2016, 10:46 AM   #44
Pellikan
Registered Member
 
Pellikan's Avatar
 
Join Date: Feb 2016
Location: San Diego
Posts: 32
One option for learning python is an online course offered free if you have a san diego public library card. It's one of the online database services through Gale Courses. 6 week course starting every 2 weeks I believe.


Pellikan is offline   Reply With Quote
Unread 03/29/2016, 04:13 PM   #45
metzz71
Registered Member
 
Join Date: Jun 2013
Posts: 44
All my code was written in python and php.


__________________
110g Display,90g acrylic converted to sump (20 ft from DT)
Omega 130 skimmer, DC return pump
Laing E1 autocirc for heating, MACT Web Controller
metzz71 is offline   Reply With Quote
Unread 03/30/2016, 01:02 AM   #46
Pellikan
Registered Member
 
Pellikan's Avatar
 
Join Date: Feb 2016
Location: San Diego
Posts: 32
I did some PHP in a college course, don't remember a darn thing. What aspects do you use PHP with? Updating a Web page to show tank status?


Pellikan is offline   Reply With Quote
Unread 03/30/2016, 05:52 AM   #47
perkint
Registered Member
 
Join Date: Jan 2014
Location: Robin hood country, UK
Posts: 817
Personally I think the best model is arduinos to do the grunt work and automation, with RPi or similar for the UI and data logging. Use multiple arduinos, keep the code very simple and automated. Keep the code simple and they'll run happily even if the RPi locks up so control of your critical devices continues (additional fail-safes are never a bad idea) and keeping the control separate from the UI simplifies the code massively (a fact I am well aware of having just coded control and UI into an arduino nano for 10 channel LEDs). And the RPi is capable of so much more than an arduino for UI and data logging.

Fishinthewall - I'd set the backup heater to be a tad lower rather than a tad higher, but can't see why it makes much difference either way

Tim


perkint is offline   Reply With Quote
Unread 03/30/2016, 07:55 AM   #48
metzz71
Registered Member
 
Join Date: Jun 2013
Posts: 44
Quote:
Originally Posted by Pellikan View Post
I did some PHP in a college course, don't remember a darn thing. What aspects do you use PHP with? Updating a Web page to show tank status?
PHP is my front end web for calling the various functions of the Pi, you can view it in the screenshots.


__________________
110g Display,90g acrylic converted to sump (20 ft from DT)
Omega 130 skimmer, DC return pump
Laing E1 autocirc for heating, MACT Web Controller
metzz71 is offline   Reply With Quote
Unread 04/07/2016, 05:10 PM   #49
metzz71
Registered Member
 
Join Date: Jun 2013
Posts: 44
Just finished adding Atlas Sci Dev pH support for read. Will be working on monitoring pH with Alarms next.


__________________
110g Display,90g acrylic converted to sump (20 ft from DT)
Omega 130 skimmer, DC return pump
Laing E1 autocirc for heating, MACT Web Controller
metzz71 is offline   Reply With Quote
Unread 04/12/2016, 10:10 PM   #50
terabhrava
Registered Member
 
Join Date: Aug 2012
Posts: 11
Anybody automate their salt water preparation. The challenge is going to be controlling the amount of salt that gets dumped in the mix, and solenoids will likely not work in this case. Another is checking for salinity using a sensor. If not a sensor, will have to compute based on average volume of salt and water to get the required salinity. Presuming somebody's already tried something like this, any input on thus appreciated.


__________________
150g DD Cube, 40g Sump, Radion Pro G2, Koralia 1150 gph, Cad PLS-200 Skimmer, Tunze ATO
14g Biocube, Koralia 450 gph, Tunze ATO

Current Tank Info: 150g DD Cube, 40g Sump, Radion Pro G2, Koralia 1150 gph, Cad PLS-200 Skimmer, Tunze ATO
terabhrava is offline   Reply With Quote
Reply

Tags
affordable, controller, diy, raspberry pi


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



All times are GMT -6. The time now is 11:55 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2024 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-2022
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.