A way to read the state of an LED

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

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).

1 Like

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…

1 Like

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.

1 Like

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:

1 Like

ok… i tried :wink:

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

2 Likes

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:

2 Likes

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.

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)?

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:

2 Likes

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.

3 Likes

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.

2 Likes

@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 .

1 Like

A friend of mine says adafruit has a good RGB color sensor. Cost is about $3 for just the sensor component or $15 if you buy it on a sparkfun board.
.

http://www.mouser.com/new/broadcom/avago-apds-9960-sensor/
.

https://learn.sparkfun.com/tutorials/apds-9960-rgb-and-gesture-sensor-hookup-guide

@ogiewon

1 Like

Success! That went easier than expected thanks to the stellar ST_Anything readme. Thanks Dan!

The resistor is talking to SmartThings. It comes in like any other illuminance sensor and displays the lux through an analog pin on the board.

Unfortunately my original plan of using a magnet with a hole in the center won’t work, because the washer panel is not made of metal. So I have to figure out a nice way to attach it.

I also need to figure out a way to solder this stuff together, since I’ve never done anything “permanent” with Arduino before now…

3 Likes

“Just” replace the breadboard with a pinhole board (hmph… what are they called… “proto boards”) of a similar configuration; they are available with matching traces to a breadboard (i.e., vertical power rails and horizontal signal rails).

Something like this:
https://www.amazon.com/Gikfun-Solder-able-Breadboard-Plated-Arduino/dp/B071R3BFNL/ref=sr_1_2?ie=UTF8&qid=1504910766&sr=8-2&keywords=breadboard+solder

The hole spacing is usually plenty big enough for non-expert soldering; i.e., Just heat the pin and a bit of the copper trace, and a drop of solder will fuse.

Done!

2 Likes

Excellent, I ordered “a few”. :wink: https://www.amazon.com/gp/product/B01N3161JP

Here’s the general idea.

2 Likes

The problem… If you completely cover the LED, then it no longer functions “manually” (i.e., as a local indicator). Not a huge deal, but a theoretical challenge. It’s worth using some translucency in there so you can still see the LED?

I would also consider adding an LED to the project board as a diagnostic, perhaps. That was a nice feature of the ThingShield (a multi-colored LED…), which I use to indicate the status of the device so I know it matches the Thing in SmartThings.

3 Likes

Yeah, I was gonna hit up the craft store and look for small translucent plastic things. It’s a shame the panel isn’t magnetic… I expect the tape to fall off quick, as the hot water evaporates directly into it.

1 Like

Congrats on creating the world’s first cyborg washing machine… half cold, unfeeling robot: half cold, unfeeling consumer appliance.

3 Likes

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.