Antoinette J. Citizen

First Draft: Sims Needs Meter

Posted in Sims Needs Meter by antoinettejcitizen on 10/19/2011

My Sims Needs Meter is starting to look like a Sims needs meter:

Sims needs meter bar

This is the same as my previous breadboard prototype, just experimenting with methods of display in an attempt to get it to looking like it’s digital counterpart.

I took part in a sprint hosted by Melbourne Media Labs recently. We did a bit of experimenting with making health bars… I fell in love with LEDs and hot glue sticks. The photographs/video create not so pleasant looking hotspots, but the effect is quite wondrous in real life.

20111019-180144.jpg

This is a variation of the sims needs meter we put together:

20111019-180123.jpg

It uses PWM to fade in and out- creating the effect of changing between colours. The standard arduino only has 5 PWM pins, so i used the softPWM library to be able to fade all the 12 LEDs (which are just wired directly to an arduino).

led test sequence showing the effect it creates:

I tried a few different materials to diffuse LEDs, but nothing functioned as well as the glue. The current sims meter uses rectangle LEDs diffused through glue sticks, which gives a nice health bar segmentation:

20111019-171745.jpg

They don’t have a very wide viewing angle, but you can still see a light glow from the sides:

20111019-171936.jpg

I had problems with the 2xleds from either side being completely washed out in any sunlight. But it appears that the additional LEDs underneath instead of at the side provides enough light to be viewable in some sunlight. Direct sunlight still washes them out, but I think I can live with that.

Next challenge is to make a PCB. I tried fitting the multiplex LEDs, shifts on a Protoboard small enough to be wearable, but it is proving problematic- so I’m hoping a PCB will be the solution to my problems… I haven’t made a PCB before, so it may take a little while to figure out the process.

Then I am going to do some vacuum forming and rapid prototyping to test out some potential cases/enclosures. Oh yeah, exciting times.

The code for button input and measuring different ‘needs’ is functional. Just needs a bit of cleaning up. Hope to post it very soon.

See previous posts on my Sims Needs Meter:

Sims: Part One

Sims Needs Meter: Breadboard Prototype

Advertisement

Sims Needs Meter: Breadboard Prototype

Posted in Arduino, experiments, Sims Needs Meter by antoinettejcitizen on 05/20/2011

This is my current prototype for my electronic Sims Needs Meter. I will be using this to develop the programming, work out any problems, schematics and designing the PCB. Then I hope soon to learn how to etch a PCB for it and use SMDs so it is small enough to wear on my arm. I will let you know how i go.

Currently I am looking at the possibly of using an Arduino Fio- as it is as small as a pro mini but has a built in battery charger.

Above I am using 2 shift registers, only shifting 5 outputs each at the moment, but did it like this so I can add additional columns later. The two shifts are daisy chained- and only use a total of 3 arduino pins. (See older posts- Multiplexing,  other shift/multiplexing examples)

This is a very helpful page on Arduino about using shift registers.

Buttons are not connected yet- but will be using them to input current states. Like now im being social etc. I think I will do a post soon just on these categories and how each of them will be monitored/calculated… But i’m still tweaking.

This is a video of the leds changing “states”. From completely charge to in crisis mode. Each row is the same- still have a long way to go.

Multiplexing!

Posted in Arduino, experiments, Sims Needs Meter by antoinettejcitizen on 05/13/2011

This is 5 x 6 matrix of red-green Leds (they are actually rbg, but i don’t need the blue). So it is the equivalent of 60 Leds. These are running off 16 Arduino pins and way too many hookup wires. The vertical rows share common cathodes and the horizontal share anodes. A 2ms delay is used to switch between the vertical rows. Yellow is created by having red and green on at the same time.

16 pins, 60 leds is pretty good but i would like to free up some more pins- so I am going to be using a shift register as well. Stay tuned for my next post where i will attempt to multiplex with a shift register as well.

This will be my basic prototype for the programming of my Sims Needs Meter.

RGB and Current Limiting Resistors

Posted in Arduino, experiments, Sims Needs Meter by antoinettejcitizen on 05/13/2011

My rgb leds arrived… I am going to begin multiplexing tonight and using the shift registers tomorrow.

But first I had to work out what current limiting resistor I would need. Using the datasheet for my LEDs I needed to know the led Current rating and the voltage drop (use a datasheet for your own Leds, as they will have different values to mine)

As I am using a standard Arduino the supply voltage from the D I/O pins is 5volts.  Now I can work out what resistor I need for each.  Here is my post-it note diagram:

Resistance =  Supply Voltage – voltage drop over the  Led current rating.

If you don’t feel like doing the calculation- here is a current limiting resistor calculator.

The Sims Needs Meter: Part 1

Posted in Arduino, experiments, Sims Needs Meter by antoinettejcitizen on 05/05/2011

This is my very poor attempt at drawing my next project. Basically I am making an electronic Sims Needs meter that I will strap to my arm. If you haven’t played sims, the needs meter is basically a health bar for different ‘needs’ the sim has. It looks like this:

For each ‘need’ bar there are 9 different states, with 4 different colours:

I am still waiting for my leds to arrive and shift registers to arrive in the post. There will be 8 LEDs per bar with 6 individual health bars – these leds will be red/green ones, as i don’t need blue to make any of the above colours. I am currently researching multiplexing and shift registers, so I can use less pins on the Arduino while still given me control of all the leds individually.

A few good links on this:

Direct Wiring an Arduino to a Led Matrix (Multiplexing with no shift Register)

The 74HC595 8 bit shift register (Shift register, no multiplexing)

64 Pixel Display (Shift Registers and Multiplexing)

So my first test, to get my head around multiplexing, I created the equivalent of one health bar with normal LEDs:

The three different colours are on different rows connected by their cathode. Then the 5 column(Red, yellow, green)  connect the anodes together- giving you 8 wires to connect to the arduino digital pins.

Working with one a row at a time- you put the digital pin for that row (Cathode connected) to LOW and put the column you want on to HIGH. To get the different colours on at the same time you have to switch between the rows at very small intervals. I was doing this at 5ms- which did not produce any flicker.

I need to keep 6 pins free on the arduino, so I can use them for input of information- I will prob just use the 6 analog pins. Leaving the 13 other pins free for the leds. Can I fit 90 leds on 13 pins? More updates once my shift registers arrive!