Open-Source Professional-Grade Aquacontroller

In your case, I'm assuming you have: RPi -> 3.3V GPIO -> Transistor -> 120V relay bank -> Power Cable -> (Return Pump or something similar)
In this system, it would go: P1AM -> Return Pump.
 

I followed that ^^

Your solution is much easier and more efficient
 
This is the module I'm using for my 120V peripheral modules. It snaps into the side of the P1AM and has 8x reed relays that are switched by the 24V applied to the power supply and output 120V (or whatever voltage you need) from each channel.

The reef-pi is a really cool project but the learning curve is entirely too high for everyone who isn't an engineer. I do industrial PAC systems for a living and this is more in line with how we architecture our systems for reliability and serviceability.
 
Here's a picture of the P1AM (center) in its "forever home". Below is the Apex Jr. it will be replacing, and right inside the cabinet is the IOT server that's going to manage local and cloud data.

Just FYI, this is NOT UL COMPLIANT. At least not yet.

20200414_080810.jpg
 
New Update!
-Thingsboard server is running, receiving data, displaying it on the dashboard
-All wiring for the discrete inputs, discrete outputs, and relay outputs is done
-I made a simple TOF program to control one of the relays from the switch on the front of the P1AM. Nothing fancy.
-The Analog Input and RTD temp. probe IO modules will be in tomorrow. They'll need some wiring.

What I haven't done yet::
-I haven't really done much research on how the touch panel is going to function. The minimum amount for a touchscreen is $600.
-Program some basic alarms, show SMS/Email notifications (needs to be configured in ThingsBoard)
-Wire/Calibrate the pH probe.
-Set up trend graphs

 
Oh, and of course the source code repository:


Most recent changes:
-Took out RTCZero library because it randomly seems to stop compiling
-Did some fancy pointer/reference magic to reduce the number of arguments from 2 to 1
-Did a terrible job debugging and placed random "return;" statements while testing something else.
-Did some fancy formatting of the task declarations. A little "fancy-pants" I know.
-Right now, ThingsBoard works (based on "PubSubClient.h"). Use it as an "either/or" with the other mqtt task, unless you can make it work.
-Added a picture of the assembly.
-Added PLC-like logic "TOF" from plclib to turn open RO1-NC1 in slot 3. Kind of a "Hello World" type deal with the Par38 LED on a gooseneck over the freshwater tank.
 
What suprises me is that I first see the P1AM on ARC forum. Arduino, the poor cousin now. I'm curious about the productivity block add on and what it looks like.
 
What suprises me is that I first see the P1AM on ARC forum. Arduino, the poor cousin now. I'm curious about the productivity block add on and what it looks like.
P1AM is literally just an Arduino MKRZERO in IP20 housing. I actually haven't used the productivityblocks software, I've just programmed it straight from the Arduino IDE based on the examples.

There's a handful of little PLC-like units in its class (Controllino, Programmino, Velocio) but the P1AM is the only one I've found so far with enough expandable IO options such that I'm not afraid that I'm going to get into a situation where I've invested a lot of time and energy into making a platform but then can't drive the actual electrical circuitry.
 
I did a little bit of cleanup of the wiring last night.
Next things on my list:
-Wire up the pH probe + transmitter to the Analog Input card
-Procure an RTD temperature probe, wire into the RTD device.

If someone knows the web-development side and wants to help, that'd be amazing. I plan on using a simple MQTT pub/sub data exchange over a local network (No ECCX chip on the P1AM to do SSL. Software SSL connection is slow as christmas).


20200422_223440.jpg
 
Trying to follow the code..... all I have is so far is that those event names need a little work. Some are doers, givers, takers ect.... I'm a helper. helping bump that is.
 
Trying to follow the code..... all I have is so far is that those event names need a little work. Some are doers, givers, takers ect.... I'm a helper. helping bump that is.

Lol that's ok. I realize that the technical knowledge to make the P1AM code work is pretty steep.

I'd try starting with a basic project and working my way up to where I have it now. Don't even use the taskscheduler to begin with - it's probably one of the more complicated constructs being used, especially since it's a "call-by-reference" type getup.

There's also "ProductivityBlocks" from AutomationDirect that has a more graphical/block-based interface, which is going to be the more beginner-friendly way.
 
Here's my BOM for components from AutomationDirect. A lot of these things are really unnecessary (and far above and beyond what Apex offers.) like Signal Towers, Enclosure/subpanel and lighting, etc.

This is enough to get you:
8x 120V outlet control
4x Temp probe monitoring
4x pH/ORP inputs
2x variable speed DC motor control
8x switch monitoring
8x valve/actuator control

