A way to read the state of an LED


#1

Arrrgh, these washing machine pistons are driving me mad. I’ve been fooling around with webcore and a metering plug for ages to alert me of my washing machine’s completion. All I REALLY need to do is read the state of the green “completed” LED indicator. That light only comes on at the end. Badaboom.

What are the options here? Can I solder the LED connection to a z-wave device to measure current? Or is there a little photo sensor I can duct tape to the front of the LED?

This would be SO much easier than fiddling with the smart plugs.


The Laundry Has Finished
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #2

You’ve got the right idea, and frankly, someone with more experience than myself might figure out how to do this with a “simple” dry-contact Z-Wave sensor or hacking a ZigBee or Z-Wave Contact Sensor, etc…

But if I were to do this without further research and for a little extra education, I would recommend searching the Forum for ESP8266 … this is a mini-Arduino (programmable MCU: Micro Controller Unit), which can easily read the input from a $3.00 photo sensor and, the ESP8266 has WiFi built in, which means it will connect to your LAN and then can talk to SmartThings.

This second method is less complicated than it sounds and opens you to a world of possibilities … like wiring in a second light sensor to your Dryer from the same ESP8266, for example; and other project ideas around your home.

Here’s a an example of what the ESP8266 can do:

Of course, the SmartThings “ThingShield” (ZigBee based) was a slightly simpler and slightly more expensive option; but they discontinued this. I use mine to control my Projector, Projector Modes, and Screen.


#3

Anything you solder to any Part of the washing machine will void your warranty, often for good reason as a washing machine itself is a fairly hostile environment given the amount of humidity and vibration. Opening things up is rarely a good idea. :disappointed_relieved:

Can you not use a vibration sensor? Many people find that effective.

As far as the color sensor, you could make one with an Arduino, but do you really need to check the color? Isn’t it off and then it turns onto Green? If so, an ordinary light sensor ought to work and would be more reliable.

But I would try a vibration sensor first.


(Andy - United Kingdom) #4

I hear a lot of people who have problems with washing machine/dryer sensing…
I just use a metering plug with a little app I wrote to sense when the power level drops below (in my case) 2 watts AND STAYS THAT WAY FOR 5 MINUTES
This means the appliance has finished
I needed the ‘stays that way’ because my machine often drops to below 2 watts in between parts of the program so just checking the level once would false alarm a lot.
If it’s below 2 watts for more than a couple of minutes it has stopped.
My app then turns on a momentary switch to ‘announce’ the machine has finished


#5

Yes, I’ve tried various iterations of this as well. Unfortunately, the fill cycle runs at 1W, and when the cycle is complete, everything stops except for that “completed” LED, which apparently uses 1W. So it’s impossible for the power meter to determine when it’s finished! I was only able to determine this after writing the power usage to a fuel stream in webcore.


#6

@tgauchat The ESP8266 looks interesting, thanks. I have a couple arduinos and components laying around already. I will look into this and see if I can put a photo sensor right on that LED. I’ve been meaning to look into this, so thanks for the reminder.

@JDRoberts - Yes, good point about the warranty. I’ve tried a vibration sensor - the washer only vibrates during spin cycles, and then there’s about 15mins of stuff that happens afterwards, different for each type of cycle. Long story short, I’d have to babysit the thing for at least a full day to figure it out.

However, the good news is there is only one LED to read:

Kenmore-22352-Cycles

The “COMPLETE” LED only lights up when it’s actually complete. So physically the only challenge will be getting a photosensor securely attached there without voiding the warranty :smiley:


#7

Hey look at that! I already have an esp8266! Guess I know what I’m doing this weekend…


(llcanada) #8

@Cobra any chance that you will share that app. Sound like what I need? thanks


(Pizzinini) #9

This sounds like an exciting project but I recommend you try the power meter plug again. From the picture it may be hard to attach something to the washing machine and not have it fall off after a while, especially with the vibration.

I recommend you chart the power usage over the wash cycle and then create your piston based on this data rather than by trial and error. You could create a WebCore fuel stream or use something like InitialState.com or Atik Cloud (all are free).


#10

Thanks pizzinini,

