Jump to content


- - - - -

[How-To] Measure Salt Level in Your Water Softener (OLD SCHOOL METHOD)


[How-To] Measure Salt Level in Your Water Softener (BSR Goes Old School)
 
Many years ago, I created THIS How-To on using an ultrasonic sensorfor measuring the salt level in a water softener.  Since then I decided to go 'old school' and wanted a basic analog/voltage detection method that I would incorporate into my existing analog to digital converter for this measurement (basically I was not happy with the serial interface of the MaxBotix unit).
 
The method of choice involved using a 'string potentiometer' or 'string pot' for measuring the salt level.  Basically, a string  pot is a spring loaded string (or cable) attached to a potentiometer that turns as the string is extended, and will recoil if the string is returned to the unit (think of a yo yo with an automatic string retraction feature).
 
As the string is extended or retracted, it turns a multi-turn potentiometer so its change in resistance is proportional to the distance of string extended from the unit.  If one were to apply a voltage to this device the amount of string extended would see a proportional voltage change from the potentiometer.
 
This potentiometer's voltage would then be measured by an existing analog to digital converter.  In my case, I used a PH-Anderson 10-Bit A-D converter, but the Elk also has this capability of converting an input into an analog zone.
 
A typical off the shelf string potentiometer is shown below:

Attached Image: typical.jpg
 
Unfortunately, these devices can cost upwards of $150 which makes it cost prohibitive for typical home automation enthusiasts. :o
 
This How-To will show you a method to make your own string pot for about $20 and will have a measurement distance slightly under three feet!
 
This idea was derived from THIS YouTube video, where the user used a retractable key-chain/badge holder to turn a ten turn potentiometer by incorporating a pulley on the potentiometer's shaft.  To incorporate this device for measuring salt level in a water softener the measurement capable distance would have to be increased.  Also, it would be nice if 'machining' a pulley was not required.
 
A search was performed to find a heavy duty retractable holder that had a longer distance, and THIS product seemed to match these requirements.  It has a heavy duty rating plus 40 inch pull length (I need a measure capability of approximately three feet for my particular water softener).
 
Attached Image: badge.jpg
 
I planned on using THIS ten turn potentiometer from Bourns as they are of very high quality and the shaft can easily turn (with hardly any resistance).  Note there are cheaper multi-turn potentiometers out there, but the aggravation of using them isn't worth the five bucks you will save, unless you happen to have them around and their shafts easily turn.  I choose a value of 10KOhms as it would draw little current using a five volt excitation supply (the maximum measurement capability of my analog to digital converter).
 
The real hassle came when trying to find an off the shelf pulley to mount on the shaft of the potentiometer.  The retractable holder has a string pull out distance of 40 inches, which would be incorporated into as many turns of the potentiometer as possible (for good accuracy/resolution).  So one turn of the potentiometer would require using about four inches of the holder's string distance (40 inches / ten turns of the potentiometer).
 
Using the formula Circumference = 3.1416 * Diameter and substituting 4 inches for the circumference yields a needed pulley diameter of 1.27 inches (4 / 3.1416) or roughly 1 1/4 inches.  Now one would think that with the vast information available by Al Gore's Internet that this would be an easy accomplishment, but it was far from it.
 
To make a long story short, an optimal pulley was found in a local Hobby Store, no, not in the plastic pulley section, but in their vast selection of model wheels!  A model wheel was found that, with the tire portion removed, the 'pulley' was a nice 1.2 inches in diameter!
Attached Image: dubro.jpg  Attached Image: diameter.jpg
 
A pulley with a smaller groove would be optimal, but this would have to do for now.
 
If your local hobby store does not carry these model wheels they can be purchased from Amazon.
 
Shown below are all the main components that were used for this project:
 
Attached Image: parts.jpg
 
The center hole of the wheel/pulley was drilled so it fit tightly over the potentiometer's shaft.  The potentiometer, pulley, and retractable holder were mounted on a small thin aluminum plate.
 
Attached Image: softener front.jpg     Attached Image: softener back.jpg
 
Note the way the string from the holder was placed over the pulley.  This was proven to be the optimal (minimal slippage) routing as it contacted nearly the full circumference of the pulley while not getting tangled between the lines entry and exit from the pulley.
 
A small grommet was mounted on an angle bracket and the string feed through it to prevent the line from running into the pulley when retracted.
 
HERE is a YouTube video showing the finished product's performance.  The final measurement capability turned out to be 2' 10" due to the pulley's actual diameter and cutting off some amount of string from the badge holder in order to feed it through the grommet (and retie it).
 
The linearity between the resistance and the distance of string extended was tested and graphed as shown in the diagram below:
 
Attached Image: rawdata.jpg.jpg
 
Note that these tests were performed before the string was cut and placed through the grommet (thus capable of the full 30" length).
 
Also, note that the points can form a straight line (if drawn on the graph) which shows optimal linearity (thus a change in resistance is directly proportional to a change in the length of string).
 
In order to get this information into a useable format for a home automation system an equation of the line must be determined using the Y = m X + b slope/intercept formula.
 
A How-To on Analog to Digital Converters Explained was created that shows a step by step process for determining this.  An easier method exists for those that have Microsoft's Excel though.  After entering the values on two columns plot them using a scatter plot graph (DO NOT use a line graph).  You will have to select the appropriate columns for the X and Y axis, but should wind up with a graph similar to the one above).
 
Now, right click on any data point on that graph and then click on "Format Trendline..." as shown below:
 
Attached Image: trend.jpg.jpg
 
Now a dialog box will be shown for various data trend options.  Make sure the "Linear Trend/Regression" type is selected and that the last two box entries are checked as shown below.
 
Attached Image: trend2.jpg        Attached Image: trend1.jpg
 
Now the equation will be shown on the graph as well as a linear trend line.  Also, the closer the R-squared value is to a value of one the more linear the data is.
 
For this graph "Y" will of course represent resistance and "X" will represent inches.  Note that we will wind up taking data again once the unit is installed in the water softener (preferably near empty) and will plot voltage or bits measured by the analog to digital converter vs. percent of salt left (more on this later).
 
The potentiometer's wiring was then connected.  Since my A-D board has a maximum voltage measurement capability of five volts, I selected a five volt wall wart that I had on hand.  The schematic is shown below.  Note that I elected NOT to install a fuse (as the wall wart's current was very low) but this could be an option one may want to deploy.
 
Attached Image: schematic.jpg
 
Now that the unit is assembled and tested, it was installed in the water softener as shown below.
 
Attached Image: softener installed.jpg
 
A weight was placed that would ensure the string retracted when the salt's level decreased.
 
One thing that I did note from earlier testing was the pulley did not return to the exact same spot once retracted.  This is not a problem as the pulley can easily be turned to a marked location each time salt is refilled (i.e. only needs to be accurate when 'pulling' down).  The unit is repeatable when taking multiple readings in the same 'down' location though.  I believe this is a result of the weight being lifted when retracting the string and not enough tension exists between the pulley and string (if this were a 'grooved' pulley, this would probably not happen).  In any case, I wasn't worried about it in my application as I only need to readjust the pulley about an eighth of a turn when refilling.
 
Now that the unit is installed, it needs to be calibrated in situ with the water softener and analog to digital measurement system.  There are many ways to do this, but the method I choose is to divy up the maximum (100% full) and the minimum (0% full) readings.  I have a graduated label 1 through 8 on the side of my softener.  Since I wound up a few inches short of the full height of salt level capable, I decided on the '7' of the label to be the 100% full height and the '1' of the label to be the 0% full height.  This would give me a bit of a buffer (between 0 and 1 of the label) before I totally ran out of salt (like the reserve gas switch on a motorcycle!).
 
Now that the analog to digital converter is in place, it is possible to retake calibration data and incorporate this 0% and 100% height and see what corresponding bit value is achieved with the analog to digital converter.  One could also establish another value (say mark the 50% height or even more points) and take those corresponding data points as well.
 
A new plot will need to be established and with it determine the new equation as described above which will now incorporate percent filled with bit value measured from the analog to digital converter!
 
Since I have this value as a HomeSeer device, I can send emails to remind me to get salt at a predetermined level!  I also have an event that records the date/time with the current level once a day so I can graph salt usage (why, because I can!).
 
Many other options exist now that you can incorporate current salt level with your home automation system system.
 
Note that this method is not perfect and has its flaws.  Most notable, having to slightly turn the pulley to its original position when refilling with salt (as you have to retract the weight and move it out of the way).  But, if marked carefully and prominently, this really isn't much of a problem (takes under five extra seconds to do).
 
Also, though this is a heavy duty retractable holder, I'm wondering how it will wear over the course of time (though if you think about it it only really fully retracts less than once each month with my current salt usage).
 
