Close

Board Level soldering Complete!!!

A project log for Washing Machine IoT

This is a non-invasive WiFi Washing Machine Monitor

pRoFiTpRoFiT 07/08/2015 at 07:400 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.........

...so 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 https://github.com/esp8266/Arduino/issues/338

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.

Discussions