Introduction: The COMFORT Meter
THE PROBLEM
Especially in the winter months of the year, some of us are facing humidity related issues in our houses and apartments. Too much humidity in places where we live, eat and sleep can lead to mold, which can cause allergic and other health related problems.
Another factor of interior living comfort is room temperature. It can also influence level of humidity in living areas.
We all know analog and digital thermometers, humidity meters, there are even weather stations. They all show information using pointers, numbers and letters.
I wanted to create something that would give more intuitive, one-look information, using levels and colors. It would actually show the level of comfort, therefore I chose to call it The Comfort Meter.
THE SOLUTION
The idea is to take a temperature sensor and a humidity sensor, and connect them to an input of some kind of microcontroller. We will convert environmental characteristics into color light information.
To present the level of temperature and humidity levels in a colorful way, I chose to use LEDs of various colors. The temperature comfort level is about 20-24°C and the humidity comfort level is about 40-70% RH. The comfort levels of both will be represented in green. Everything that’s below or above the comfort zone, would be represented in other colors.
The comfort meter would have to have following characteristics:
• User friendly
• Attractive look
• Intuitive use
• Color level presentation of temperature & humidity
• Low cost materials
• Easy to make & configure
Step 1: PROTOTYPING
PARTS LIST
• 11x LED diode
• 11x resistor 470ohm, 0,25W
• PoKeys56U microcontroller
• PoSensors module
• AC/DC converter with USB plug OR
• Battery to USB emergency pack
• Appropriate casing
SCHEMATIC
Schematic shows you how to connect the electronic elements to PoKeys. PoSensors are connected to the dedicated connector on PoKeys using flat cable which comes with the PoSensors module. GPIOs (General Purpose Inputs / Outputs) are configured as outputs. The output signal travels over the 470R resistor and standard LEDs towards ground (connector on PoKeys). The power supply can be done either over AC/DC converter (in that case you will need a 5V adapter with USB plug and attach it to home power plug 110/220 Vac) or over an emergency battery pack with USB plug.
PROTOBOARD
Connect the elements on protoboard to test if everything works. Use the attached schematic. PoKeys is available with or without terminals. For prototyping I used the no terminals version with breakthrough connectors. I have connected the PoKeys and the protoboard using dupont connectors. The PoSensors board is attached to PoKeys using supplied flat cable.
MEASUREMENTS & CALCULATIONS
Electronically, the connections are pretty simple. GPIO (general purpose input / output) is programmed as output and gives voltage of 3.3V. I measured the voltage drop over 470ohm resistor which was 1.3V. Ohms law gives us a LED current of 2,76mA. We have 12 LEDs which totals 33mA, which is way below the limiting value of PoKeys device (100mA), so that should work just fine.
Each time you use a resistor, you should check if they will stand the power they carry. I have used the 0,25W resistors. If I calculate the power (UxI = 1.3V x 2,76mA) I get 0,0036W which is also way below the limits.
Step 2: PROGRAMMING
PROGRAMMING
Programming PoKeys was an easy task. To be honest, I don’t have much experience with these kinds of projects. Tried a little Arduino, but things got complicated when something in the code didn’t work the way it should. A kind friend always helped me out.
PoKeys device comes with 2 applications: PoKeys, the setup application and PoBlocks, the programming application, both available for free download on www.poscope.com. To configure & test PoSensors, go to Peripherals - - > sensors. Click Auto add new and Scan for devices button.
The main window enables you to set up the outputs (LEDs). Just click the output number and select Digital output. When done, click send to device.
To test if everything is wired correctly, go to the Input / Output test interface found under Peripherals - - > Digital input and output menu. Enable output control and use you left / right mouse button to activate / deactivate an output.
To program PoKeys, run the PoBlocks applicaton. Use the blocks found under tabs and insert them in the design area.
Use the sensor block to get temperature and humidity values (sensor ID=1 for temperature and sensor ID=4 for humidity). Use the Divide block to convert the sensor values (0-5000 for temperature and 0-10000 for humidity) to more practical ones (0-50°C and 0-100% RH). Use the Greater or Equal comparison block and connect them to output LEDs. Set reference values on each of the comparison block using tables below.
THE TEMPERATURE CHART
TEMP LED COLOR OUTPUT NO.
--------------------------------------------------------
19 YELLOW 12
21 GREEN 13
23 GREEN 14
25 GREEN 22
27 RED 21
THE HUMIDITY CHART
HUM LED COLOR OUTPUT NO.
--------------------------------------------------------
30 YELLOW 44
40 GREEN 43
50 GREEN 42
60 GREEN 34
70 RED 35
The ''heartbeat'' diagrams are also part of the same diagram. Not to get connections confused, use the FROM and TO blocks found under Miscellaneous. Point them to 3-input AND block using connection IDs found in the properties tab of FROM / TO blocks. Using pulse timer, you will get the ‘’Heartbeat signal’’ on the device housing when everything works the way it should. In case nothing is lit up, there is a power supply failure. In case LEDs are lit up, but the heartbeat is off for a longer period of time (more than 10 seconds), that means that at least one of the sensors is broken. Left LED shows temperature sensor status and the right LED shows humidity sensor status.
To use the device offline (without PC), you have to enable the Auto start feature, found under Project properties in the Properties pane. The device can run either on 5V adapter either on a battery. Limiting values are from 4.5 to 5.5V.
To compile and download the diagram to PoKeys device, click Check and Transfer. To run the code in the PoKeys click Run. To stop it, click Stop. To try it out one cycle at the time, click Step. To see what it does, while the code is running, click on the magnifying glass and check your diagram for live operation.
Step 3: ENCLOSURE DESIGN
BRAINSTORMING
At first I wanted the product to look a bit futuristic with an X sign in custom casing. Then I realized that this kind of casing is hard to get. X would also be a bit un-intuitive to read (which is which?). I could design it and print it at friend’s 3D printer, but that would take more time and I was concerned about the results. I wanted it to look good on the wall in our living room.
SIMPLE & CHEAP SOLUTION
I browsed the web a bit and found out that company that produced wall outlets and switches that we use in our home (TEM ČATEŽ), has surface-mount casings of the same line (MODUL CUBO), so it should look fine next to the light switch on the wall where the comfort meter would be mounted. I picked it up at the local hardware store.
It had just enough space to fit in the PoKeys device and the PoSensors board. Its design was modular so in case some of the LEDs would broke, I won’t need to replace all of them, but just the ones on the same module. Last but not least, since it’s being produced in high volumes and is used in electrical wirings, its price was very low.
Step 4: COMPLETING PROJECT
I have covered each module with a tape that wall painters use, that comes off easily and you can write over it. I wrote an X where an LED would go (7mm apart each way from the middle) and used a 5mm drill for the holes.
When that was done, I’ve put in the LEDs and soldered the 470ohm resistor to the anode (A) side of each diode. The cathodes side (K) would go to the ground. I’ve used some hot glue to hold the LEDs in place.
The casing had no back where I could fit the PoKeys and PoSensors board, so I had to make it myself. The baseboard is made of 3mm PVC material. I used the casing to mark its limits and cut it using a wallpaper knife.
I’ve attached the PoKeys and PoSensors board to the baseboard and tested out if everything works before I closed the casing and mounted in to the wall. Before you mount the casing on the wall, drill a hole in the bottom of the casing, somewhere near the PoSensors board, so it can measure the room temperature and humidity correctly. If you skip this step, the PoSensors will measure the enclosure temperature and humidity, which can be different than the room temperature and humidity.
I’ve inserted the modules with LEDs into the casing.
My Comfort meter is mounted on the wall. It's 21°C, at just the beginning of the comfort zone, and humidity is at 30% RH, relatively dry because of the heating in the winter months.
Step 5: FUTURE POSSIBILITIES
What could I have done better?
Well, for starters I could have used smaller LEDs so the product would look more professional and less home-made. The housing is pretty deep. I could use the PoKeys with terminals and wires without the DuPont connectors which take a lot of space. The comfort meter could even be in surface mounted enclosure.
The Comfort Meter version 2.0?
The PoKeys device is available in Ethernet version, too. You can connect the PoSensors to PoKeys and transfer measurements to service like Xively, which shows you temperature, humidity and other values in graphical representation over longer periods of time. So you could monitor your house temperature and humidity from anywhere on the world over internet connection.
PoKeys device also has some advanced controlling features. Instead of just measuring and displaying temperature and humidity values, you could, for instance ventilate the room with opening the windows if they are motorized. It also has an ON/OFF and PID regulation, which could control your HVAC system.