Washing Machine IoT

This is a non-invasive WiFi Washing Machine Monitor

Similar projects worth following
The Washing Machine IoT.

Using a nodemcu esp8266 development board and several super tiny led sensors this system will monitor a washing machine front panel led output. Then connect to the network and send notifications to pushbullet client. This can be a phone or a computer.

Current system only checks if a wash has started or finished. Future development could include web page to give current status and possible time logs.

not sure on showing sparkfun images here but i think if i put this cc im good to go ;)

Creative Commons images are CC BY-NC-SA 3.0

  • 1 × ESP8266 nodeMcu rev 0.9 this comes preloaded with lua nodemcu. i'm using arduino ide to program not lua
  • 1 × SparkFun Analog/Digital MUX Breakout - CD74HC4067 so i can get 6 analog channels to esp. which only has one ADC
  • 6 × ALS-PT19 Light Sensor small smt light sensor
  • 6 × Round 1/2" magnet small magnet to secure led sensor bar in place. Also hold case and wire in place
  • 1 × 4"x6" 2400D Phenolic Pitch 0.1" 2.54mm Used to build the led bracket - Purchased from Pixel Print Ltd

View all 8 components

  • Prepare for some long term use

    pRoFiT03/16/2016 at 05:41 0 comments

    Okay after a couple days of testing i think it works good enough to seal up this project and protect it for a little long term use. I found an old iPhone 4 enclosure that has just enough room to put the nodemcu controller board into. And I've super glued two rare earth magnets to the back so i can attach to the washing machine without having to screw into anything.



    Since i had some extra magnets i came up with a nice way to manage the cable. Using a cable tie and a magnet i can run the cable across the front to keep it out of the way.

    Cable tie Parts

    I also found flat screws so i fixed the sensor board mount with flat screws so the magnets are now holding flush to the washing machine. They were pan heads and it would rock a little before.

    Cable harness, New flat screws on sensor board

    Okay i had to mount it real quick and take two more photos.


    Magnetically mounted on the back

    And that is it for tonight. i will still attempt to sit down and create a video of the process. Possibly next week I will have some video editing time.

  • Testing Has Started

    pRoFiT03/13/2016 at 10:02 0 comments

    Okay after seeing hackaday post someone elses washing machine notifier on the page i had to go back and try to finish my project. Following their use of pushbullet and a post on the esp8266 forums i came up with the following script. I will remove my apikey, get your own ;)

    #include <ESP8266WiFi.h>
    #include <WiFiClientSecure.h>
    const char* ssid = "........";
    const char* host = "";
    const int httpsPort = 443;
    const char* PushBulletAPIKEY = ".........................................."; //get it from your pushbullet account
    // Use web browser to view and copy
    // SHA1 fingerprint of the certificate
    const char* fingerprint = "2C BC 06 10 0A E0 6E B0 9E 60 E5 96 BA 72 C5 63 93 23 54 B3"; //got it using
    // analog portion
    int add1=0;
    int add2=5;
    int add3=2;
    int an=A0;
    const int triggerLevel =  200; // level to trigger change in ledstate
    int sendWashComplete = 0; // set 0 at start, 1 when trigger is hit, 2 once sent, back to 0 during if start has started or all leds off like when wash is done and lid is opened.
    int sendWashStart = 0; // set 0 at start, 1 when trigger is hit, 2 once sent, back to 0 during if complete or all leds off
    int ledStates = 0; // use bitwise for keeping track. one number to compare against
    int lastLedState = 0; // set same at start. only check once they change in a loop.
    void setup() {
      pinMode(add1,OUTPUT); //analog control
      Serial.print("connecting to ");
      while (WiFi.status() != WL_CONNECTED) {
      Serial.println("WiFi connected");
      Serial.println("IP address: ");
    void loop()
      byte i;
      for( i=0;i<=5;i++)
        setAddress(i); // switch analog port before reading
        delay(50); // give 50ms to let analog switch complete.
        bitWrite(ledStates, i, 0); // set 0 before loop
        for(int x=0;x<1500;x++) // comes out to about 1 second scan rate for all 6 leds with given switch delays etc...
          if(analogRead(an)>triggerLevel) // read level output and compare
            bitWrite(ledStates, i, 1); // if we see it go high after anytime during the 1500 loops, set high or LED ON STATE. This should eliminate 50/60hz led issues on the wshing machine...ugh....pain.
      Serial.println(ledStates); // simpler i guess
      if(ledStates!=lastLedState) // if there was a change from last loop do something
          case 16 : // wash complete state [0,1,0,0,0,0] = 16
            if(sendWashComplete == 0)
              sendWashComplete = 1; // 1 means we need to send notification.
              sendWashStart = 0; // 0 means it can be triggered again
          case 33 : // 33 is start and locked. sometimes both are on at same time.
            if(sendWashStart == 0)
              sendWashStart = 1; // 1 means we need to send notification.
              sendWashComplete = 0; // 0 means it can be triggered again
          case 1 : // 1 is start only
            if(sendWashStart == 0)
              sendWashStart = 1; // 1 means we need to send notification.
              sendWashComplete = 0; // 0 means it can be triggered again
          case 0 : // clear notifications if all leds are off machine is off or completed and lid opened.
            sendWashComplete = 0; // 0 means it can be triggered again
            sendWashStart = 0; // 0 means it can be triggered again
          default : {}
      if(sendWashComplete == 1) washComplete();
      if(sendWashStart == 1) washStart();
      lastLedState = ledStates; // at end of loop so we can test next loop
    void washComplete()
      Serial.println("Wash Complete");
      sendWashComplete=2; // set sent
    void washStart()
      Serial.println("Wash Started");
      sendWashStart=2; // set sent
    void SendNotification(bool on)
      // Use WiFiClientSecure class to create TLS connection
      WiFiClientSecure client;
      Serial.print("connecting to ");
    Read more »

  • Board Level soldering Complete!!!

    pRoFiT07/08/2015 at 07:40 0 comments

    Okay sometimes life gets busy and projects fall behind. Found some free time to get back to this.

    Tonight i finished soldering up the interface to the NodeMCU ESP8266 board. I used a couple Arduino shield connectors so i can remove the NodeMCU in case i have programming issues while its connected up. Or if i want to use it for another project :)

    Powered up assembled design and ran a quick arduino sketch to test out the analog read from the 6 LED sensors and bam! somethings not working right. I read 700 from the analog read....WTF! No lights should be 0V reading around 0. so i use an led flashlight to light them up. hmm. 800??? whats going on here. The problem is i should be getting a 0v reading around 0 and a 3.3V reading around 1024 from the analog read. It worked on my other NodeMCU at work when i tested out the circuit on a breadboard and a single LED sensor......... after digging around on the internet i found some people with similar issues with some NodeMCU boards not returning the correct voltage from the ADC.

    This problem

    Well thanks to bluewalk with his code i modified the __analogRead in core_esp8266_wiring_analog.c

    extern int __analogRead(uint8_t pin) {
      if(pin == 17){
        return 0xFFFF & system_adc_read();
      return digitalRead(pin) * 1023;

    Re ran the sketch and everything seems to be running great. I'm now getting around 2-3 with no lights on the led sensors and ~1000 with a led flash light. So now i need to work on getting the ranges from the actual LED's and possibly a way to determine if there is ambient light based on the ADC level from all 6 sensors. As i don't think the washing machine will have all of them on at once. but will have them all off at the same time.

    Here are some photos of the progress. I will need to find a project box to put this in soon.

    Here you can see the Arduino shield connectors on the board. This makes removal of the NodeMCU easier.

    Everything connected up and transmitting LED sensor readings back through the USB Serial port

    Now the hard part of the work starts next. Programming all the code. Still not 100% sure what i will need/want. The bare minimum is to let me know when the wash is done. but now i can read all the LED indicators so maybe a full webpage with Indicators showing a replica of the washing machine front display.

    I've also built an SD card adapter that runs in 1bit mode. Kind of slow but i was thinking i could use it to log everything. Keep track of washing cycles etc... but for good data tracking i will need to figure out TIME and DATE??? maybe NTP server? it will be on my home network. should be able to get time from somewhere with a simple HTTP post command.

    Stay tunned..... i'll be traveling this month. so probably get back to this in august.

  • LED Sensors soldered on

    pRoFiT06/19/2015 at 07:35 0 comments

    Another slow but steady day of work on the project.

    With a good headband visor magnifier and a flashlight jammed against my head i was ready to start. These LED sensors are tiny. Some good SMT Tweezers would of been nice but i had to do with a really sharp pencil to push these things into place and hold down while hand soldering. They kept sticking to my x-acto knife. See that thing on Washingtons eye!!

    Anyways steady hand and an hour later and i have them all in place. Trust me they are there.

    Couple more added wires and the sensor board is 99% complete. Just need to get the flat head 4x40 screws and this can be attached to the washing machine for some testing.

    Yah i know wireless device with long wired cable.... If i can distract my wife long enough maybe i can scrap the sensor board and wire directly to the LED's inside the machine!!! :)

  • Proto Board cut down to Size

    pRoFiT06/18/2015 at 07:38 0 comments

    I almost forgot to post my work from last night. Received my veroboard from Pixel Print Ltd. Printed out my design on paper and cut it down to the shape. Used that to verify size and fit on the washing machine LED's. Looks like everything is good and i have clearance from the start button and the selector knob.

    So i taped it down to the veroboard and started up the Dremel. Started with cutoff wheels and moved to sanding wheel to round the edges off.

    Also added a couple mounting holes on the ends for the magnets. At first i was going to cut big holes and glue the magnets in the middle of the veroboard. but i had magnets with holes in them so i decided to use screws to hold in place. Giving the led sensor board about 1/8" clearance from the washing machine LED's.

    Currently I don't have flat head 4x40 screws so the pan head is getting in the way of the magnets sitting flush. I thought about grinding them down, but screws are cheap, i'll pick some up tomorrow.

    Here s what it looks like so far. LED Side

    Front side. May need PAINT? Not sure yet. Maybe i can get a 3d part printed at work to cover it.

  • Wire Harness Complete...maybe...

    pRoFiT06/18/2015 at 07:24 0 comments

    I don't want to be to intrusive on the washing machine so i built a cable harness today to keep the ESP and analog mux separate from the LED sensor board. Cut the ends off a DB9 serial cable and crimped on some single row 9 pin headers. Don't think i will need all 9. Only 6 sensor data lines and 1 power line going to sensor board....I may need ground too... will require testing. But for now i only need 7 wires and i have 9 so i should be covered in case the design changes.

View all 6 project logs

Enjoy this project?



Mark Kuhlmann wrote 04/03/2016 at 00:14 point

I like your project! Very detailed. I'm in the prototyping stages of mine as well.

  Are you sure? yes | no

pRoFiT wrote 09/10/2015 at 05:22 point

I see i have almost a dozen followers. Sorry I've not had time to do anything the last two months.The Project is at a stand still. The only thing left is coding. I did build a SD trans flash adapter that can plug in if needed. Slow but works since it uses 1 bit transfer. There is just so many different paths i could use for sending the notification. I was going to use the SD card reader to hold a website that could handle all the settings and display current washing machine state. I would have to use some streamlined html to make it fast. maybe not even use images since i tried to make a fake google page and the google logo took forever to load up. 

So any ideas from the community?

Good website with code for sending notifications to phones?


  Are you sure? yes | no

pRoFiT wrote 06/18/2015 at 07:13 point

eok, Thanks for your help. I wrote some test code to read the analog value in from the led sensor and put it in front of the washing machine leds. seems like i get a good reading back. I will probably end up tweaking threshold values until i get it to be consistent. Sounds like i may need to take a thousand samples or something and use an average. (i write test code for a PCBA production environment for a living) accurate readings are always an issue. or i should say getting repeatable measurements.


  Are you sure? yes | no

eok wrote 06/12/2015 at 13:26 point

i made something like this too.

i ran into the problem that the led's are powered through the mains. so they flicker with 50/60 hz.

if your light sensor is too fast he might miss the light-phase from an "on" led. and you get wrong readings.

i had to take several samples and average them to remove the flickering and get the real status.

took some debugging sessions to realize that. keep that in mind if you get strange readings.

;-) ...eok

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates