Many homes in the United States have water that contains higher concentrations of dissolved minerals, which is called hard water. Although there is nothing toxic about hard water, it is less desirable for cleaning, it leaves mineral deposits, and it can shorten the lifetime or efficiency of equipment such as water heaters.
A water softener is a household appliance that commonly exchanges salt for some of the dissolved minerals, resulting in softer water. The salt supply is stored in a brine tank and must be refilled every month or so. If you forget to refill the tank, the water softener is rendered temporarily ineffective.
As you might guess, I often forget to refill the brine tank. My first clue of an empty tank comes when my wife suggests the dishwasher, soap, or shampoo isn’t working very well. I decided it was time to create an electronic sensor to monitor the salt levels.
Water softener monitor wall plate on a decorated wall.
The Water Softener Monitor device features a color bar graph to indicate the salt level in the water softener brine tank. The color bar graph is better than a numeric display, since colors can be discerned from across the room.
The Water Softener Monitor wall plate includes a photocell to detect a change in room brightness. This allows the LED display to be off until someone turns on the room light or approaches the monitor panel (their shadow trips the light sensor). After three minutes, the display turns off again. This saves electricity and increases LED longevity.
And, finally, the Water Softener Monitor has a remote photocell in the closet where the water softener equipment is located. The Water Softener Monitor will blink if the closet light is accidentally left turned on (I wonder who did that?). This avoids having an unattended light burning in the closet for a month.
A common plain white wall plate was chosen to enclose the water softener monitor display, so as not to detract from the wall decor.
The water softener in my house is located in a closet in the basement where the municipal water supply comes into the house. For some people, the water supply comes from a well.
Brine tank and water softener in a basement closet.
To the left of water softener is a 200 pound capacity plastic brine tank. The tank is about 3 feet tall. Some people have larger tanks or multiple tanks.
Left: Empty brine tank with standing water. Right: Tank full with salt.
The water softener pumps a little bit of water into the tank to mix with the salt to create brine (salty liquid). You can see this water when the tank is mostly empty. Every couple of days, the brine is pumped into the water softener to refresh the water softening beads located between the municipal supply and the rest of the house.
The brine tank is normally filled with half-inch-sized rocks of either sodium chloride or potassium chloride. A scheduled service can fill your tank for you, or you can buy bags of salt from a local hardware store or super market.
As you can see, the tank may contain a liquid or a solid, depending on the supply level. Therefore, a float would not be a suitable sensor to determine the supply level.
Further complicating matters, salt water is very corrosive to metals (and therefore electronics). So, any metal mechanism to monitor salt levels would need to be made of special materials or have non-corrosive coatings.
For the above reasons, I chose a non-contact sensor to monitor to the salt levels. Sharp Electronics makes a series of infrared sensors that measure distance by triangulation.
The GP2D12 model can measure from 10 cm to 80 cm, which is around 4 inches to not quite 3 feet. Under ideal conditions, the sensor actually measures a little bit farther than that. In any case, the GP2D12’s range is more than adequate to differentiate between a full tank, partial tank, and an empty tank.
Left: Cap with paper template for drilling mounting holes. Right: Sharp infrared distance sensor mounted underneath the lid.
The distance sensor is mounted underneath the plastic lid of the brine tank. Mounting holes were drilled by hand after placing a paper template in the small circular cap in the center of the lid.
After being photographed, caulk was placed around the sides of the sensor to reduce the possibility of salt spray getting into the electronics. Spraying acrylic coating on the electronics (not the front lenses) would also be prudent.
To further avoid corrosion and prevent physical damage during refilling, I considered housing the sensor in a transparent box. However, I was concerned that reflections from the housing might affect sensor performance. I'll see how long an unprotected sensor lasts to determine if housing is required.
A small circuit atop the brine tank lid contains a light sensor, capacitor, and cable connector. (Note: Something is wrong with this setup.)
A circuit board is placed on top of the lid, opposite the holes drilled for the infrared sensor. The circuit board includes a photoresistor (light sensor) for detecting whether the closet light has been left on.
The circuit also has a 10µF capacitor to stabilize the power supply of the infrared sensor, since the primary motherboard is located so far away. Update: Depending on the salt level, sometimes the display flickers between two bar levels. To reduce flickering, I added a 47 nF capacitor to the sensor output pin (per sensor testing) and added code to read the sensor four times and average the result.
The wiring is spare cat-5 cable. I figure the twisted pairs will deliver good signal quality and will endure being moved back and forth with the lid each time the brine tank is refilled.
A hole in the circuit board provides rudimentary cable strain relief so that the connector won’t be pulled out if the lid is dropped. Nylon washers are placed between the stainless steel screws and the circuit board to reduce stress on the board.
Update: What’s wrong with the setup as pictured above? Obviously I pulled the cable through the strain relief hole and then inserted the wires into the Molex terminal housing (WM2002 at DigiKey). So, how do I get the cable back out since the connector header won’t fit through the hole? Why bother with a connector if the cable can’t be removed?
Of course, if this device we’re being mass produced, the sensor and other components would be combined into a single cartridge-like housing that would fit into the lid.
Let’s see how the wall plate is machined...