Friday, November 8, 2013

Tumble Dryer Remote Display - Part II

This is the second part in a short series of postings on a small project of mine, which is based on a Raspberry Pi: a tumble dryer remote display. In the first part I told you what led to the idea of the device itself, and why I used a Raspberry Pi to build it. This post will be (mainly) about the hardware I use, and I will try to explain the "design". Part three describes the software (aka "short Python script", actually) that makes use of this interface.

The interesting section of the control panel.One of the most important aspects to me regarding the remote display has always been that there should be - if any - a minimum of tinkering with the dryer's electronic. The control panel is pretty simple, it uses red LEDs to indicate the current status. Sadly it was less easy than expected to remove the panel, to be honest I lost my patience in trying to do it and gave up on this. Instead, I decided to find a way to actually "read" the LEDs, or at least those that are of interest to me. (Those would be the top three in the picture on the right; roughly translated: drying, cooling down, finished.)

Since the LEDs don't provide a consistent brightness to indicate a high level (or "on") status I had to choose between two options to monitor them: either phototransistors or light dependent resistors (LDRs), each of them with the need for additional parts to make the detection circuit work. I decided to use LDRs, along with an A/D converter, as it appeared to me that this would be the easier and more flexible solution to create.  The "reader" circuit would be quite simple, and the work would be done by a program running on the Raspberry Pi.

At that point another decision had to be made: how to connect said circuit to the computer? The GPIO connector offers quite some options. Out of curiosity I looked for A/D converters that could possibly work for me in the setup I was thinking of. I finally went for the Philips/NXP PCF8591P, mostly because it could be used with 3.3V, which definitely a plus when using it with a Raspberry Pi without an additional level shifter - and it was the converter my preferred electronic component reseller offered back then. This decision led me to the answer to the initial question: I would use the Raspberry Pi's I²C-bus.

The first interface prototypeFinally, after reading the converter's data sheet, looking up some details and ordering the needed parts, the circuit for the first prototype was ready to be built. The picture on the right shows the breadboard with the basic components, ready to go, with one LDR. (Power and I²C-bus connections to the Raspberry Pi missing.) - Sadly it took me almost a year (yes, a whole year) to return to this project.


Two weeks ago the prototype was finished, and after some basic tests I wanted to find out whether it would really help me in building that tumble dryer remote display or not. So, while there was laundry in the washing machine I prepared the dryer. The whole thing looked a bit crazy, to say the least…

Complete setup with first interface prototype connected to a Raspberry Pi

… But it worked! It worked as expected. Using this prototype and a very basic Python script I logged the values of each of the A/D converter's channels (each of them connected to an LDR, thus "reading" one status LED of the dryer) while the machine was doing its job. At the end of the laundry day I was really pleased to see that it was possible to use the collected data to the tell the dryer's status.

The finished second prototype of the interface without the caseAn additional result from the logging session was that ambient light conditions would be something I would have to take care of, either by the interface's design, or by the software that would have to deal with the data - or both. I was lucky that this day had brought a lot of changes for said conditions, so their impact on the data was pretty easy to be spotted. The only way to find out if the whole idea could still work for the remote display was to create another prototype, put it in a proper case, place it on top of the control panel - and run some more tests.

At that point I decided to add a Dallas/Maxim DS18S20 via the 1-Wire bus to the setup to track the temperature in the bathroom. It can get quite warm in there while the dryer is running, so I thought it would be quite helpful to get the idea when to open the window - or shut it again, when it would get too cold in the room. (Apart from that I had one of those ICs left after I had finished another "monitoring solution", based on this small project.)

After placing the whole circuit in its new case (with the piece of wire-wrap board that can be seen in the picture hardly more than a square inch in size) and placing it on the dryer's control panel (using Tesa Powerstrips) I ran another round of logging while the machine was running.

Complete setup with second interface prototype connected to a Raspberry Pi

This time the ambient light seemed to have had way less impact on the logged values. The case did a great job, all sensors were in a good position, the data looked good enough to make a program deal with it. So the next step was to do exactly that: write the code that would fetch the data from the A/D converter via the I²C-bus, interpret it and make the results available - in some way. That is what part three is about.

To round off this part, attached below are images of the plugging chart (for the breadboard-based prototype) and the schematic of the circuit, both created with the Fritzing application. (Feel free to download dryer_monitor.fzz.) It has been the first time that I tried to use the application. The results sure could be better, but at least they are not hand-drawn.

Comparing the picture of the two prototypes above with the chart and schematic below, you will spot two differences, as I used 
  • a socket with integrated capacitor for the converter IC (as I was going to use a socket anyway, this version came in handy), and 
  • a resistor network (5 pins, 4 x 1k Ω) instead of discrete ones as pull down resistors for the converter's input ports.

Plugging chart of the setup


Schematic of the interface

Now that you know about the working interface prototype I am using at the moment to "read" the tumble dryer's local display, in part three (which will be available soon) you will find out about the software (yes, that "short Python script" I mentioned earlier) that interprets the A/D converter's data and creates the actual remote display.

As I said before: laziness can be a wonderful thing!

No comments:

Post a Comment