Plus, this method beats monitoring the 'idiot light' that blinks when the salt is at a low level (I really don't like the threshold on mine as it starts to blink with many, many days of salt left).
 
Another important note is I have NO long term experience with this methodology, but of course will update this How-To over the course of time with any successes or failures (this is an alpha version!!).
 
As any project, it can be improved, especially with the suggestions of our membership, so feel free to comment (go to the forum post to submit any questions or comments).


16 Comments

Shiny!  I'm wondering if something like this could work:  http://www.homedepot...=5yc1vZbxcyZbic

 

You could also then monitor the brining process perhaps?

Very nice BSR!

 

Never did get around to building some sensor for my water softener.

 

Googling did find a kit here for $40.

 

http://www.andymark....t-p/am-2674.htm

Photo
Frederick C. Wilt
Jul 09 2014 07:38 AM

No, no, no. That's all wrong. You want to use a PTZ camera and a small computer to video the salt and determine the level by the apparent size of the lumps of salt. 

 

I thought everybody knew this.

 

Why make things simple when you can make them complicated?

 

;)

For a bit I was thinking of installing a coal chute for the salt use.

 

Yeah; my old school analog (?) regulator clock never quits as its using a very old design with a pendulum; and it stopped a couple of days ago. 

 

Tempus fugit

 

Nobody touched it.

Photo
Frederick C. Wilt
Jul 09 2014 08:14 AM

Two things come to mind: the clock needs a cleaning/lubrication and/or the bearing surfaces need refurbishment.

 

Weight driven clocks (usually) have very little in the way of "spare" power and it doesn't take too much added friction to bring them to a halt.

 

I rebuilt one of my clocks and used a lubricant that was too viscous and just that was enough to prevent the clock from running - lesson learned.

 

Good luck.

Yeah here into old clocks; never touch them though.

 

This one is only 5-6 years old; well new but very old design; gift.  Must be dust? 

Photo
BraveSirRobbin
Jul 09 2014 08:55 AM

Very nice BSR!

 

Never did get around to building some sensor for my water softener.

 

Googling did find a kit here for $40.

 

http://www.andymark....t-p/am-2674.htm

That kit looks good, but I believe you have to 3-d print the enclosures.

[How-To] Measure Salt Level in Your Water Softener (BSR Goes Old School)
 
Many years ago, I created THIS How-To on using an ultrasonic sensor for measuring the salt level in a water softener.  Since then I decided to go 'old school' and wanted a basic analog/voltage detection method that I would incorporate into my existing analog to digital converter for this measurement (basically I was not happy with the serial interface of the MaxBotix unit).
 

Click here to view the article

I wonder if salt level could be measured indirectly by counting the number of regeneration cycles after a known salt level?.Isn't that how the mcu in the softener does it when it shows the salt level on the softener display?  Or is it actually doing a physical measurement?  If counting cycles, then maybe all you would need is a current sensor to detect when the recharge cycle happens (if it's on demand) or just a calendar (if it's by clock)? 

 

Regardless, yours is a clever implementation.

Photo
BraveSirRobbin
Jul 11 2014 10:53 AM

You certainly could just calculate the percentage, based on use or (in my case) daily regeneration.

 

The 'expert' level of home automation is when you always know the exact percentage anytime!

 

This is the same explanation I give when people question why one would need to know the exact position of their garage door rather than just monitor if it is opened or closed! ;)

You regenerate every day?  I trust you know what you're doing, but that's rather unusual.  Either you have extremely hard water, or something isn't right.

Photo
BraveSirRobbin
Jul 11 2014 08:44 PM

Actually, that is the only option for a schedule on this cheap softener (regen 'time' only, not frequency of days).

BSR, why didn't you just use the 0-5vdc analog-out on the MaxBotix instead of the serial output?

 

[How-To] Measure Salt Level in Your Water Softener (BSR Goes Old School)
 
Many years ago, I created THIS How-To on using an ultrasonic sensor for measuring the salt level in a water softener.  Since then I decided to go 'old school' and wanted a basic analog/voltage detection method that I would incorporate into my existing analog to digital converter for this measurement (basically I was not happy with the serial interface of the MaxBotix unit).
 

Click here to view the article

Photo
BraveSirRobbin
Jul 12 2014 11:09 AM

Good question as the MaxBotix sensor I chose does indeed have an analog voltage output.  The problem is looking at the specs it was something like a 0-0.5 volt full scale and in the case of my desired distance, I believe (going off of memory) I would never have achieved the 0.5 volt as I was not using the full capable linearity of the device.

 

I decided that even with a ten bit A-D converter that this would not give me the resolution I wanted.  Also, my A-D converter seems to have a noise level of 0.2 volts (which is odd but I never really spent time troubleshooting this).

 

I also wanted to deploy the methodology described in this How-To to see its feasibility so it could possibly be incorporated for other projects. ;)

If I remember correctly, the analog on the Maxbotix is Vcc/512 per inch. so for a +5 vdc supply you'd see a little less than 10mV per inch so yeah over the short distance of your water softener container you'd need to amplify it the output to get any meaningful resolution. Good call.

 

It's a good how-to, I miss this type of home-brew stuff on CT (of course I'm to blame as much as anyone else as I haven't done anything in a while). It reminds me of your ultimate garage door sensor from a long time ago. Equally awesome how-to!

 

Terry

 

 

Good question as the MaxBotix sensor I chose does indeed have an analog voltage output.  The problem is looking at the specs it was something like a 0-0.5 volt full scale and in the case of my desired distance, I believe (going off of memory) I would never have achieved the 0.5 volt as I was not using the full capable linearity of the device.

 

I decided that even with a ten bit A-D converter that this would not give me the resolution I wanted.  Also, my A-D converter seems to have a noise level of 0.2 volts (which is odd but I never really spent time troubleshooting this).

 

I also wanted to deploy the methodology described in this How-To to see its feasibility so it could possibly be incorporated for other projects. ;)

Photo
BraveSirRobbin
Jul 12 2014 05:04 PM

... I miss this type of home-brew stuff on CT (of course I'm to blame as much as anyone else as I haven't done anything in a while). It reminds me of your ultimate garage door sensor from a long time ago.

 

 

Hi Terry;

 

I do miss the old days very badly, as these home-brewed custom solutions seemed more abundant.  Now, the forums seem to concentrate to much on the home security aspect, or 'off the shelf' product functionality and integration.  Though these are an important aspect of home automation, it seems there is just to much whining about code this and installation not right that, etc...

 

It definitely drove away some old time creative members such as Guy Lavoie (my idol), Smee, Michael McSharry, just to name a few.  Oh well, perhaps we can get this creativity back one step at a time! ;)

Photo
BraveSirRobbin
Jul 26 2014 06:54 PM

Here is an update on how the unit is working, which was installed on July 7, 2014.

 

I created a script in HomeSeer that wrote the percent left of salt into a text file once a day (shown below).  The measurements tracked well.  I did notice that sometimes the weight would shift away from the 'straight down' position of the string.  This is because the salt is not always 'level' as it is being consumed.

 

Overall, I'm pretty satisfied with this first built unit.  I will have to align the wheel to the marks made during installation/testing when refilling, but that is really the only minor limitation (as described in the How-To).

 

Water Softener Salt Level Remaining (Percentage)
7/7/2014 12:05:12 AM   Softener Percent   67.6604
7/8/2014 12:05:11 AM   Softener Percent   63.3554
7/9/2014 12:05:11 AM   Softener Percent   63.6998
7/10/2014 12:05:11 AM   Softener Percent   59.567
7/11/2014 12:05:11 AM   Softener Percent   59.3948
7/12/2014 12:05:11 AM   Softener Percent   54.9176
7/13/2014 12:05:11 AM   Softener Percent   50.957
7/14/2014 12:05:11 AM   Softener Percent   47.3408
7/15/2014 12:05:11 AM   Softener Percent   43.208
7/16/2014 12:05:11 AM   Softener Percent   37.3532
7/17/2014 12:05:11 AM   Softener Percent   34.0814
7/18/2014 12:05:11 AM   Softener Percent   33.9092
7/19/2014 12:05:11 AM   Softener Percent   29.9486
7/20/2014 12:05:11 AM   Softener Percent   25.2992
7/21/2014 12:05:11 AM   Softener Percent   18.5834
7/22/2014 12:05:11 AM   Softener Percent   14.9672
7/23/2014 12:05:11 AM   Softener Percent   14.795
7/24/2014 12:05:11 AM   Softener Percent   11.1788
7/25/2014 12:05:11 AM   Softener Percent   11.351
7/26/2014 12:05:11 AM   Softener Percent   6.0128

 

Attached File  empty.jpg   60.57K   11 downloads