Introduction: Quality of Life Meter

[Note: The Mk.2 is live!]
Harsh new rules at work getting you down? Overtime sucking the life out of you? Or maybe things are great, either way now you can show your co-workers and management exactly how you feel about your job without a single meeting, memo, or team bonding exercise. This is the Quality of Life Meter. Boss take credit for your hard work? Turn it down. Get a bigger bonus than expected? Turn it up.

There is no exact formula for the Quality of Life Meter, the whole idea is that it's a personal thing. That being said on my project we use it as a measure of the groups level. Things like taking a day off, long weekends, cancelled meetings, and getting critical data on time make the meter go up while overtime, useless meetings, server crashes, and management trying to dictate our quality of life make it go down. It's kind of a gut thing and you'll have to decide for your self exactly what factors into moving your meter.

I won't bore you with the story of how this came about but I will be clear that in my work place this is clearly a joke and everyone knows it. If you just show up with this one day and set it low feelings may be hurt and people may take it personally. I'm not saying I'm against using this as a tool to vent your frustrations but just make sure your intentions are clear, joke or otherwise.

Of course Quality of Life isn't the only thing you can use this for, that's the biggest reason there isn't a label directly on the box (at work there is a sign over it but there's a strict no photo rule so I can't show it). It could jazz up a fundraiser, track your exercise, or help you save up for a trip. The Arduino that powers my design is far from working at capacity so there is the possibility for expanding the meter by adding sensors that can directly control the output value or adding WiFi or Bluetooth connectivity allowing your phone or computer to influence the output.

As always, feel free to ask any questions in the comments or via PM and if you make one, or a variation, I love to see pictures.

Step 1: Materials & Tools

Materials
  • Small Glass/Plastic Pane - Any material that is clear and stiff will work. Glass or plexiglass are the most obvious solutions.
  • Sheet Wood - The type of wood is mostly irrelevant as is the thickness, although I wouldn't go much thinner than 3/8" or 1/4". I used some 3/4" strips that were packed with some toe kicks from IKEA.
  • Cardboard/Plastic Sheet - Any thin, presentable looking material will work, even sheet metals.
  • Small Knob - This needs to fit your pot and be long enough to make it through the wall of your enclosure. In my build I improvised and used an internally threaded spacer as a knob.
  • Screws - Small screws to attach the back sheet to the wood enclosure.
  • Frosting Spray Paint; ($4, Lowes) - If you can find a pre-frosted pane then this is unnecessary.
  • Regular Spray Paint - I used the same color for the enclosure as well as for the blackout on the pane.
  • Wood Filler - When working with particle board (of all varieties) or ply woods using wood filler on the cut edges helps give a uniform texture and look after painting.
  • Wood Glue - Holds it all together.
Circuit Kit
  • 2x Small Perfboards
  • 1x Arduino Uno
  • 1x 6xAA Battery Holder
  • 12x 220 Ohm Resistors
  • 1x Red Blinking LED
  • 3x Red LEDs
  • 4x Yellow LEDs
  • 3x Green LEDs
  • 1x Green Blinking LED
  • 2x 74HC595 Shift Registers
  • 2x 16 pin IC Sockets
  • 1x SPST Switch
  • 1x Potentiometer - I honestly don't know the size I used as mine was salvaged. It just needs to have even output across a range of 0-3V.
  • Wires
  • Batteries
Tools
  • Table or Circular Saw - A table saw is best but you can make due with a circular or even a hand saw if one isn't readily available.
  • Sandpaper
  • Clamps
  • Masking Tape
  • Soldering Equipment
  • Drill & Bits
  • Utility Knife / Scissors

Step 2: Circuit Design

The circuit is relatively straight forward even though the circuit diagram looks pretty messy, there are a lot of connections. Initially I was trying for a 2x6 multiplexed array using a single 595 chip. This turned out to be very hard to program and it may be impossible as I tried several things that I really felt should have worked, at least partially, but got zero results. It worked fine on LEDS 2-11 but the issues start cropping up when you try and integrate flashing LEDs into the circuit. Physical flashing LEDs, like I utilize in the current circuit, don't work because the current is cycling on/off and the LED never has time to get to the off phase, making them stay on constantly. Software solutions designed to make a standard LED flash resulted in similar abject failures. If anyone can whip together a working proof of concept I'd be very interested to see it. After several frustrating weeks spent bug hunting, troubleshooting, and reconfiguring I realized I had a second 595 so I moved to a new circuit with the two 595's daisy chained to get the required number of outputs.

