Antoinette J. Citizen

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!