Laundry IoT sensor

I’ve been adding things to my homeassistant setup for a while now, I’m always looking for new things to sense and this one has been a long time coming. I put together a board that measures the current flow for my clothes washer, dryer, and the distance to the surface of the water in my sump pump well. I could have added a bunch of other stuff like a PIR motion sensor, light sensor, temperature, humidity, and barometric pressure sensor, but I already have two of each in the basement. If I run into issues with too many items on the wifi I’ll condense this and one of the other basement sensors, but for now I’m ok (according to my chart I am only using 57 ip addresses out of the 204 not in my dhcp pool).

The device is just a D1 mini, an ADS1115 i2c analog to digital converter, a sharp IR sensor, and two current transformers with signal conditioners. The current transformers are the dfrobot ac current sensor v1.0 which isn’t cheap (I wouldn’t just throw one one every device in the house) but they work very very well. To use them without modifying the washer and dryer I just made some 1ft long cords with male and female outlet ends on them and exposed the three internal wires so I could just grab the hot wire.

The calibration wasn’t all that difficult, I just took a reading at 0A and used the reading from the tasmota web interface to indicate what the zero crossing should be for my two point linear calibration. Then I started a cycle and clamped my uni-t ut210e AC/DC clamp meter next to the current clamp and read off the amperage. That plus the reading from the tasmota web interface gave me my second point and I was able to develop my calibration. In the rules for tasmota it looks like this:

"rule2",
"on tele-ADS1115#A1 do var2=((0.0013*%value%)-0.013) endon",
"on var2#state do publish stat/i3/inside/basement/washer/current %var2% endon;",
"rule2 1"

The only interesting thing about the sharp IR sensor is that the values scaled inversely with distance, but that just means a negative coefficient:

"rule1",
"on tele-ADS1115#A0 do var1=((-0.0024*%value%)+28.787) endon",
"on var1#state do publish stat/i3/inside/basement/sump-pump/distance %var1% endon;",
"rule1 1"

I had some issues with the sharp IR sensor readings changing direction (as I increase the distance the analog value gets smaller, but then starts to get bigger again). I dealt with this by just only operating in the range where it was basically linear. I should have probably checked the specs to see what range would produce valid results, but this way it works so I’m satisfied.

we had a rainstorm, can you tell?

I still have more to do with this data, like alarms to repair the sump pump, alarms that laundry is done, but I have reliable data now.

One Response to “Laundry IoT sensor”

  1. Intro to my ESP8266 adventures | Evan's Techie-Blog Says:

    […] Current sensor […]

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 )

Connecting to %s


%d bloggers like this: