Brine Tank Interface

January, 2010

Having recently discovered Arduino via my new Robotics hobby, I decided that it would be a good idea to incorporate one into a home automation project.  I was really inspired by this blog from Robot Room that outlined the use of an Arduino and a Sharp IR Range finder to report on the amount of salt remaining in a water softener’s brine tank.  I loved this idea because I typically neglected this chore and ran the brine tank dry often – definitely ripe for automation.

I started with an Arduino Deumilanove board and a network shield.  I put them inside a plastic project box from Radio Shack and cut holes for the wires.  Next, I wired up a Sharp GP2D120 that I bought from RoboticsConnection.  I bought a blank, white, nylon wall outlet plate and cut holes in it using my new Dremel Stylus that I got for Christmas (love this tool!).  I mounted a large momentary push button and a 10-segment LED strip onto a circuit board and fastened it to the back of the outlet plate.  I used a left-over PC ribbon cable to connect the wall plate to the Arduino.

I had to do a lot of testing in order to get the Arduino app to interpret the inputs from the Sharp IR range sensor properly.  The depth of my brine tank was just outside the range limit for the sensor, so I got weird readings if I over-filled the tank, and when I had very little left in the tank.  Finally, after much fuss, I completed the sketch.  The logic for the Arduino was pretty basic:  The app waits for an IP connection on port 8888.  When it receives one, it writes the current brine tank level.  I also had some logic for displaying a % full using the LED light strip for 10 seconds after the button was pushed.

My brine tank sits in a tiny room in the corner of my basement that has a full-size door for access.  I cut a hole in the wall by the door and mounted the wall plate.  I then threaded wires into a small hole in the lid of the brine tank and mounted the Sharp IR sensor inside.  I was concerned about the potential of corrosion of the electronics on the Sharp IR sensor, so I slathered it with some silicone to make it water-tight.  I ran a CAT5 cable through the dropped ceiling in my basement from the water softener closet to my server room for connectivity.  Now, I don’t open the door to the water softener closet unless Watchdog tells me.  If I want to check the salt level, I just press the button on the wall plate and check the LED readings.

After some additional testing, I found I was getting erratic readings from the device.  I was able to smooth this a bit by having the Arduino sketch take multiple readings and average them.  I also inserted a 10 uF capacitor into the plug of the Sharp IR sensor inside the tank in order to get a more consistent reading.

Next, I integrated the feed into Watchdog.  I added a function to NetChecker to check the salt level once daily.  If the salt drops below 20%, then it speaks a warning during the nightly security update at 10PM.  It will keep reminding us daily until we refill the tank.  I also built a nice SQL Report that graphically depicts the salt level each day.

Arduino Uno Source Code

Pictures:

Brine Tank Sensor. jpg

Capture

Advertisements

1 Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s