-
Notifications
You must be signed in to change notification settings - Fork 97
DIY REM Chem Controller
So you have set up njsPC and dashPanel but now want to manage your water chemistry. The REM Chem controller is a fully functional chemistry controller that interfaces with sensors to manage the pH and ORP of your water. This guide is written to give you some ideas regarding equipment and setup and follows the equipment and setup that I have been using on my own pool. Bear in mind the equipment used here can be substituted with a variety of hardware items as many others have cobbled their own equipment lists.
The REM Chem controller is feature rich and will provide automated dosing for chlorine as well as acid. In my system I use tank based dosing for acid and IntelliChlor for sanitation control. The system operates pretty hands off and only requires adding acid to the acid tank periodically. There are a number of convenience features as well as safety features built into the system.
From dashPanel you can control all aspects of your chemistry controller. This display allows you to view the current levels, add chemicals to your chemical tanks, enter testing results, manually dose chemicals, and set mix times after adding other chemicals. From here you can also adjust your setpoints to match the target chemistry for your water.
REM Chem performs many checks to ensure the conditions are right for dosing chemicals. It does this by constantly monitoring conditions for dosing. Here are some of the safety features that are built into the software.
pH Control
- Flow Verification - Using a separate flow switch REM Chem will disable dosing an mixing operations when no flow is detected.
- Body Selection - This ensures that doses can only occur when the assigned body is engaged. Depending on how your pool is set up you may not want to dose chemicals while in spa mode for instance. While switching body modes, acid doses are suspended.
- Startup Delay - Delays any dosing or mixing operations to allow the system to stabilize before starting or resuming a dose.
- Max Dose by Volume/Time - Limits the maximum volume of a single dose. By limiting the dose volume you can fine tune your dosing strategy to reduce overshooting your setpoint.
- Disable on Freeze - Ensures acid is not dosed while a freeze protection event is underway.
- pH Priority - When dosing acid REM Chem will disable dosing for sanitation. This includes shutting down IntelliChlor while the dosing pump is running.
- Max 24hr Limit - Limits the amount of acid that can be dosed over a rolling 24 hour period. When the max limit is reached REM Chem will no longer dose acid. When the calculated total is less than the set volume dosing will automatically resume.
ORP Control The safety features for ORP control are dependent upon your sanitation dosing equipment. When using IntelliChlor for sanitation the safety requirements are fundamentally different than those required when dosing chlorine from a reservoir tank.
All Dosing Equipment
- Flow Verification - Like the pH control REM Chem will not initiate a dose for ORP control when no flow is detected.
- pH Lockout - If the pH is higher than the assigned threshold then sanitizer dosing is suspended. In high pH conditions the ORP values become less accurate so REM Chem will first ensure pH is in range before considering dosing sanitation.
- Body Selection - This ensures that doses only occur when the assigned body mode is selected.
- Disable on Freeze - Ensures chlorine or the chlorinator will not dose while a freeze protection event is underway.
Liquid Chlorine Additional safety features are applied when the ORP dosing strategy is using a peristaltic pump to dose chlorine.
- Max Dose by Volume/Time - Limits the maximum volume of a single dose. By limiting the dose volume you can fine tune your dosing strategy to reduce overshooting your setpoint.
- Startup Delay - Delays any dosing or mixing operations to allow the system to stabilize before starting or resuming a dose.
- Max 24hr Limit - Limits the amount of chlorine that can be dosed over a rolling 24 hour period. When the max limit is reached REM Chem will no longer dose chlorine. When the calculated total is less than the set volume dosing will automatically resume.
In addition to its safety features, your REM Chem controller has many features that allow it to automate your chemistry with very little intervention.
- pH and ORP Levels - At a glance you will be able to see the current pH and ORP levels without breaking out your test kit.
- CSI/LSI Levels - The Calcite Saturation Index and Langelier Saturation Index are calculated constantly to keep track of the nature of your water. These indexes are used to determine whether a scaling or corrosive nature exists with your water.
- Supply Tank Monitoring All you need to do is tell REM Chem the capacity of your supply tanks and REM Chem will keep track of how much chemical has been dispensed. A quick glance at the REM Chem control panel and you know whether you need to add any chemicals.
- Demand Based Dosing - REM Chem is constantly calculating chemical demand and uses these values to determine how much and when any chemical should be dosed. This is different than many of the Chemistry controllers out there that only perform time or percentage based dosing. REM Chem takes the amount of chemical needed to balance the water into account when applying a dose.
- Manual Dosing/Mixing Control - You can supply a measured chemical dose manually from within the interface. When the dose is complete it will resume automatic dosing. Likewise if you add other chemicals and would like them to mix for a period of time you can add a manual mix that will suspend automatic dosing until the timer expires.
- Open Interface Control - Like all aspects of njsPC you can use the built in interfaces for web sockets, MQTT, Influx, and others with your 3rd party applications.
- Charting, Graphing, and Dashboards - All elements of your chemistry state can be output to InfluxDB for integration into your custom dashboards.
- Alert and Warnings - REM Chem monitors your chemistry conditions, levels, and hardware.
Type | Text | Description | Remedy |
---|---|---|---|
Alarm | No Flow Detected | If all other conditions for dosing have been met and the dosing cannot occur | Check flow sensor and ensure pump is running |
Alarm | pH High | The pH level is higher than the configured limit | Verify your pH sensor is accurately reading pH and/or dose acid to reduce pH level |
Alarm | pH Low | The pH level is lower than the configured limit | Verify your pH sensor is accurately reading pH and/or add base to increase pH level |
Alarm | pH Tank Empty | The pH tank is empty | Add acid to your acid tank |
Alarm | pH Tank Low | The pH tank is nearing empty | Add acid soon to your acid tank |
Alarm | ORP High | The ORP level is higher than the configured limit | Verify your ORP sensor is accurately reading ORP |
Alarm | ORP Low | The ORP level is lower than the configured limit | Verify your ORP sensor is accurately reading ORP and/or add chlorine to increase ORP level |
Alarm | ORP Tank Empty | The ORP tank is empty | Add chlorine to your ORP tank |
Alarm | ORP Tank Low | The ORP tank is nearing empty | Add chlorine soon to your ORP tank |
Alarm | Freeze Protection Lockout | A freeze protection event has locked out dosing | Wait until it warms up and the freeze protection is cleared or uncheck the Disable on Freeze option |
Fault | pH Probe Fault | Communication with the pH probe has generated a fault | Review your Relay Equipment Manager configuration for troubleshooting |
Fault | pH Pump Fault | Communication with the acid pump has generated a fault | Review your Relay Equipment Manager configuration for troubleshooting |
Fault | ORP Probe Fault | Communication with the ORP probe has generated a fault | Review your Relay Equipment Manager configuration for troubleshooting |
Fault | ORP Pump Fault | Communication with the chlorine pump has generated a fault | Review your Relay Equipment Manager configuration for troubleshooting |
Fault | Chlorinator Body Mismatch | The chlorinator was assigned to a different body than the REM Chem body | Ensure the chlorinator bodies match in the configuration |
Fault | Body Capacity not Valid | The capacity for the assigned body has not been supplied or is invalid | Double check the njsPC configuration for the body capacitie(s). |
Warn | Corrosion May Occur | The CSI/LSI index has fallen below the acceptable limit and plaster corrosion may occur | Perform functions to increase index * Increase pH Level * Increase Total Alkalinity within limits * Increase Calcium Hardness within limits |
Warn | Scaling May Occur | The CSI/LSI index has risin above the acceptable limit where scale can form on surfaces | Perform function to decrease index * Decrease pH Level * Decrease Total Alkalinity within limits |
Warn | Invalid Setup | Setup options are incorrect | Review REM Chem configuration setup |
Alert | pH Lockout | ORP dosing has been suspended because pH is too high | Decrease pH level to below lockout setpoint |
Alert | pH Daily Limit Reached | The 24hr pH dosing limit has been reached | Allow the previous doses to become older than 24 hours and let the pH dosing resume normally |
Status | Dosing Acid %mL of %mL | An acid dose is underway and will count up to the total mL calculated for the dose | |
Status | Dosing Chlorine %mL of %mL | A chlorine dose is underway and will count up to the total mL calculated for the dose | |
Status | Dosing Chlorine %lbs of %lbs | A chlorinator dose is underway and will count up to the total lbs calculated for the dose | |
Status | Mixing pH %hrs %min %sec | A mix operation for pH is underway and will count down to 0 | |
Status | Mixing ORP %hrs %min %sec | A mix operation for ORP is underway and will count down to 0 |
There are two primary chemicals that are used to maintain the water balance for your pool water. These include muriatic acid and chlorine. When these two chemicals are in the correct proportions the management of your pool becomes a whole lot easier. While these are not the only two chemicals used for maintaining healthy pool water, they are the ones that require the most attention. Having a system that automates the testing and management of these tasks really shortens the pool maintenance requirement.
The pH of your water is important for a couple of reasons. First, if you find scale forming on your tile this is a sign that your Calcite Saturation Index (CSI) is high or has been high at some point. Unfortunately, a constant yo-yo of dosing acid to keep the pH levels in check takes more effort than I am willing to undertake. So a system that tests the pH many times a minute and doses acid to counteract the increase in pH, does a very good job at managing the CSI of your pool water.
Another reason for maintaining your pH is that sanitation is more effective at lower pH levels. If you have a plaster pool it is common for the pH to rise each day and unless kept in check it will rise high enough to make sanitation more difficult. While there are differing opinions on this, I have witnessed the changes that occur when the pH changes in my pool.
While you may be familiar with free chlorine and total chlorine measurements as a pool owner, as of this writing there are no reliable and cost effective probes out there to measure these values. This is primarily due to the way they are measured. To measure free chlorine a know quantity of reagent chemical is added to a known quantity water which causes a color change by reacting with the free chlorine. The number of drops determines the amount of free chlorine in the sample. Then to get the combined chlorine another reagent is used and the drops are counted.
Now there have been developments using amperometric sensors. These do not use reagents to perform the testing but they are very expensive and the ones that I have read about require a lot of maintenance and calibration. Perhaps in the future we may be able to measure a free chlorine level reliably and inexpensively but that is not the case today. Measurement will require some advanced free chlorine sensor that is accurate, low maintenance, and economical. When that day comes I am sure REM Chem will include it in it monitoring and management.
So our measure of sanitation is Oxidation Reduction Potential (ORP). This differs from determining the level of sanitation using a chlorine measurement in that it does not measure the chlorine levels found in the pool. It measures the ability of your sanitizer (chlorine) to oxidize the baddies in the water. While there are many out there that discount the ability to manage sanitation levels via ORP, you can get to know your pool with ORP and know where the ORP level should reside to keep your water clean and clear. In some respects it is a better measure since the existence of chlorine does not necessarily indicate that it is capable of breaking down any infectious swill in the water.
A chemistry controller typically contains two main components flow cell that contains sensor probes, and a dosing mechanism that dispenses chemicals. Each of these components work together to test the water and add the appropriate amount of each chemical to maintain a setpoint. In this document we will go through each of these items and how they are assembled to build your own chemistry controller.
Here is a schematic of my REM Chem installation. As you can see the plumbing involved drilling and tapping two 3/8" NPT and one 1/4" NPT holes in the pipe and threading a pvc adapter into the plumbing.
A flow cell is a piece of equipment that is used to move water past your chemistry sensor probes. It is installed with an inlet and an outlet that ensures the probes always stay wet and are reading a representative sample of your water.
There are a number pre-made flow cells out there. While you could certainly build your own from PVC there are advantages to using one of the pre-built ones out there. For my purposes I bought an IPS Flow Cell assembly. This came complete with a flow switch that is integrated into the REM Chem software to ensure chemicals are not dosed when there is no detected flow. This is also the same cell that is used for some models the Globe and Rola-Chem controllers.
It also came with two probe ports which I installed a pH and ORP sensor from Atlas Scientific into. However, the threaded port holes were only 1/2" NPT and the probes were 3/4" NPT. After carefully drilling and running a tap into the holes this problem was easily overcome. I mounted this to the back of my IntelliCenter load center. While a convenient location for the flow cell it was also very good for protecting against freeze conditions. I simply put a contractor bag over the whole assembly and the transformer inside the load center keeps the flow cell and the probes several degrees warmer than the surrounding air.
Equipment/Materials Used:
- IPS Complete Flow Cell
- 3/8" Tubing
- (2) 3/8" John Guest NPT elbows
- 24-2awg PVC jacketed wire
Plumbing the flow cell is a matter of finding a place in your plumbing that will provide consistent flow between the inlet and the outlet on the flow cell. For me, I simply drilled an tapped the pipe before my gas heater for the inlet and after the gas heater for the outlet connection. Then I threaded the John Guest elbow fittings into the pipe using the hole I tapped and connected the flow cell to the fittings using 3/8" tubing. It is remarkably effective and very easy to do because there is no need to cut the pipe and insert additional fittings.
The flow switch is connected to a GPIO pin on the Raspberry Pi using 24awg wire in the same manner you would connect a push button to a Raspberry Pi. However, if you are already using a Sequent Mega-BAS on your pi simply configure one of the inputs as a dry contact and connect it up there.
For reading pH and/or ORP you will need some sensors. I used the industrial line of sensors from Atlas Scientific as well as their embedded EZO circuits. These are remarkably easy to set up and there is direct software support for them in REM. I also purchased a WhiteBox Labs Tentacle T3 hat for the Raspberry Pi that simply sits on top of the Pi and provides connections for all three sensors provided by the industrial pH and ORP probes.
Equipment/Materials Used:
- WhiteBox Labs T3 Hat for Raspberry Pi
- Atlas Scientific EZO-pH Circuit
- Atlas Scientific EZO-ORP Circuit
- Atlas Scientific EZO-RTD Circuit
- Atlas Scientific Industrial pH Probe
- Atlas Scientific Industrial ORP Probe
First follow the instructions to switch all three of the EZO circuits to I2c mode using the instructions on the Atlas Scientific site. You will find this information in the datasheet. There is also a handy little USB circuit that they sell that simplifies this process. Once you have done this then install the EZO-pH, EZO-ORP, and EZO-RTD circuits into the isolated carriers on the WhiteBox Labs T3 hat.
Next the Atlas Scientific Industrial probes do not come with connectors. I installed SMA male connectors to the end of the probes and used bulkhead connectors on the bottom of my controller box to connect the probes. Now if you want to be a masochist then you can use solder connectors but be aware the ground shielding on both of the probes are not tinned and will require some effort to get them to take any solder. I proved it can be done but not without careful scraping of the individual strands on the braided coax shield and a bath of flux. Do yourself a favor and simply use crimp connectors.
Once the Raspberry Pi is installed in the enclosure then you can simply use some pre-made SMA pigtails to connect the Whitebox Labs T3 to the bulkhead connectors. Then simply thread the probes onto those connectors for a neat, clean, and professional installation. If you install the bulkhead connectors on the bottom of the box, then these connectors are shielded a bit from the weather.
The Atlas industrial pH probe has a built in temperature sensor. The advantage to this is that the temperature calibration for pH is built right into the pH probe. However, if you are using the Atlas Lab or Consumer grade probes you will need to set up a water temperature feed in the software to the probe. This is simply a checkbox in dashPanel that will send the water temperature to the probe so that it can calculate a properly adjusted pH value.
For my acid tank I used the same tank and pump combination that is used by the Pentair IntelliChem and/or IntelliPh system. This includes a tank mounted Stenner pump and an ingenious method for adding acid to the tank. While the tank is only 3 1/4 gallons and there are plenty of 7 or even 15 gallon tanks out there, this tank typically lasts about 2 months before having to add acid now that I have managed to push my total alkalinity down to 60ppm. When it was sitting at an impossible 200ppm I added acid to the tank every couple of weeks.
The acid tank came with all the fittings and tubing to install the acid injector. But since I didn't like that the acid injector would be sticking out on my plumbing I decided to tap a 1/4" elbow into my plumbing about 12" before my IntelliChlor. This makes the tubing sit parallel to the return pipe instead of vertical when the included check valve is installed.
Wiring of the acid pump is done by connecting a 24vdc power supply through a relay on the Raspberry Pi. When there is a call for acid REM Chem will energize the pump for a calculated period of time. So when a pump rated at 127mL/min runs for 45 second it will dose 93.75mL of chemical. This dispenses the correct amount of acid to meet the calculated Acid demand.
Equipment/Materials Used:
- 1/4" male to female PVC elbow
- Pentair 522472 IntelliChem Tank Assembly w/Pump
- Sequent Relay
My installation does not contain a chlorine tank. However, if you would like to dose liquid chlorine to maintain an ORP level then REM Chem supports this ability. Simply connect a chlorine tank with a pump to a relay and assign it to the hardware setup in dashPanel. The controller will dose chlorine as well as acid when the sensors feel it is needed. The chlorine and acid tank assemblies for Pentair are different part numbers.
Equipment/Materials:
- 1/4" male to female PVC elbow
- Pentair 522473 IntelliChem Tank Assembly w/Pump
- Sequent Relay
The system installation for this chemistry controller is straight forward. First, you need to install the flow cell assembly, plumb the flow cell, and install your chemical tanks. Then we will wire up the electrical connections and finally, configure the controller. I am going to assume that you have njsPC, dashPanel, and REM installed already. If you do not refer to the software section in the DIY Standalone Pool controller wiki.
If you are using the same flow cell and probes that I am using you will need to drill and tap the flow cell for 3/4" NPT threads. This must be done carefully as there is just enough plastic material on the flow cell to accommodate the larger hole size. This is best done using a drill press but if you do not have one it can be done with a hand drill to enlarge the 1/2" hole but you must go slowly and not apply too much pressure while drilling.
Before you begin, remove the valves on the bottom of the flow cell and the flow switch on the top of the flow cell. You want to be working with the flow cell acrylic piece only. These other items will impede your ability to drill the holes properly. Next you should mount the flow cell to a jig. I made a jig from 1/2" straight poplar by screwed together in an L formation where I could mount the flow cell to the back of the vertical portion of the jig.
Screw the flow cell to the vertical board while letting it rest on the bottom horizontal board. This provides a way to keep the flow cell in position while drilling out the holes. I recommend you do this or you may end up destroying a perfectly good flow cell should the drill bit catch. This will also make sure you are drilling the holes in the position you want.
If you are using a drill press clamp the jig to the drill press table so that the holes are offset. Use a very low speed on the drill press and very little pressure. If the bit begins to chatter you are using too much pressure on the press.
If you are not using a drill press place the jig on the ground and stand on it so that it cannot move while drilling. Then stand over the hole and be very careful to get the hole as vertical as possible. Try to keep the drill offset so that the holes are a bit off center from the existing 1/2" holes.
Use a 59/64" bit and enlarge the holes to the proper size.
After you have drilled the holes use a 3/4" NPT tap. Make sure this is an NPT tap so that the taper on the probe will seat and seal in the threaded hole. Keep the tap straight as you thread it into the hole continuously checking for proper alignment. As you screw in the tap remember that for every 3/4 turn you make on the tap back the tap out at least a 1/2 turn. This cleans the new threads you cut. Also, leave about 10 threads on the top of the tap so that the probe will make positive engagement as you screw it into position.
Reassemble the Flow cell with the three ball valves and flow switch. Use several wraps of teflon tape and do not overtighten the threads. Teflon tape is what makes the fittings water tight not the act of tightening the component into the hole. If you overtighten you risk breaking the flow cell housing.
Mount your flow cell to a convenient location. If you have an automation system like IntelliCenter, IntelliTouch, or EasyTouch you can simply mount the cell to a 1/4" to 1/2" piece of ABS plastic mounted to the back of your load center. I happened to have an aluminum plate left over from a previous project so I used that. See the picture above.
This is a very convenient location because if you live in a place where you do not winterize your pool, you can simply cover the entire load center with a thick contractor garbage bag and the heat from the internal transformers will keep the probes from freezing when there are a few hours below 32F during the overnight hours. The trapped heat from the equipment will keep the temperature above freezing.
Your flow cell needs water to flow through it so that the probes are measuring a representative sample of the water in the pool. So there are a number tap locations for the inlet and outlet (effluent).
Find a location for the inlet and outlet. The idea here is that the pressure should be higher in the plumbing where the inlet is plumbed than that of the outlet. It is best if you drill into a fitting so that the tapped fitting has a thicker location to tap into. If you do not have a fitting in a convenient location, you can cut a 2" slip fitting in quarters and glue one of the pieces to the pipe where you plan on tapping the fitting. Use a clamp to get the fitting tight to the pipe. You have a few location options here.
Potential Inlet Locations:
- Before a gas heater - This will provide less pressure than installing the inlet just after the pool pump. If you are having flow issues with your flow cell move the inlet to before the filter.
- Before the pool filter after the pool pump - If you install your inlet tap before the pool filter it is highly suggested that you install a strainer in the plumbing before the flow cell.
Potential Outlet Locations:
- After a gas heater - If you have a heater bypass this may not be enough flow restriction if the inlet is just before the gas heater.
- Fitting threaded into the pool pump drain plug - The suction from the drain tap in the pump will enhance the flow through the flow cell.
- Prior to the pool return valve - This location can be used if there is no convenient place to tap the pipe when a chlorinator is installed. However, this should be the last resort since it is likely you will be injecting chemicals upstream of this location.
For the taps I simply tapped the plumbing with a 3/8" NPT John Guest elbow. I used this so that the inlet and outlet plumbing ended up parallel with the pipe. This way there is less chance of breaking off the connection while performing gymnastics on the equipment pad.
You can also use 3/8" tubing connectors for Globe flow cells. These can be found online for about six bucks each and are carried by most of the online pool supply houses. These use a 1/4" NPT tap and are threaded into the pipe in the same way as described above.
Find a good location for the tank(s) in a location where you can get to them to easily refill them. It is a good idea to place them out of the way so that they are not close to equipment that may be damaged by vapors escaping the tanks. The most susceptible equipment are metal electrical boxes and electronics. If you are constrained in where your placement might not be ideal you can extend the vent tubing to a location that is more remote. This will vent any gasses away from sensitive equipment.
If you are using the Pentair chemical tanks I would suggest you bolt them to the equipment pad and if you are using other branded tanks make sure that they cannot be accidentally knocked over. Think about whether dragging a garden hose around the pad might end in disaster.
There is only one plumbing connection for each your chemical tank(s). Refer to the diagram above for the acid injection point in the plumbing. If you also have a chlorine tank, install that injection point at least 12 inches downstream of the acid injection point.
Your injection point should include a check valve. If you do not have a check valve, there is potential for the water in the plumbing to make its way back into your chemical tank. In that instance you will save on chemicals but never balance your pool.
The flow switch can be wired using a couple of different methods.
Method 1 - Using a Sequent MEGA-BAS digital input This is the most straight installation for the flow switch. Simply connect the two wires from the flow switch to one the flow MEGA-BAS inputs. The jumper for this input should be installed on the middle set of pins. Then configure REM to use the input as a digital input.
Method 2 - Using a GPIO pin on the Raspberry Pi Another method for connecting the flow switch is to use a GPIO pin input. First configure the GPIO pin in REM as an input. Then wire up the switch as you see it below.
The Atlas Scientific Industrial probes do not come with SMA connectors. This means that you will need to add two connectors to the pH probe and one connector to the ORP probe. An SMA connector is a small shielded connector that screws onto an SMA female connector. Use SMA crimp connectors compatible with rg174 cable unless your solder skills are very good. The probe's coated wire on the shielding is very difficult to solder. It took me destroying about 4 connectors each before getting a good solder on the wire.
I color coded my connectors using colored shrink wrap. This isn't required because it is very hard to mess up which connector is which. The pH probe will have two connections and ORP will have one. The temperature portion of the pH probe will also appear to be smaller when you are finished. However, if you have colored shrink wrap use it. If you do not have colored shrink wrap do not forget to add shrink wrap to protect your connections and reduce stress on the connector.
After you have added the connectors to probes, connect an SMA pigtail to a bulkhead SMA female connector that is drilled through your enclosure. Mount these so they protrude out the bottom of the enclosure as this will give some protection from rain. So one end of the pigtail will be connected to the appropriate EZO circuit and the other end to the bulkhead connector. Then screw the SMA male connector that you put on the end of the probe to the other end of the bulkhead connector. When you are finished with all three connections you will have a connection for pH, Temperature, and ORP.
Assuming you are using the same equipment that I am, mount the Whitebox Tentacle T3 to the end of your Raspberry Pi stack. There are two versions of this board out there. The original T3 and the T3 MkII. You can tell them apart because the original T3 had BNC connectors and the MkII uses SMA connectors. The SMA connectors are delicate on the MkII so when tightening the SMA connectors to the board be careful to not overtighten them. You will break the connector off the board and have to solder it back on.
In port 1 install the Atlas Scientific EZO-ORP circuit making sure of its direction. The VCC, PRB, and PGND connectors are closest to the probe connectors. In port 2 install the Atlas Scientific EZO-PH circuit making sure of its direction. Finally, install the Atlas Scientific EZO-RTD circuit into the non-isolated port. It is important that neither the EZO-ORP or the EZO-PH circuits are installed in non-isolated port, only the EZO-RTD will function without isolation.
Alright so now we have all the hardware set up that is required to measure our temperature compensated pH and ORP. However, before we start installing probes, we must first calibrate them. Please read the datasheets for the care and handling of your probes. If they are not installed the the flow cell they should have the cap that shipped with the covering the end of the probe. This cap should be filled with storage solution.
Start the Raspberry Pi with the probes connected and install the three EZO circuits in the I2c tab. You may find instructions for adding I2c devices in the REM documentation wiki.
If you have not yet purchased calibration and storage solutions you should do this now.
Before you begin you will want to feed the EZO-RTD temperature output to the EZO-PH circuit. To do this click on the installed EZO-RTD then choose the Feeds tab on the device definition.
On the feeds tab click the + icon in the header. This will open up the Add Feed to I2c Device dialog. Perform the following steps in this dialog.
- Select Internal Devices in the Connection dropdown.
- Choose Degrees Celsius from the Send Value dropdown.
- Increase the Sampling value to 3. This will smooth out the readings from the probe so that it uses at least three readings and chooses a median value.
- Select the Atlas EZO-pH circuit from the to Device dropdown.
- Select tempC in the Input dropdown
- When you have completed entering the values as you see below press the Save button on the Add Feed to I2c Device button.
The temperature at the probe will now be feeding its information to the EZO-PH circuit.
We are going to start by calibrating the pH probe. The setup we created uses a very good three point calibration curve that is temperature compensated.
Fill 3 small cups to at least one inch of solution each from the standard solutions 4.0, 7.0, and 10.0. Have a bucket or larger container full of water so that the probe can be rinsed between calibration cycles. I use a squirt bottle with tap water to rinse my probe between solutions. It has been brought to my attention recently that distilled water is not a good choice for rinsing the probe since the absence of salts in distilled water can pull the potassium salts from the standard solutions inside the probe. Use regular tap water to rinse and shake the excess water from the probe. Finally, dry the outside of the probe so you do not contaminate the calibration solutions.
I also have an iPad that I take to the pad and set it up so that I can use REM to send the calibration values to the probe circuits. During the calibration process decrease read interval so that it reads more often. I like to use 2000ms since it gives a steady read interval and makes it easy to see a stable pH value.
If you have previously calibrated the probe press the Clear button to clear the existing calibration values. The Calibration Points value should read 0. You must calibrate the probe in the following order. Mid Point first, then the Low Point, and Finally the High Point. This will set a logarithmic curve in the pH calculation for the probe readings.
Calibrate Mid Point pH (7.0 solution) If you are using the Atlas Scientific pH standards the 7.0 solution will be the yellow one. Remove the shipping tape that is on the probe and unscrew the cap from the end of the probe. When you are done cussing because that tape is a menace place the probe into the 7.0 solution and swirl it occasionally for at least two minutes. It is important to wait for the values to stabilize.
Watch the EZO-PH device Readings section in REM and wait until the Probe pH value remains relatively stable. Also, make sure the temperature reading seems correct for the temperature of the calibration solution. If the temperature reads 25C there is a good chance that your feed from the EZO-RTD is not correctly set up.
Once the probe readings stabilize press the Mid Point button on the EZO-PH Device window. The results will be that the Probe pH reading will show very close to 7.0pH and the Calibration Points will change to 1.
Calibrate Low Point pH (4.0 solution) After calibrating the Mid Point we need to calibrate the low point. So rinse the probe end thoroughly to ensure we do not change the pH of our standard solution. Dry the outside of the probe and shake any excess water from the probe by sharply moving the probe in a downward motion several times. Think hacking with a hatchet.
Place the probe end into the pH 4.0 solution. If you are using the Atlas Scientific pH standards then this will be the red one. Once again swirl the the probe in the solution waiting for the Probe pH value to stabilize. The reading should push lower than the 7.0 and toward the 4.0 range. If you are not seeing a difference here, there is likely a problem with your wiring. Check your wiring before you proceed.
Once the Probe pH value stabilizes press the Low Point button on the calibration section. The Probe pH value should be in the 4.0 range and the Calibration Points display should now show 2.
Calibrate High Point pH (10.0 solution) The final step for the calibration is to calibrate the high point of the probe. Once again rinse the probe end thoroughly, dry it and shake any potential solution from the end using the hatchet motion. Don't use the tomahawk chop as this can spray red fluid all over the place.
Place the probe end into the 10.0 solution. If you are using the Altas Scientific pH standards then this will be the blue one. Once again swirl the probe in the solution, waiting for the Probe pH value to stabilize. The reading should push higher than the 7.0 toward the 10.0 range. Again if the probe values do not push higher you likely have connection problems.
Once the Probe pH value stabilizes press the High Point button on the calibration section. The Probe pH value should be in the 10.0 range and the Calibration Points display should now show 3.
Congratulations you have calibrated your pH Probe.
Alternate Mid Point Calibration I have found that the standard solutions can degrade over time. However, there is a clever way to get around this by making your own 7.0 standard then using the high and low point calibration solutions as normal. Using your test kit take some pool water that is balanced to one of the colormetric standards on your test kit.
I like to adjust that to 7.2 since it is very easy to read between the colors. Then use this sample as the Mid Point standard by changing the value next to the Mid Point button to the pH of that sample. If you used 7.2 then change that value to 7.2 before pressing the Mid Point button. Make sure you swirl in this solution for a couple of minutes and the Probe pH value stabilizes before pressing the Mid Point button.
Open the inlet valve on the Flow Cell to fill it with water. If you do not have your pump running you can simply fill it with water through the probe holes. The probes must not dry out so it is important that there is water in the flow cell before installing the probe.
Wrap teflon tape around the lower threaded end of the probe. Use several wraps since this is what actually seals the probe into the flow cell. If you have a leak you did not use enough teflon tape. DO NOT OVERTIGHTEN THE PROBE into your flow cell you will likely crack the acrylic. Snug it down by hand by first rotating the probe counterclockwise in your hand several times to relieve stress on the wire while screwing it into the Flow Cell.
Like your pH probe, your ORP probe requires calibration prior to use. ORP is not impacted greatly by temperature and it is only calibrated to a single standard. The solutions however are impacted by temperature and I would suggest that the solution be close to 25C or 77F prior to performing the calibration. The steps for calibration are pretty similar to those of the pH probe but we will only be calibrating to a single point.
First pour at least 1 inch of calibration solution in a small cup. If this is the first time using your probe grumble quietly as you remove that iron like tape from the probe cap. Always rinse the probe, dry the end, then perform the hatchet chop maneuver to shake off any leftover liquid from the probe prior to putting the probe into the standard solution.
Open the EZO-ORP device in REM so that we can watch the readings. If the Calibrated value reads true clear it using the Clear button. Place the probe into the standard solution and swirl for a couple of minutes. Wait for the Probe ORP reading to stabilize then press the Calibrate button.
Congratulations Calibration of the ORP probe is now complete.
If the flow cell has not been filled with water, open the inlet valve on the Flow Cell to fill it with water. If you do not have your pump running you can simply fill it with water through the probe holes. The probes must not dry out so it is important that there is water in the flow cell before installing the probe.
Wrap teflon tape around the lower threaded end of the probe. Use several wraps since this is what actually seals the probe into the flow cell. If you have a leak you did not use enough teflon tape. DO NOT OVERTIGHTEN THE PROBE into your flow cell you will likely crack the acrylic. Snug it down by hand by first rotating the probe counterclockwise in your hand several times to relieve stress on the wire while screwing it into the Flow Cell.
If you are using the 24vdc pumps supplied with the Pentair Chem tanks, connect the ground wire to a ground inside your panel. The other end should be connected to the normally open side of an open relay on one of your relay boards. This does not need a 3hp relay and can be simply wired directly to the relay. Then take the center terminal of the relay (common) and connect it to 24vdc + from the power supply.
If you are using a MEGA-BAS or MEGA-IND card to power your Raspberry Pi then this power supply can be shared for this purpose as well. If you are using a 24vac power supply you can use that as well but you must convert the AC current to DC using an appropriately sized bridge rectifier.
Some pumps require 24vac and even have a plug in end. If you have a peristaltic pump like this switch the hot leg of the AC power with a relay on the Raspberry Pi. Most of the Sequent relays are rated at 8A which will be fine for the load from the pump.
The final step for pump installation is to determine how many mL/min is discharged by the pump. Remove the entire injection assembly including the check valve from the plumbing. Then using a mixing cup with mL graduations engage the pump for 1 minute using a stopwatch. The amount of chemical that was dosed from the pump is the calibrated mL/min flow rate of your pump. Do not rely on the ratings from the manufacturer as these will be wrong due to tubing length and variations in power supply.
Now that you have all your hardware installed it is time to configure your REM Chem controller. We will go through each of the steps and settings so you can understand what the settings to.
All of the hardware items should be configured by this point in the REM Software and the REM Interface should be enabled in the configuration pages under the General --> Interfaces tab.
Click on the Chemistry tab in the dashPanel configuration pages. Then press the add controller button. When the dialog appears select the dropdown on the Chem Controller button so that it says REM Chem.
Then press the flask on the button and the REM Chem controller will be added. At this point choose which body must be on for the REM Chem to dose chemicals. My suggestion is that if you have a Pool/Spa combination you should select pool and not dose chemical when the spa is engaged. At this point you can also name the controller. This is the name that will appear on the dashBoard in dashPanel.
Next select the Hardware tab if it is not already selected and we will set up each of the hardware components for the controller.
There are several options for setting up your flow switch. It is recommended that you implement a flow sensor for REM Chem for safety reasons. This is a verified check to ensure that the following conditions are true before any dosing can take place.
- The specified body is currently running
- Flow has been sensed that is sufficient enough to ensure chemicals do not build up in the plumbing
From the dropdown select the type of flow sensor that is installed if you used the recommended flow switch above then choose flow switch.
- Flow Switch - Binary switch that is on when flow is detected. This is the simplest and most reliable option.
- Rate Sensor - A flow rate sensor that reports gallons per minute. The minimum flow rate should be supplied here when using this option. An example of this are the inline flow sensors that use 4-20mA or 0-10v output to REM.
- Pressure Sensor - If you added a filter pressure sensor you can use this sensor to ensure there is pressure at the filter before dosing. You must supply the minimum pressure in psi required before dosing.
Next choose the REM Server that was set up on the interfaces tab. Once the REM Server is selected, all the devices from that server will appear in the dropdown.
From the Type dropdown choose the probe type. If you are using the Atlas EZO-PH probe as recommended above select that option from the dropdown. If you are using another type of probe njsPC will need to be periodically fed the pH readings from your external source. This can be done through any of the common interfacing standards included in njsPC such as websockets, REST, or MQTT.
Select the connection from the Connection dropdown, then all devices on the REM server will appear in the Device dropdown. Find the probe in the device listing and select it from the list.
There are a few checkboxes that you need to set up here. Below are the recommended settings and the purpose of the setting.
- Flow Readings Only - This ensures that there is flow in the system and the the proper body is currently running before using a pH reading for chemistry calculations. You should check this box under most circumstances.
- Feed Body Temperature - This option will send the body temperature from the current body to the probe to use as temperature compensation. If you installed the Atlas Industrial probe that has built in temperature then you do NOT want to check this box.
- REM Feed - This will automatically add a feed to REM so that it periodically sends the pH readings whenever there is a change. You should check this option.
Setting up the ORP probe is a lot like setting up the pH probe. From the Type dropdown choose the probe type. If you are using the Atlas EZO-PH probe as recommended above select that option from the dropdown. If you are using another type of probe njsPC will need to be periodically fed the ORP readings from your external source. This can be done through any of the common interfacing standards included in njsPC such as websockets, REST, or MQTT.
There are a few checkboxes that you need to set up here. Below are the recommended settings and the purpose of the setting.
- Flow Readings Only - This ensures that there is flow in the system and the the proper body is currently running before using an ORP reading for chemistry calculations. You should check this box under most circumstances.
- REM Feed - This will automatically add a feed to REM so that it periodically sends the pH readings whenever there is a change. You should check this option.
For the purposes of this guide we will be only describing the options for Relay Pumps. If you have an Atlas EZO-PMP installed and would like to use it follow the setup for that pump in the datasheet. REM will request atomic doses based upon the configuration and calibration on the pump itself.
The next step is to set up the relay for your pH pump. Whenever REM determines the need for a pH adjustment it will energize this relay to start the pump and run it for long enough the get the proper dose. Just like before select the device that was set up in REM as the pump relay and fill in the proper settings.
The options for this pump are listed below.
- Flow - Enter the calibrated flow rating that you took earlier when you finalized the pump setup.
- Tank - Enter the total tank capacity for your chemical tank. This will be used to determine the level of acid or base in the tank.
For the purposes of this guide we will be only describing the options for Relay Pumps. If you have an Atlas EZO-PMP installed and would like to use it follow the setup for that pump in the datasheet. REM will request atomic doses based upon the configuration and calibration on the pump itself.
If you do not have a Chlorine tank and pump simply set the pump type to No Pump. This will be true if you are managing ORP with an SWG Chlorinator like IntelliChlor. If your chlorinator is capable of being externally controlled we will be setting this up later.
The next step is to set up the relay for your pH pump. Whenever REM determines the need for an ORP adjustment it will energize this relay to start the pump and run it for long enough the get the proper dose. Just like before select the device that was set up in REM as the pump relay and fill in the proper settings.
The options for this pump are listed below.
- Flow - Enter the calibrated flow rating that you took earlier when you finalized the pump setup.
- Tank - Enter the total tank capacity for your chemical tank. This will be used to determine the level of chlorine in the tank.
Navigate to the pH Settings tab from there you will be presented by a number of options. These options tell REM Chem how you would like to manage your pH. REM Chem will perform regular cycles of Monitoring, Dosing, and Mixing. When the pH is at or below the setpoint REM Chem will be monitoring the pH levels. Then when the pH level drops below the setpoint REM Chem will dose enough chemicals to bring the pH into alignment with the setpoint. Finally, after dosing REM Chem will perform a mixing delay to allow the chemical that was just dosed to take effect.
- pH Enabled - Check this box if you would like REM Chem to manage pH. If you simply want REM Chem to monitor the pH but not dose chemicals, then uncheck this box.
- pH Dose Priority - When checked, REM Chem will balance the pH prior to dispensing other chemicals. The reason for this is that the ORP readings are impacted by the pH level of the water. High pH will reduce the sanitation ability of the water and the ORP readings will reflect this condition.
The dosing parameters determine how REM Chem will calculate how much dose is required and what conditions are to be used when dosing. As a general rule pH changes do not occur instantly and in fact adding muriatic acid to the water goes through a period where the buffers in the water react with the acid to reach a stable change in the pH. As you operate REM Chem the best maximum dose values will need to be adjusted to get to a point where the amount of acid dosed does not overshoot the setpoint and does not always fall short of the setpoint.
- Dose - Select whether REM will be dosing Acid or Base to control the pH.
-
By - Select the calculation method used to determine the dosing strategy.
- Manual - Dosing is manually controlled despite the chemical demand
- Time - Use the time that the pump is running to determine how much chemical is dosed. When selected you ma enter a max single dose time in hours, minutes, and seconds.
- Volume - This is the recommended setting for pH dosing control. When selected you will have the option to choose the maximum single dose that should be applied at any time.
- Using - This option only appears when you are dosing acid. Tell REM Chem what the strength of the acid you have in your tank is. Personally, I use 14.5% from Home Depot. This can be added directly to the tank and will not harm components. If you are using an acid the is greater than 29% it is recommended that you dilute it by 50% and use the 14.5% setting.
- Delay - This is used to delay any dose applications when the pump first starts. This is so any priming can take place and the water being sampled in the flow cell is representative of the water in the pool not the water in the pipes.
- Max Vol/Time - The options will change for this field depending on whether you are dosing by volume or time. In general dosing by volume is recommended. The max dose at any given time will be determined by how much of a pH change occurs when you dose. The Total Alkalinity as well as the total water volume play a role in how much to dose at a time. As a starting point give it 200mL as an initial value. If REM Chem is not keeping up with the pH then increase it to find a happy point where the pH can be stabilized.
-
Max limit per rolling 24 hours - REM Chem keeps track of how much chemical it has dosed over a 24hour period and limit dosing to make sure any situations where conditions could cause the pH readings to be inaccurate will be kept in check. Some of these conditions could include.
- pH Probe out of calibration - The pH probe is reading higher or lower than the actual pH.
- Addition of other chemicals - Adding other chemicals to the water can cause the pH to swing wildly. This includes shock products, calcium, and event liquid chlorine.
- Invalid setpoints - Under normal circumstances this shouldn't happen but you could be trying to for instance lower your Total Alkalinity and as a result push your pH setpoint to 7.2 then forget about it. REM Chem will temper this situation by limiting the total doses over a 24 hour period to even it out. I would suggest however, if you are doing something like this that you monitor your chemistry.
- Disable on Freeze - You can disable dosing when a freeze condition is detected. This keeps your dosing strategy consistent with normal pool operation.
The mixing parameters tell REM Chem under which conditions a mixing event is underway. After chemicals are dosed into the water they take some time to affect the pH.
- Time - The number of hours and minutes that should be given to allow a dose to fully impact the water chemistry. Start with 45 minutes and if you find the pH always hovering above the setpoint decrease this time to allow REM Chem to apply smaller doses more often. If REM Chem often overshoots the setpoint increase the time to allow chemical doses to affect the pH before attempting another dose.
- Mix only when flow detected - This setting will suspend the mixing time whenever the pump is off and continue the mixing countdown when the pump is re-engaged. So if your normal pump cycle ends it will suspend the mixing time and continue it when the pump turns back on again. I keep this option checked as I find the effects of the dose are impacted by whether there is circulation in my pool.
The ORP settings will determine how REM Chem manages the sanitation of your water. If you are not dosing chlorine or are using a chlorinator that cannot be controlled then simply disable the ORP settings. There is nothing for REM Chem to control.
Once you enable the ORP settings additional options become available. The first thing you must tell REM Chem is whether you are using a chlorinator or are dosing chlorine using a peristaltic pump and tank. The available ORP options will differ depending on whether you are using a chlorinator or a peristaltic pump with chlorine. This section is broken into two parts for this reason. If you are using a chlorinator whose setpoints can be controlled by njsPC then check the Use Chlorinator box and follow the first section. If you are using a peristaltic pump and tank then uncheck the Use Chlorinator box and follow the second section.
REM Chem can use the settings on any chlorinator than can be controlled by njsPC. It is important that your chlorinator is set up in the chemistry pages and you have supplied the chlorinator model as different models have different rates of generation. REM Chem will use these rates to determine how long to run the chlorinator at 100%.
-
Dose By - REM Cheml allows two options for sanitation using a chlorinator. Each option has a different effect on the chlorinator settings.
- Use Chlorinator Settings - This option will not interfere with the chlorinator setpoints while mixing or monitoring. However, if the pH Priority setting is checked in the pH settings it will turn off the chlorinator while dosing acid as a safety feature.
- Dynamic based on ORP Setpoint - REM Chem will use the chlorine output rating of the chlorinator to maintain the ORP setpoint. It will calculate dosing over time to come up with how many pounds of chlorine was generated by the SWG and what the demand should be.
- pH Lockout - The pH level has an impact on ORP and as such REM Chem can be set to not manage chlorine when the pH rises above the supplied value. Typically values above 7.8 are deemed difficult to sanitize.
- Disable on Freeze - This disables the activation of the Chlorinator when a freeze condition is detected.
- Mix only when flow detected - This setting suspends the mixing timer if there is no flow in the flow cell. By checking this value the time used for mixing is always dependent on whether there is movement of the water.
If you have a chlorine tank installed and are using liquid chlorine, uncheck the Use Chlorinator box and configure the following options. If you are familiar with the pH settings these will be similar to those settings.
-
Dose By - Select the calculation method used to determine the dosing strategy.
- Manual - Dosing is manually controlled despite the chemical demand
- Time - Use the time that the pump is running to determine how much chemical is dosed. When selected you ma enter a max single dose time in hours, minutes, and seconds.
- Volume - This is the recommended setting for sanitation dosing control. When selected you will have the option to choose the maximum single dose that should be applied at any time.
- Delay - This is used to delay any dose applications when the pump first starts. This is so any priming can take place and the water being sampled in the flow cell is representative of the water in the pool not the water in the pipes.
- Max Vol/Time - The options will change for this field depending on whether you are dosing by volume or time. In general dosing by volume is recommended. The max dose at any given time will be determined by how much of an ORP change occurs when you dose and how long it takes for the liquid chlorine to break down into the compounds that effect oxidation. As a starting point give it 200mL as an initial value. If REM Chem is not keeping up with the ORP then increase it to find a happy point where the ORP can be stabilized. Keep in mind ORP changes are much slower than pH changes.
-
Max limit per rolling 24 hours - REM Chem keeps track of how much chemical it has dosed over a 24hour period and limit dosing to make sure any situations where conditions could cause the pH readings to be inaccurate will be kept in check. Some of these conditions could include.
- ORP Probe out of calibration - The ORP probe is reading higher or lower than the actual ORP.
- Addition of other chemicals - Adding other chemicals to the water can cause the ORP to swing. Unlike pH this will be drawn out over time. This includes products that change the pH of the water.
- Invalid setpoints - Under normal circumstances this shouldn't happen but you could be shocking or SLAMming your pool. REM Chem will temper this situation by limiting the total doses over a 24 hour period to even it out. I would suggest however, if you are doing something like this that you monitor your chemistry.
- Disable on Freeze - You can disable dosing when a freeze condition is detected. This keeps your dosing strategy consistent with normal pool operation.
The mixing parameters tell REM Chem under which conditions a mixing event is underway. After chemicals are dosed into the water they take some time to affect the ORP.
- Time - The number of hours and minutes that should be given to allow a dose to fully impact the water chemistry. Start with 1 hour and if you find the ORP always hovering below the setpoint decrease this time to allow REM Chem to apply smaller doses more often. If REM Chem often overshoots the setpoint increase the time to allow chemical doses to affect the ORP before attempting another dose.
- Mix only when flow detected - This setting will suspend the mixing time whenever the pump is off and continue the mixing countdown when the pump is re-engaged. So if your normal pump cycle ends it will suspend the mixing time and continue it when the pump turns back on again.
The Alarms tab on the REM Chem configuration provides thresholds for when certain alarms appear on the dashPanel Chemistry bubble. Every pool is different and this allows you to personalize what the tolerances should be.
These settings provide the ideal ranges for the three main chemistry readings. Check the box next to the alarm and provide the Low and High point values for when the alarm should be displayed.
-
Balance - This is the range for the CSI or LSI calculation depending on which index you are using. If the value is lower than the low value dashPanel will display
Corrosion May Occur
and if the value is higher than the high value then dashPanel will displayScaling May Occur
. -
pH - This changes the acceptable pH range. If the pH level is above this range then dashPanel will display
pH Level High
and if it is below the low value then dashPanel will displaypH Level Low
. -
ORP - This changes the acceptable ORP range. If the ORP level is above this range then dashPanel will display
ORP Level High
and if it is below the low value then dashPanel will displayORP Level Low
.
These settings allow you to set when you should be warned to add chemicals to the tanks. When the percentage full of the tank falls below the percentage but greater than empty, a low tank warning will be displayed in dashPanel. If the tank is empty then a tank empty alarm is displayed and dosing is suspended.
It is strongly advised that you balance and test your pool chemistry prior to allowing REM Chem to manage it. REM Chem is designed to maintain proper levels not initially balance your pool. When you have tested your pool you should provide the Index values as these have an impact on the CSL/LSI values and the acid demand calculations.
The balance calculation is entirely up to you but I prefer the Calcite Saturation Index (CSI) over the Langelier Saturation Index (LSI). Both of these can be used to keep your chemistry in line so that your water is neither corrosive or leaving scale deposits on your tile. If you would like to know more about these indexes I suggest you take some time and read some of the numerous articles on-line regarding meaning of the indexes.
These setpoints control the pH and ORP values that REM Chem will be targeting.
I know you are going to say why do I automate my testing and chemicals when I still need to test my water. Well the answer is very simple. The index values do not change very quickly over time so your manual testing requirements can be reduced. Test your water and supply these values periodically.