Item CodeQtyDescriptionPriceTotal
PSL-24-090
1​
RHINO switching power supply, 24 VDC (adjustable) output, 3.8A, 91.2W, 120/240 VAC or 125-250 VDC nominal input, 1-phase, enclosed, plastic housing, IP20, 35mm DIN rail mount, screw terminals, NEC Class 2.
$60.00​
$60.00​
P1AM-100
1​
ProductivityOpen Arduino-compatible CPU, microSD card slot, (1) microB-USB port(s), external 24 VDC required.
$49.00​
$49.00​
P1-08TRS
1​
Productivity1000 relay output module, 8-point, 6-24 VDC/6-120 VAC, (6) Form A, (2) Form C, 8 isolated common(s), 1 point(s) per common, 3A/point. Requires P2-RTB or P2-RTB-1 removable terminal block or ZIPLink pre-wired cables.
$46.50​
$46.50​
P1-01DC
1​
Productivity1000 DC power supply, 12-24 VDC nominal input. External power supply optional. For applications not exceeding (8) P1000 modules.
$45.00​
$45.00​
P1AM-ETH
1​
ProductivityOpen Ethernet shield, 1 port, (1) Ethernet 10/100Base-T (RJ45) port(s). For use with ProductivityOpen P1AM-100 CPU.
$39.00​
$39.00​
P1-08ND3
1​
Productivity1000 discrete input module, 8-point, 12-24 VDC, sinking/sourcing, 2 common(s), 4 point(s) per common. Requires P1-10RTB or P1-10RTB-1 removable terminal block or ZIPLink pre-wired cables.
$36.50​
$36.50​
P1-08TD2
1​
Productivity1000 discrete output module, 8-point, 12-24 VDC, sourcing, 1 common(s), 8 point(s) per common, 1A/point. Requires P1-10RTB or P1-10RTB-1 removable terminal block or ZIPLink pre-wired cables.
$36.00​
$36.00​
DN-T12-A
1​
DINnector single-level terminal block, accepts wire size 24-12 AWG, gray, 20A, 600V rated (UL), 35mm DIN rail mount. Package of 100. For use with jumpers DN-24J2Y, DN-2J2Y and DN-3J2Y.
$43.00​
$43.00​
P1-04RTD
1​
Productivity1000 temperature input module, RTD, 4-channel, 16-bit resolution, input RTD type(s): Pt100, Pt1000, JPt100, Cu10, Cu25 and Ni120. (1) P1-10RTB screw terminal block included.
$121.00​
$121.00​
P1-4ADL2DAL-2
1​
Productivity1000 analog combo module, Input: 4-channel, voltage, 0-10 VDC, Output: 2-channel, voltage, 0-10 VDC. Requires P1-10RTB or P1-10RTB-1 removable terminal block or ZIPLink pre-wired cables.
$111.00​
$111.00​
RTD0100-10-010-H
1​
ProSense temperature sensor, Pt100 RTD, M12 probe, 160mm insertion length, 10mm probe diameter, stainless steel sheath, 4-pin M12 quick-disconnect.
$30.50​
$30.50​
SE-SW5U
1​
STRIDE industrial unmanaged Ethernet switch, 5 ports, (5) Ethernet 10/100Base-T (RJ45) port(s), -10 to +60 deg C, plastic housing, IP40, 35mm DIN rail mount.
$95.00​
$95.00​
DN-R35S1-2
1​
DIN rail, slotted, 35mm, 7.5mm height, 1m length, plated steel. Package of 2.
$10.00​
$10.00​
TFFN18BK
1​
TFFN hook-up wire, 18 AWG, 16-stranded, bare copper, black insulation, 600V, 500ft spool. Alternate part ID: 106100501440.
$33.50​
$33.50​
MW2016HLL
1​
AttaBox MachoBox series enclosure, NEMA 1/3R/4X/6P/12, 20 x 16 x 8in (HxWxD), wall mount, fiberglass reinforced polyester, gray, single-door, (2) twist-lock latches, SAR acrylic window.
$393.00​
$393.00​
BPM2016CS
1​
AttaBox subpanel, carbon steel, white, polyester powder coat finish. For use with 20x16 (HxW) FRx201610xx Freedom series and Mx808xx & WH-M2016Hxx MachoBox series enclosures.
$31.50​
$31.50​
MES-302A-RYG
1​
Patlite LED signal tower, (3) tiers, 25mm diameter, red/amber/green, permanent light function, 24 VDC, NPN polarity, clear lens, 40mm body length, silver, 360 degree viewing angle, direct mount, IP42.
$132.00​
$132.00​
CD12L-0B-020-C0
1​
Cable, M12 right-angle female to pigtail, 4-pole, PVC jacket, gray, 6.5ft/2m cable length, IP67.
$8.50​
$8.50​
DN-24J2Y
1​
DINnector terminal block jumper, push-in type, 24-pole, orange, 25A, 600V rated (UL). Package of 5. For use with multiple terminal blocks.
$18.50​
$18.50​
DN-EB35MN
1​
DINnector screw-down end bracket, 9mm wide. Package of 20. For use with 35mm DIN rail.
$21.00​
$21.00​
DN-G10-10
1​
DINnector grounding terminal block, accepts wire size 24-10 AWG, green and yellow, 35mm DIN rail mount. Package of 10. Use to mechanically and electrically connect wires to 35mm DIN rail through the clamping foot.
$28.00​
$28.00​
025400-00
1​
Stego LED enclosure light, 100-240 VAC operating voltage, on/off switch, 13.8in length, 400 Lm, magnet mount, 2-pole plug with snap lock, 5W, IP20.
$87.00​
$87.00​
FA-REC3
1​
Three-receptacle outlet, 15A combined, 125 VAC, DIN rail mount, for laptop computers and test equipment.
$24.50​
$24.50​
TOTAL
$1,500.00​
 
Trying to follow the code..... all I have is so far is that those event names need a little work. Some are doers, givers, takers ect.... I'm a helper. helping bump that is.

lol so I just got your "event names" reference. That was a copy-paste directly from the Chronos library I had for testing.

I'd recommend starting with a blank project and then importing the software one module at a time. After 1 or 2, you'll notice that the structure is very logical and uniform and that each of these programs is a truly independent and modular component of a conceptual "machine".
 
New Update: MQTT Pub/Sub API is working! (Thingsboard running on the remote client).
I don't plan on putting a substantial amount of work into the Thingsboard platform, nor am I particularly enamored with it. Hopefully someday someone will make their own web platform for aquaria that implements an MQTT Pub/Sub API.
fZVPaeaL8j.gif
 
Back
Top