The 74HC595's are serial-in-parallel-out shift registers. This means you can use three pins on your microcontroller to send the bytes of data serially (one bit after another) to the 595 which then applies each bit to different output pins and then outputs those bits in parallel (all at once). When you daisy chain 595's you can now send two bytes of data and the first 595 then passes the first byte onto the second 595 and they both execute all 16 bits at once.

*Enough faffing about though, lets break down this circuit. Starting with the Arduino, we are using 3 digital pins to control the 595's. Pin 8 is the latch pin which holds the outputs steady while you write new data and is attached to pin 5 on both 595's. Pin 11 is used to transmit the serial data and is attached to pin 3 on the FIRST 595 ONLY. Pin 12 is the clock which pulses to send each bit and it's attached to pin 6 on both 595's.
The 5V output pin is attached to pins 1 and 7 on both 595's. The GND pin grounds all five "chunks" of the circuit.

*The potentiometer takes 3.3V from the Arduino and runs back to the Arduino ground. The sweep, or output, is connected to the first analog pin on the Arduino, A0. I don't know the value of the pot as it's a salvage but it is pretty small in size and made out of plastic so it can't be anything crazy.

*The power source is 6 AA batteries, providing ~9V, in a holder that uses a 9V battery clip as leads. The positive terminals pass through a push button SPST to the Vin pin on the Arduino. The plan is to use rechargeable batteries to cut running costs.

*On the 595's the pins I haven't addressed are 3, 4, 8, and the outputs. Pin 3 on #1 connects to the Arduino, as discussed above, but on #2 it ties to pin 8 on the first 595. Pin 8 is left unconnected on #2. On both 595's pin 4 connects to GND. The outputs, labeled as Q's, are pretty straight forward. starting with Q0 on #1 and the red flashing LED and ending with the green flashing LED attached to Q3 on #2.

*The LED array is simply a parallel array, one LED and resistor per row. All the resistors tie to the common ground. The size of the resistor needed depends on the specs of your specific LEDs. Use R = V / I, where R is the size of resistor needed, V is the voltage passing through the LED (5V if you use Arduino), and I is the acceptable current for the LEDs. 220 Ohm resistors will work well for most standard 5mm LEDs.

Step 3: Enclosure Design

The enclosure is a simple wooden "picture frame" with a glass/plastic face and a cardboard back. The size of the enclosure was determined by the glass pane I found and the depth was set by the width of the scrap wood  was making it with. The window is held in place by a groove cut into the frame and the backing is simply screwed into place.

To create the thermometer outline I simply scaled free a clip art picture to fit on the window. Before you start finalizing your circuit and soldering it into place you need to know the final size of the image so that you can get the spacing of the LEDs correct.

Step 4: Firmware

The code executes in three general steps: 1) Read in and divide up the pot position, 2) Decide what to display, 3) Output the proper command to the 595's.

Step 1 is contained in it's own user defined function. First you read in the analog pin attached to the potentiometer. This will result in a reading between 0-682 (remember we're on 3.3V, not 5). Next we want to return a value 0-11, representing the 11 segments on our thermometer, to the main program. To do this you perform an integer on the input using the size of one segment, 62 (682/11 = 62). The use of integer division, which uses only whole numbers, is not a mistake, it allows the function to return a whole number without taking the extra step of rounding the result with another line of code.

Once you output the segment that the pot is indicating the code needs to correlate that number to the binary sequence that will light up the appropriate LEDs. The decimal values that convert to the proper binary strings to control the 595's are stored in an array where their position in the array conveniently is the same as the output from the pot.

The final step is to push the commands to 595's. The order of operations is to deactivate the latch pin, preventing the LEDs from changing while the new commands are written, use the shift out command to send the binary strings through the data pin, which uses the clock pin to differentiate bits, and finally reactivate the latch pin to output the new data across all the pins simultaneously.



