|
03/28/2016, 10:53 AM | #26 |
Registered Member
Join Date: Nov 2015
Location: Illinois
Posts: 14
|
Metzz71, thanks for the pictures! Would you out be willing to provide some code examples?
|
03/28/2016, 12:40 PM | #27 |
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?
|
03/28/2016, 01:08 PM | #28 |
Registered Member
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.
|
03/28/2016, 01:31 PM | #29 |
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
|
03/28/2016, 05:30 PM | #30 |
Registered Member
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.
|
03/28/2016, 05:47 PM | #31 |
Registered Member
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. |
03/28/2016, 05:58 PM | #32 | |
Registered Member
Join Date: Jan 2015
Location: Kota Kinabalu, Sabah, MY
Posts: 813
|
Quote:
|
|
03/28/2016, 06:22 PM | #33 |
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
|
03/28/2016, 06:24 PM | #34 | |
Registered Member
Join Date: Mar 2016
Posts: 125
|
Quote:
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 |
|
03/28/2016, 06:45 PM | #35 |
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 |
03/28/2016, 06:47 PM | #36 | |
Registered Member
Join Date: Jan 2015
Location: Kota Kinabalu, Sabah, MY
Posts: 813
|
Quote:
|
|
03/28/2016, 07:04 PM | #37 |
Registered Member
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?
|
03/28/2016, 07:06 PM | #38 | |
Registered Member
Join Date: Jan 2015
Location: Kota Kinabalu, Sabah, MY
Posts: 813
|
Quote:
|
|
03/28/2016, 07:11 PM | #39 |
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.
|
03/28/2016, 07:21 PM | #40 | |
Registered Member
Join Date: Jan 2015
Location: Kota Kinabalu, Sabah, MY
Posts: 813
|
Quote:
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. |
|
03/28/2016, 07:33 PM | #41 |
100-mile-commuter
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 |
03/28/2016, 10:36 PM | #42 |
Registered Member
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! |
03/29/2016, 05:27 AM | #43 | ||
Registered Member
Join Date: Nov 2013
Posts: 12
|
Quote:
Quote:
|
||
03/29/2016, 10:46 AM | #44 |
Registered Member
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.
|
03/29/2016, 04:13 PM | #45 |
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 |
03/30/2016, 01:02 AM | #46 |
Registered Member
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?
|
03/30/2016, 05:52 AM | #47 |
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 |
03/30/2016, 07:55 AM | #48 | |
Registered Member
Join Date: Jun 2013
Posts: 44
|
Quote:
__________________
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 |
|
04/07/2016, 05:10 PM | #49 |
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 |
04/12/2016, 10:10 PM | #50 |
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 |
Tags |
affordable, controller, diy, raspberry pi |
|
|