Close

Providing perception

A project log for Monitoring washing machines

One mans quest to spend less time in the basement

lars-knudsenLars Knudsen 02/07/2016 at 08:240 Comments

When the machines are running they have a few things in common: They move/shake, they make noise, their interfaces change during the cycle, the washing machine takes in water, both machines out water and they draw power. I don't know enough about the water in- and outtake of the machine to estimate if that would be a viable indication of when the machine cycle is complete so for now I will rule that out. Also, as mentioned in a previous post, I'd like the solution to not rely on something my machines do specifically, so others can use the solution and I can migrate it onto other machines if e.g. one of them breaks down at some point. This leaves noise, movement and power draw.

Measuring noise - This is probably the solution I have the least faith in due to the context of my machines. They are placed in a room with 5 other washing machines which can also produce noise, but perhaps clever microphone placement can isolate the noise from my machines.

My machines are the two stacked ones, dryer on top, washer in the bottom

I have previously had good experience with small preamplified microphone boards, so I've picked one of those up for the project. My local electronics dealer had the Adafruit Electret Microphone Amplifier available, so I will be using that for prototyping. If I end up making a custom board then I'm sure I could cut costs a lot by making the amplification circuit myself.

The microphone I will be using in the first prototype

I'll be measuring the amount of noise coming out of the microphone to determine if the machine is running or not. Sound is measured in waves and the input I am getting from the microphone would be waves around half the provided voltage (1.65V) from the provided voltage (3.3V) to 0V. Simplified by a sine function it would look like this

Then I'll use an ADC to convert it to a number my processor understand, and for this project I'll probably use the MCP3008 (Note to self - Pi has no ADC itself, you have left the world of Arduinos). The MCP3008 has a 10 bit ADC providing 1024 levels of sampling. I will deduct half of the sampling resolution, 512, from the signal which will make it look like this

Now half of the signal is in negative values, so I'll take the absolute value of the signal

And voila! Now I have a signal which I can summarize over time to express the amount of noise measured in that timeframe. The simplified example above makes this approach look vulnerable to sample at nyquist frequency, but since the noise the machines makes have more in common with white noise than pure sinusoids, I don't think this will be a practical problem.

Discussions