The source code is available in the .zip file (the .ino wouldn't upload) and a plain text file.

Just a quick plug: In some of the initial testing I used the fairly new ArduinoDroid app for Android. It's pretty awesome for what it is. It allows you to write Arduino code, with color coding and compiling, anywhere, like on lunch break at work. With a proper USB cable you can also power and upload to an Arduino board. There are some other features I haven't used yet like Bluetooth control and such but for a maker on the go or field work this app is phenomenal. I would highly recommend it especially since it is completely free (ad supported) and unrestricted. If you like it then you can pay a nominal fee to remove the ads and support development. I don't know who the developer is but they rock.

Step 5: Build the LED Array

If you're a little unsure about how the circuit goes together or are thinking about making modifications I would strongly suggest mocking the circuit up with breadboards before you make anything semi-permanent. This goes for testing and changing the program a well. There is a bit of soldering and it's easy to get lost when you're flipping the perfboard back and forth and accidentally go to the wrong pin so knowing your way around the circuit is helpful.

I started by placing the resistors since they are on the edge and it sets the spacing for the LEDs. The ground legs of the resistors are all tied to gather. Then solder the LEDs next to the resistors. The sockets for the 595's are placed near the LEDs that they will control. I haven't worked much with PC board and I didn't leave myself very much room. If you have some ribbon cable that would work here I would recommend it. If I were to start over that's what I would use. Before connecting everything together I added long flexible leads, with Arduino header compatible pins,  to the board as tie in nodes for GND and +5V. With everything in place follow the circuit diagram and wire up all the 595 connections. Take care when flipping between the back and the front of the PCB. I'd made a couple of connections when I started before I noticed that I'd shifted the pins and had to desolder and start over. The leads for the data, clock, and latch pins should be long and have Arduino header compatible ends.

With the LED circuit complete, decide if the pot and switch can be wired now. If they need to be fit into the enclosure from the outside then you'll probably have to wait until they can be secured in the enclosure to wire them in. If not, attach Arduino leads to the pot and wire the switch to the battery pack. You may need to attach different leads to the switch and power pack to make them Arduino compatible. I was able to add leads to the pot but had to wait to add the switch.

When you're done make sure to test again before moving on.

Step 6: Enclosure Build

Measure and cut the walls for your enclosure. Remember you'll need overlap on the edges and the inside dimensions of the assembled enclosure needs to be smaller than the size of the window you're using.

I used a table saw to create the groove that holds the window. Simply lower the blade until it's ~.125" above the table. Set the fence ~.25" from the blade and run each piece through. If you don't have a table saw with a little setup you should be able to cut the groove with a handheld circular saw or even a hand saw.

At this point you need to have a switch, pot and knob picked out so you can prep the enclosure for them. Taking into account where the walls will overlap when assembled, something that nearly bit me, drill holes appropriate for your components. If your walls are thicker than the threads on any panel mounted components then you will need to counterbore the back side of the hole to allow room for either the body or the nut, depending on which way the component mounts to the panel.

Before painting any type of particle board I like to cover the cut faces that will see paint with a wood filler. If you don't do this then those faces will absorb the paint better than the uncut faces and you will struggle to get a uniform. look. Just cover each surface with the filler, let it dry, then sand it smooth. I also used the filler to block the ends of the window groove that were exposed on the two side walls. When the edges are prepped, prime and paint.

Step 7: Window Painting

The idea here is to have the LEDs shine through individual segments in a thermometer shape painted on the window. I didn't want the bare LEDs visible so I started with a layer of frosting to diffuse the light and then covered everything but the segments with a dark, solid color.

Start by cleaning the glass thoroughly and then spray on a couple coats of the glass frosting paint and allow it to dry.
You should already have a template of the thermometer shape that you used to space the LEDs on your circuit board. Using this template cut out a matching template in cardboard. This will act as your mask for painting the outline. Place the mask in the middle of the window and use a couple of small clamps to hold it in place. Lay down a few coats of the dark paint, over the frosting. When the paint is dry carefully remove the mask.

Using masking tape block out the areas you want the light to shine through, leaving strips between each segment. These segments should align with the LEDs on your circuit board. When all the segments are masked apply a couple more coats of the dark paint. This will give you lines between your segments and a place to attach the dividers.

Step 8: Light Dividers

To keep the light from adjacent LEDs from spilling into the wrong segments we are going to need some sort of divider between the LEDs. I used some stiff, thin cardboard which I bent and cut into shape around the circuit board and hot glued into place, to the glass. I painted them but that probably isn't necessary if they are a solid white/grey/beige/black color. You will need to surround the entire thermometer shape and have dividers for each segment.

In addition I made a back plate out of the same cardboard. I put a crease in the middle, horizontally, so that you only have to remove half of the screws to access the battery pack.

Step 9: Assembly

Time to our components into a contraption.

First, put together three of the enclosures sides. The top, bottom, and edge with the switch and pot are probably your best bet. The walls are simply wood glued together. The easiest way to get everything lined up is to put glue on the two edges you're glueing and then clamp everything together, all four walls and the glass pane. When the glue dries you can remove the unglued edge and start loading components.

The Arduino is screwed to the wall with the switch, near the top. I used velcro to patches to attach the battery box to the back side of the glass pane. A little super glue holds the patches in place nicely. The final major component is the all important circuit board. In a bit of a jury rig I used some Gorilla Tape to secure the circuit in place. It looks a little shoddy but it isn't going anywhere and it allows for easy access if you need to take the circuit off for any reason.

With everything in place make the final connections in the circuit, probably: battery to switch and ground, switch to Arduino, the pot to 3.3V, GND, and A5, and the five circuit board leads (5V, GND, 8, 11, & 12) to the Arduino. With everything connected make sure to test the circuit before buttoning everything up.

If it's all in working order then glue the final wall in place and screw the back plate in place.

Step 10: Display

Put it somewhere the concerned parties can see it and make sure you label it properly. Just be warned, something you start as just a joke may take on more life than you ever imagined, management has a way of doing that.


I've completed the Mk.2 Quality of Life Meter which now features multiple users, wireless capabilities, and data logging. Check it out!

Comments

author
Davesp (author)2013-09-06

This is a great idea. If it was linked to a very simple "I Had a Good / Bad" day toggle app on peoples smart phones / computers it could act as a kind of aggregator for the office / house / region.

Imagine one in the town square and if people could send it say two 'votes / reports' a day the sign could display the Quality of Life for people in the locale. Two votes mean that people could cancel out a 'good' in the morning with a 'bad' in the evening and null their contribution for the day. The same aggregated information could be displayed on a community web site too.

I guess it would need to display the sample size for the day as well so it would have to say something like in the town square: "For the 9,0037 out of the 15,356 people in our local community of Nunsquat who are saying, on average their quality of life was 7 today" or whatever.

or in the foyer at work "For the 347 out of the 789 people at work today in Nunsquat Corporation who are saying, their average quality of life for today was a 3". A kind of mood ring for the whole workplace. 

Just thinking....

author
bwrussell (author)Davesp2015-10-15

I just released a Mk.2 version of the QoL Meter that basically has the functionality you describe here. Wouldn't take much to add wireless value setting.

author
bwrussell (author)Davesp2013-09-06

Thanks.
That makes me think of a sort of public "art" installation, for lack of a better term. Actually more like public participation art. A big display somewhere public like a park or mall and a simple directions for texting in your vote. You see this kind of thing sometimes in ads or just by local artists or people trying to get involved in a community. A way to sort of get people thinking about there community.
I kind of like it. I wouldn't be surprised if there was grant money to be had to make an installation like that.

author
thepete (author)2015-02-25

I have an idea for a Twitter hashtag meter, where a meter like the one you've created rises and lowers based on the frequency of a particular hashtag or group of hashtags. Does this sound like a doable project? I have zero experience with Arduino, but I'm interested in getting experience with it. Where should I start if my end goal is to have this kind of meter? Sorry for the obvious newbie post >_<

author
bwrussell (author)thepete2015-02-27

Sorry for the delayed response. You should absolutely be able to do this. I'd do a little research before committing to hardware for this project. One thing you are going to need is an internet connection. Since you want to have a display you
probably will want wireless capabilities so it doesn't have to be near
your router at all times. The simplest route is either an vanilla
Arduino with a WiFi shield/module or an Intel Edison but there is
definitely a cost involved. I'm actually 90% done with a Mk.2 version of
my Quality of Life Meter built using an Edison so when that comes out
you'll have some idea of what an Edison version would entail.

As far as getting started, this guide here obviously will get you a controllable LED meter. The Arduino website, www.Arduino.cc is the best resource for learning how to program for Arduino (look under the learning and resources pages).

The biggest challenge is going to be interfacing with twitter. There is a
user created twitter library for Arduino but it may just be for posting.
This may involve writing something for the twitter API to pull the
hashtag data and put it somewhere your Arduino can find it and easily
read it or finding somethig that does that already. This is where the
Arduino and Linux dual nature of the Edison might come in handy.

I'd be happy to help with particular issues you encounter, especially the
coding side, but really anything. Just shoot me a PM and I'll do my best
to help you get this done.

author
thepete (author)bwrussell2015-02-27

Awesome--thanks so much for the advice and the offer of help! I just might take you up on that! Though, I honestly hope I won't need to. I am thinking I'll stick with Arduino, just because I've seen projects very similar to the one I have in mind. Also, it'll give me some practical experience with a common platform. If this project goes well, I might consider doing an Edison-based project.

Thanks again!!

author
Wired_Mist (author)2014-12-10

XD Thats awesome !

Perhaps set a piazo element beneath your keyboard to scene how hard your typing >.>

Nice job; hope to see more :)

author
bwrussell (author)Wired_Mist2014-12-11

I've got a couple of new versions of this planned that I will hopefully be working on soon. Stay tuned!

author
Subdood (author)2014-01-05

OO
U

author
momo4445 (author)2013-11-27

cool

author
jukees (author)2013-09-08

I think that this is too complicated design, it could have been done with a single LM3916 led driver chip.
And if the blinking is necessary, then one NAND gate and blinking leds could have been used,

author
wobbler (author)2013-09-05

Will it go negative?

author
bwrussell (author)wobbler2013-09-05

Well, there isn't a set scale, just 11 segments with lights that go from red to green (with the bottom red and top green flashing. The 11 segments give you 0-100% in 10% jumps but since the scale isn't shown anywhere you can make the numbers whatever you want. Negative, positive, irrational, it doesn't matter. You could do a different shape as well or use different colours. The 2 595's will actually support 16 LEDs if you need more segments.

author
geckodfw (author)bwrussell2013-09-06

Wait, it goes to 11? Couldn't you just have made 10 louder?

author
bwrussell (author)geckodfw2013-09-06

Well played.

author
anothercindy (author)2013-09-05

This is so awesome (but seriously challenging). Can you make an app and let us buy it from you? I would love to have it as the background on my iphone so it could coordinate with my calendar and automatically demonstrate my overall work/life imbalance. If everyone at the office had the same app, we'd know who the slackers were at a glance!
Thanks!

author
bwrussell (author)anothercindy2013-09-05

Well it's not that challanging, at least the circuit. Especially if you just use a breadboard and don't solder anything. You could make it even simpler by using a single RGB LED which can display any colour. You can also add Bluetooth to the Arduino and control it with your phone. If you decide to give it a shot and need help feel free to ask.
Do you use Android or iPhone?

author
im3733 (author)2013-09-05

Now, to completely nerd this out and attach it to bio-electric sensors to measure mood, then program it to respond accordingly. Slightly different end result than this idea, but still similar.

author
bwrussell (author)im37332013-09-05

If you all ready use some sort of bio stats gathering device with your phone (like a heart rate monitor, etc) you could feed that data into the meter with Bluetooth. Maybe I'll make a wearable V2.0 that gets data from your phone and uses a formula to set the value, or you could make it.

Really it can track anything you want.

author
Antzy Carmasaic (author)2013-09-04

It looks a bit... er... phallic. Just a look at it sitting on my desk at office will +1 my mood :P

author

Heh, it's not so much in person, but if that's what you're looking for a little tweaking of the stencil can change that.

author
M3G (author)2013-09-03

This is a really cool idea!

author
bwrussell (author)M3G2013-09-03

Thanks!

author
Rodney7799 (author)2013-09-03

I want to make one but I was curious if it had an off switch because at my work I would just leave it switched off all day. I like it and I do wands make one for at home. When I come home from work I can look at it and see what kind of mood my wife is in. Cool inst.

author
bwrussell (author)Rodney77992013-09-03

The big red button on the side, also pictured in step 1, is an on/off switch. If you watch the video on the last step you can see me turn it on and of and it remembers the previous setting. The component you need is a SPST switch and it is shown in the circuit diagram, up near the batteries.

If you do make one be sure to post pictures.

author
M3G (author)2013-09-03

This is a really cool idea!

About This Instructable

35,440views

187favorites

License:

Bio: Why buy when you can DIY? Educated a Mechanical Engineer and trained as a classical cellist I consider myself a bit of a jack-of-all-trades, dabbling ... More »
More by bwrussell:Replacement PC Case Power SwitchLaser Engraved QR & NFC WiFi Access Card3-Ingrediant Taco Meat
Add instructable to: