Some households have water supplies that contain higher than desired levels of minerals. This condition is called hard water. There is nothing harmful about hard water but it does leave mineral deposits on pipes and appliances and makes cleaning a little bit more difficult. The solution is to have a water softener system which is basically a tank filled with salt that the household water passes through. This tank has to be refilled about every month and [David] was catching a little flak from his wife because he kept forgetting to fill it. He then set out to do what any great husband would do and built a Water Softener Monitor that reports the quantity of salt in the basement tank up to the living quarters.
[David] started thinking that he should test the salinity of the water to determine if salt needed to be added but after thinking about it for a while decided against it because any metal in that salty water would surely corrode. A non-contact approach would be to use an IR distance sensor mounted to the top of the tank and measure the distance to the pile of salt that slowly lowers as it dissolves into the water. In this case, he used a Sharp GP2D12 that can measure accurately from 10 to 80cm.
By itself, the distance sensor wouldn’t do much so [David] made his own PCB Board to hold all the necessary circuit components. The brains behind the operation is an Atmel ATtiny861 20 pin microcontroller. He’s got a lot going on and needed a micro controller with enough pins for all his bells and whistles. Besides sensing the height of the salt pile, the micro controller also outputs the salt quantity level via a 10 LED bar graph which is mounted in a wall plate. At first glance the wall plate looks like a standard light switch cover but it was actually custom cut on a CNC Milling Machine specifically for this project to ensure a perfect fit. Right below the LED bar graph is a photocell. The microcontroller only lights up the LEDs when there is a change in ambient light in the room, whether from a light turning on or a passerby casting a temporary shadow over the sensor. The LEDs will turn off after 3 minutes of non-activity.