I have in fact written a fuel stream to observe. The washer runs at 1W for 20minutes during the fill cycles. It also runs at 1W continuously after it is finished and the led is on, waiting for someone to come along and open the door. Can’t do a “if falls below 1w” piston, because it never will. Can’t do “falls below 2w” because it’ll give a false positive during the fill cycles. This isn’t accounting for the different run cycles, which all have different lengths, orders, and combinations of fill/agitate/rinse/spin.

All in all, I’ve been working on this for ages and if I want to take into account every possibility, we’re talking about a lot of observation and a very large piston to get all the timing right.

Other washers are easier, in fact my previous washer worked like a charm. It never ran below 4W unless it was done. My new washer is more efficient I guess, but… Not quite as smart, looks like!

This photo resistor is about the size of my pinky nail and can probably tape right over that LED…


(Pizzinini) #11

The piston should not be “if it fall below…” but “if it stays below … for X minutes”

I know this is the wrong thread but this piston should work for you. By using a variable you avoid notification during the loading. and by using “stays below” you avoid notification due to the occasional power drops during the wash.


#12

Thanks - the piston I have is very similar to yours. Here’s mine, based on tonesto7 and Eric182:

Here’s the problem: it never drops below 1W because of that LED. When everything is done that “completed” LED stays on for who knows how long until someone opens the lid. That would be manageable except the fill cycles are ALSO 1W. And then there’s something in between that’s 1-2W for 20 minutes. And depending on the type of cycle it’s running, this could happen many times.

I’ve thought about telling it to wait a minimum of 30 minutes before looking for the “stays below” trigger, but again, this all requires analyzing multiple fuel streams on multiple cycles (each which last anywhere between 30m and 3hrs) and finding the sweet spot, which could take months of trial and error unless I want to lock myself in the room with the washer for 24hrs straight.

It’s not impossible - but I could better spend all that time learning how to teach a photoresistor to talk to SmartThings and open up a whole new realm of possibilities :sunglasses:


(Pizzinini) #13

ok… i tried :wink:

My next recommendation is to buy a new washing machine (just kidding!)


#14

Haha, that’s how this all started! (Previous washer was easily automatable)

Thanks again, I’ll report back when I have a working Laundrino. :rofl:


#15

This is one way to detect color. There are also color sensors you can buy.

It all seems like a lot of work though. Can you not detect activity and then detect no activity for at least 30 minutes? You don’t need any specific pattern, you just need activity then followed by lack of activity for long enough to cover all the options.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #16

But it is fun work! :smile: … As I mentioned in my first response, the education and success of this use case for an MCU & photosensor lends itself to many other unique applications. There are thousands upon thousands of electronics out there that have an LED indicator. Some gas stoves, as an arbitrary example, have an LED to indicate the gas is flowing.

Doesn’t it seem that the obvious problem with that approach is that Wash Cycle completion detection & reporting will take at least 30 minutes? Isn’t the one major beneficial purpose of this project to detect Cycle completion ASAP so that the user has the opportunity to optimize use of the Washer (i.e., move the clothes to the dryer and start the next load with minimal delay)?


#17

Good point, I tend not to think in terms of a two machine cycle these days. My bad. At our house we have a combo unit: you put dirty dry clothes in, you get clean dry clothes out. Works great. My housemate puts laundry in at night before he goes to bed, in the morning it’s clean and ready. And nobody has to transfer wet clothes. :sunglasses:


(Dan) #18

If you’d like to use an ESP8266 for your project, my ST_Anything library may be of help. It actually supports the ESP01 as a stand-alone controller with 2 digital pins. ST_Anything actually has support already for the photoresistor you showed above, but as an analog illuminance sensor. You should be able to tie it to a digital pin as well, and then use a “contact sensor” device to monitor that pin.


#19

Hey thanks Dan - I’ll definitely use ST_Anything for this. I’ll try both analog and digital reads - either one should work. I may go with an adafruit feather board for the esp8266 instead, since they can be programmed directly via usb, and also through the arduino ide.


(Andy - United Kingdom) #20

@llcanada
I’m happy to share :slight_smile:

At the moment it still has loads of debug code etc so I’ll clean it up and post it.
I’ve started a new thread rather than clog this one up with code .