MaddyP's 12G Long - Node-Red Nano Peninsula

OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Having a stand alone is very compelling, but you’ll need to add some analog computer (mostly scaling) to get it to work. My personal take would be to build a stand alone controller for this out of any available microcontroller which is predictable and not subject to updates, power on lag, etc etc.

I don’t have experience with GHLs control system.
Would a standalone solution require an analog computer? Reading the data sheets leads me to believe all computations are done at the sensor internally, generating a 4-20ma output which can be read by the ball valve directly.
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,951
Reaction score
3,353
Location
Sacramento, CA area
Rating - 0%
0   0   0
Would a standalone solution require an analog computer? Reading the data sheets leads me to believe all computations are done at the sensor internally, generating a 4-20ma output which can be read by the ball valve directly.

If you can set the range output to what you want in the small range, it would work just fine assuming both are 4-20mA loops (I thought the valve was 0-10V?)
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
If you can set the range output to what you want in the small range, it would work just fine assuming both are 4-20mA loops (I thought the valve was 0-10V?)
The valve manufacturer offers a 4-20ma version of the smart actuator. And both the sensor and the valve are configurable by software. In theory, it shouldn't be too much trouble to calibrate these items together at a set water level and valve position.
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Guess what showed up today!!! Custom 36” Nanobox fixture. 1-10V dimmable with 6 LED pucks for better coverage and less shadows.

0C1315F4-6090-4443-8DF2-25AFA644E56D.jpeg C74A6078-44D5-4D21-B213-7D3235E06EBE.jpeg C7614718-4AC9-44FE-B29E-3EE5826399F8.jpeg
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
As I move forward in planning out this tank, I keep running up against limitations with the available control systems available to our hobby (Apex / Profilux). I started a thread over on the GHL sub-forum to figure out if my idea would work through a Profilux, but the gurus couldn’t confirm or deny the control capabilities. And since the tank inhabitants will be entirely reliant of hardware keeping water in the display, I must minimize the risk of failure as much as possible.

@theatrus recommended building my own controller to facilitate this uniquely challenging application, which seems to me the best option. I’ve developed a few solutions for smaller tank with Arduino, but the development time and stability leads me to struggle with moving forward. Then it hit me! This is an automation project at its finest! Why not use a controller designed for automation?? It can interface everything I need: 4-20ma input/output, 0-10v input/output, inputs for switches/floats, and outputs for solenoids/relays/lights/pumps...the options are nearly endless. And, most PLC’s these days have a built in function for PID loop control, precisely the function I need to control the modulating valve and keep water at a consistent level.

Crazy? Overkill? Yes. But using a PLC will be much easier to program and offer a higher degree of confidence in operational stability. Not to mention, most systems are extremely versatile and modular. I don’t have much experience in using PLC’s, but it shouldn’t be too difficult. Certainly much less difficult than building a Arduino/Pi controller from scratch. Cost wise, several options are available with pricing comparable to a well equipped Apex/GHL setup.

AutomationDirect.com has several low cost PLC options targeted towards small projects. Click, Productivity Series, and Do-More BRX are a few options. Since I’m looking at this as an investment, I’ll likely go with the Productivity1000 or Productivity2000 so expansion down the line is available. These come with free software and a month of free training.

upload_2019-3-5_14-51-29.png


upload_2019-3-5_14-52-29.png


I’ve already ordered a modulating ball valve actuator and will handle water level sensing with a 40-300mm ultrasonic sensor from AutomationDirect.com. Most likely, I’ll also use these sensors for ATO reservoir and dosing reservoirs as they will provide my PLC with level which can be converted to volume with included software.

upload_2019-2-13_15-5-29-png.976753


upload_2019-3-5_14-52-58.png


The P2000 PLC system has a built in OLED which can give status feedback about what’s happening with the system, but for ease of use one of these HMI’s will be added down the line.

upload_2019-3-5_14-53-33.png


More to come! Still deciding on dosing pump motors and ph/orp/conductivity probe integration. If anyone has experience in the PLC automation world, your input would be greatly appreciated!
 
Last edited:

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,951
Reaction score
3,353
Location
Sacramento, CA area
Rating - 0%
0   0   0
As I move forward in planning out this tank, I keep running up against limitations with the available control systems available to our hobby (Apex / Profilux). I started a thread over on the GHL sub-forum to figure out if my idea would work through a Profilux, but the gurus couldn’t confirm or deny the control capabilities. And since the tank inhabitants will be entirely reliant of hardware keeping water in the display, I must minimize the risk of failure as much as possible.

@theatrus recommended building my own controller to facilitate this uniquely challenging application, which seems to me the best option. I’ve developed a few solutions for smaller tank with Arduino, but the development time and stability leads me to struggle with moving forward. Then it hit me! This is an automation project at its finest! Why not use a controller designed for automation?? It can interface everything I need: 4-20ma input/output, 0-10v input/output, inputs for switches/floats, and outputs for solenoids/relays/lights/pumps...the options are nearly endless. And, most PLC’s these days have a built in function for PID loop control, precisely the function I need to control the modulating valve and keep water at a consistent level.

Crazy? Overkill? Yes. But using a PLC will be much easier to program and offer a higher degree of confidence in operational stability. Not to mention, most systems are extremely versatile and modular. I don’t have much experience in using PLC’s, but it shouldn’t be too difficult. Certainly much less difficult than building a Arduino/Pi controller from scratch. Cost wise, several options are available with pricing comparable to a well equipped Apex/GHL setup.

AutomationDirect.com has several low cost PLC options targeted towards small projects. Click, Productivity Series, and Do-More BRX are a few options. Since I’m looking at this as an investment, I’ll likely go with the Productivity1000 or Productivity2000 so expansion down the line is available. These come with free software and a month of free training.

upload_2019-3-5_14-51-29.png


upload_2019-3-5_14-52-29.png


I’ve already ordered a modulating ball valve actuator and will handle water level sensing with a 40-300mm ultrasonic sensor from AutomationDirect.com. Most likely, I’ll also use these sensors for ATO reservoir and dosing reservoirs as they will provide my PLC with level which can be converted to volume with included software.

upload_2019-2-13_15-5-29-png.976753


upload_2019-3-5_14-52-58.png


The P2000 PLC system has a built in OLED which can give status feedback about what’s happening with the system, but for ease of use one of these HMI’s will be added down the line.

upload_2019-3-5_14-53-33.png


More to come! Still deciding on dosing pump motors and ph/orp/conductivity probe integration. If anyone has experience in the PLC automation world, your input would be greatly appreciated!

PLC is a great application especially if you already have the industrial standard 0-10 and 4-20 sensors and actuators. Some of the PLC programming environments can be quite esoteric but I’ve dealt with AutomationDirect equipment before and it’s a solid value.
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
PLC is a great application especially if you already have the industrial standard 0-10 and 4-20 sensors and actuators. Some of the PLC programming environments can be quite esoteric but I’ve dealt with AutomationDirect equipment before and it’s a solid value.
This is my first excursion into PLC’s, thank you for the encouragement! :)
 

GK3

Valuable Member
View Badges
Joined
Jan 16, 2017
Messages
1,852
Reaction score
1,339
Location
Cincinnati
Rating - 100%
2   0   0
As I continue to expand on this idea of drains and returns in the bottom of the tank and the desire to utilize a standard sump, I kept running into the same problem of how to keep the display from draining entirely into the sump. Even if this were solved, an additional problem would be how to balance the water in and water out of the display? Then it came to me. Why not use a high flow float valve to balance the flow? We rely on float valves in other areas of our aquarium set ups, why not here? It wouldn't need to be bullet proof, just help cut off the flow if too much water came down from the display and allow more if the pump is pushing too much water. I've developed a proof of concept to see if this will even work. Should have the components in a couple days!

How it should work in theory: water flows at full siphon down from display which causes water level to fluctuate in sump. As water fluctuates, the float valve will close accordingly. I'm thinking the float and pump will find an equilibrium. I can then "calibrate" the water level in the display by removing or adding water to the system.

Thoughts?

upload_2019-2-5_14-9-7.png
upload_2019-2-5_14-9-42.png

What if you ran the drains out the bottom, elbowed to the back of the tank, elbowed up to where you wanted the water line (use a tee here to go higher as a siphon break) then drop back down in the the sump. It meets your goal of no visible plumbing in the tank, but you could only get water drained if the water in the tank was high enough(from the return pump). It would effectively act like a normal overflow does.

Problem I see with your large flow float valve, is that mechanical piece that connects the float and mechanism to close/open the valve is going to get a lot of salt creep and likely fail overtime. Then you’ll siphon the whole tank dry and overflow the sump.
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
What if you ran the drains out the bottom, elbowed to the back of the tank, elbowed up to where you wanted the water line (use a tee here to go higher as a siphon break) then drop back down in the the sump. It meets your goal of no visible plumbing in the tank, but you could only get water drained if the water in the tank was high enough(from the return pump). It would effectively act like a normal overflow does.

Problem I see with your large flow float valve, is that mechanical piece that connects the float and mechanism to close/open the valve is going to get a lot of salt creep and likely fail overtime. Then you’ll siphon the whole tank dry and overflow the sump.
This was another idea I considered, but with the space I have the plumbing would be visible behind the tank which defeats the purpose of this setup.

The float valve was a long shot anyway and didn’t actually control water level in a consistent manner. Utilizing a modulating ball valve should work great though. I’ve seen several other applications in industrial setting doing something similar to my goals here.
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
The last week has involved a massive amount of research to decide which components to go with on this build. I'm glad to write, most of the control components have been ordered! Below will cover a brief overview of the components.

Control
Productivity 1000 PLC

(1) CPU
(1) Discrete Input Module (16-point)
(1) Discrete Output Module (16 points)
(1) Analog Current Combo Module (4-point Input, 2-point Output)
(2) Analog Voltage Output Module (4-point)
Raspberry PI
(1) Raspberry Pi 3B+
(1) DIN Rail Mount for Pi

Power - 5VDC and 24VDC
(1) Rhino Power Supply (24VDC 10A)
(1) Rhino Power Supply (5VDC 3A)

Interface Devices
Ultrasonic Sensor (40-300mm, 4-20ma Output)
AVA Electric Actuator (4-20ma Input)

The addition of Raspberry Pi to this build will be to facilitate a web page for monitoring and controlling the PLC. Before, the idea was to use a C-More Micro HMI but this seemed rather limiting especially with remote access to the controller. I also don't want to see a small screen with large bevel obscuring the beauty of the setup. Somehow while looking for an alternative to a classic HMI panel, the ability to utilize a IOT development platform (Node Red) came to the surface. I was even able to find a tutorial on how to establish a communication from the Raspberry Pi to a PLC via Modbus TCP.



Once complete, the dashboard should look something like a combination of these...

upload_2019-3-12_9-54-21.png


upload_2019-3-12_9-52-25.png


Most of the components should arrive later this week. Hopefully, I can start working on the PLC and Raspberry Pi communication this weekend to verify everything works as expected. Then, designing the electrical side of the stand to verify everything fits properly.
 
Last edited:
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Another part of the build will be further developing the control and monitoring features.

Probes
One way to expand on this control system to monitor pH, ORP, conductivity, dissolved oxygen, CO2, and temp is to use a RaspPi shield developed by Atlas Scientific. The Tentacle T3 can be stacked two high allowing for four isolated sensors, two temp sensors, and four 5-pin sensors (flow, pressure, CO2). This shield communicates through I2C so shouldn't get in the way of PLC communications. It is also configurable so if I choose to utilize different probes, it's a simple chip swap. Though I've never used these before, accuracy is adequate for saltwater purposes.

But more importantly, Node Red has flows and nodes to incorporate I2C communication right into the dashboard.

Whitebox Labs Tentacle T3

upload_2019-3-12_11-29-0.png



Power Control
As for controlling different 110v equipment in the sump, the plan as of now is to take a power strip with adequate room between outlets and install 24V coil relays for outlet to outlet control. I haven't yet decided if I want the relays to exist in the electrical cabinet or in the power strip itself. If relays are placed in the cabinet, then only one cord can be ran to the power strip. Though, it would need to be adequate to handle the current draw of any connected equipment. Were the relays to be in the power strip, two cords would have to be utilized: one for power, the other for relay communication. Another thought is to build outlets into the back side of the equipment cabinet itself, removing the need for a separate power module. Equipment would then just be ran to the side of the cabinet and plug in somewhere up top.
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Raspiberry Pi and PLC arrived yesterday! So excited to play around with this stuff! Everything will be DIN mounted for ease, even found a mount for the Pi.

0FE7FE94-31DD-4E86-9A9B-8164B28B933A.jpeg

4896F328-B68C-4B57-8EAA-D6D600EF4075.jpeg

Bought an additional Pi for development purposes. I’ll use it to verify everything works before flashing the new configuration to the PLC-Pi.

3F3B707F-D5BB-4AD3-902C-8EC5067DF25E.jpeg

And everything hooked up For communication.

91CEC706-2871-45C3-825B-925681442078.jpeg

A817F933-A6C8-4F1D-9F68-C358A483A4B5.jpeg

Once everything is in place on a test panel, I'll reconfigure wiring so the ethernet cable isn't so obnoxious.
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
After flashing Raspbian to a microSD, installing Node-Red was easy.

Enables ssh by creating a ssh.txt (empty file) in the /boot/ of Raspbian and using Putty to connect over Ethernet to the Pi. Once wifi is configured properly, the Ethernet will be connected to the PLC for Modbus TCP communications.

Code:
bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)

Then install a couple of useful nodes:
Code:
cd ~/.node-red
Code:
npm install node-red-contrib-modbus
Code:
npm install node-red-dashboard
Code:
npm install node-red-contrib-i2c

And enable Node-Red to run when Pi boots up:
Code:
sudo systemctl enable nodered.service

Reboot Pi and Node-Red should be up and running at http://(Pi IP Address:1880)/#/

upload_2019-3-15_10-37-44.png


As you can see, I put together a simple test to verify it works as intended. This quick flow uses a "ping" to ping Google.com every second and return the result to a gauge. Once deployed, the dashboard is available at http://(Pi IP Address:1880)/ui/

upload_2019-3-15_10-40-32.png


And a quick change to chart...

upload_2019-3-15_10-53-43.png
 
Last edited:
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Another part of the build will be further developing the control and monitoring features.

Probes
One way to expand on this control system to monitor pH, ORP, conductivity, dissolved oxygen, CO2, and temp is to use a RaspPi shield developed by Atlas Scientific. The Tentacle T3 can be stacked two high allowing for four isolated sensors, two temp sensors, and four 5-pin sensors (flow, pressure, CO2). This shield communicates through I2C so shouldn't get in the way of PLC communications. It is also configurable so if I choose to utilize different probes, it's a simple chip swap. Though I've never used these before, accuracy is adequate for saltwater purposes.

But more importantly, Node Red has flows and nodes to incorporate I2C communication right into the dashboard.

Whitebox Labs Tentacle T3

upload_2019-3-12_11-29-0.png

Ordered this Tentacle T3 shield along with pH and ORP boards. This should work well with the Pi and Node-Red-I2C to integrate seamlessly into my dashboard. Even though the PLC isn't directly reading the probe values, if something is off too much I can trigger the PLC with a modbus write command. Integrating the probes directly into the PLC was more effort than it was worth and will primarily be used for monitoring only.

Temp will be integrated directly to the PLC so a PID loop can be used for control. This isn't necessary, but I'm curious as to how stable I can get the temp. I might use the temp part of the Tentacle shield to monitor controller or lighting temperatures.
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Pi and PLC are communicating properly! Took some configuration, but this was pretty simple once I figured out what I needed to do.

Node Red reading status of the first register on the output module.

E0EC6137-3B7F-471F-A1EC-526D64A01BDE.png
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Made some progress playing around with Node-Red. Also established communication (ModbusTCP) with the PLC.

upload_2019-3-18_10-15-42.png


upload_2019-3-18_10-15-2.png


Next step will be to develop electrical area of the tank stand: build power strip module, dosing module, and sensor module. Once these modules are built it will be much easier to figure out placement in the stand. Then wiring and organizing!
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Made some progress with the controller. Decided to go with the Tentacle shield for PH/ORP/Cond/DO monitoring by stacking two shields. Stacking will also give me (4) ports to use with peristaltic pumps. The pumps offered by Atlas Scientific seem to be decent quality and have numerous functions built into the board. So far, I only have one board for development, but another is on the way with a peristaltic pump for testing.

4E62F199-1775-4EC7-A871-8030377415FE.jpeg
D720FD53-DADB-4A53-A0ED-6FAD66E12834.jpeg

The datasheets for these EZO boards show a maximum polling rate of 1.5 seconds, but 1 second works find once the code is tweaked. Getting the EZO boards to work properly in Node-Red took some doing, I'm happy to share my code if anyone is interested.

upload_2019-3-24_17-17-13.png




On another note, the critical part of this system arrived also. Since this was ordered from Ebay, I wasn't quite sure what would arrive. This actuator seems to be every bit the quality of a AVA actuator at a fraction of the cost. To be extra sure, I took this apart to see if the internals matched the quality of the externals. Should be interesting getting this implemented in my concept tanks. Don't yet have the ball valve, should have it next week as it was ordered through a UK distributor.

8F9C8763-0D49-48A4-B56C-5F58871FB0A4.jpeg
73CCBE9F-8ADD-4543-BF5B-F01F0DE70D92.jpeg
0F194F50-C1AD-4F5C-BECD-CD153D85860A.jpeg
 
Last edited:

TheWB

Valuable Member
View Badges
Joined
Sep 22, 2017
Messages
2,323
Reaction score
3,589
Location
Puyallup,WA
Rating - 0%
0   0   0
Ya know, from a technical standpoint I have absolutely no idea what I’m reading in this thread but I like it. The idea of being able to come up with the concept and then build a controller to make it work is really cool. I hope it all works perfectly when you are done.
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Ya know, from a technical standpoint I have absolutely no idea what I’m reading in this thread but I like it. The idea of being able to come up with the concept and then build a controller to make it work is really cool. I hope it all works perfectly when you are done.
Thanks! We'll see if it actually works though... ;)
 

Clear reef vision: How do you clean the inside of the glass on your aquarium?

  • Razor blade

    Votes: 160 61.5%
  • Plastic scraper

    Votes: 69 26.5%
  • Clean-up crew

    Votes: 90 34.6%
  • Magic eraser

    Votes: 44 16.9%
  • Other

    Votes: 69 26.5%

New Posts

Back
Top