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

Prototype: 28 hour watch

Posted in Arduino by antoinettejcitizen on 09/14/2011

I am hoping to follow a 25 hour day for a month, and then a 28 hour day. So I am making a watch that allows you to adjust the length of day. This prototype allows you to set the length of day between 1 hour and 48 hours as well as normal functions of a watch like setting the minutes and hours.

I am using a spark fun serial 7 segment display which allows communication through soft serial or SPI. But you could use a normal 7 seg with shift registers instead.

Button 1 acts as a “Select” button, then 2nd is to set hours, 3rd to set minutes and fourth to choose day length (between 1-48hours) Short video of the button functioning:

Seven seg display, 4 buttons, 10k resistors. That is it. This is my code, it works, but I am a novice so feel free to clean it up and send it back to me! Post-it note schematic with SPI:

(MISO, RESET, RX are not used)

Next steps:

  • hook it up to a pro mini
  • small lithium battery
  • add a tilt sensor so the display is not on all the time.
  • Make/modify a small case  and attach a strap.

A miner’s canary(‘s) cage

Posted in Arduino, Bird Cage, Motors, Sensors by antoinettejcitizen on 07/14/2011

The gas sensors and stepper door control are now together, sensing high levels of Carbon Monoxide or Methane will open the bird cage door (See previous post). I put in a small push button to act as a test switch- like on smoke detectors. I don’t think it is quite ready for a bird just yet. Need to take it off the breadboard and put it onto something more permanent and clean up the wires. Thought it would also be good to put clear acrylic behind the electronic components- so the canary can’t attack the exposed parts.

Canary in a Coal Mine: In two parts

Posted in Arduino, Bird Cage, Motors, Sensors by antoinettejcitizen on 07/11/2011

I am taking a miniature break from my Sims Needs Meter, to make a carbon monoxide and methane gas sensor unit for a canary cage.

Today it is in two parts, hoping to put them together tomorrow. First part is the arduino powered cage door:

Above is a unipolar stepper being driven by a darlington array. I am just using the stepper example in the arduino ide. There are a few different versions- one step, full rotation etc. Arduino reference for wiring a stepper. The stepper has a small robot wheel attached to it’s shaft- which i have glue some fishing line to. The groove in the wheel is designed to fit a small rubber tire into it- but here it is perfect for the fishing wire to be wound up onto it. And that is about it. Super simple. Now to find a way to attached it to the bird cage that does not involve gaffa tape.

And the second part is the:  Carbon Monoxide (Top) and Methane (Bottom) sensors:

These sensors are soldered to the sparkfun gas sensor breakout boards, and using a simple analog read to extract data. There are very limited tutorials available for gas sensors, unless you are making a breathalyser or fart-meter. So after I put these two parts together, I will attempt to create a comprehensive tutorial. Still searching for some more info on calibration and interpreting the readings.

Arduino Flip Clock

Posted in Arduino, Motors by antoinettejcitizen on 06/10/2011

This is an old work I had started a while ago, hope to finish it soon. It is an arduino connected to a old flip clock. Clock is connected to a stepper motor (stepper tutorial)- delay time is determined by the pot. The steppers steps and the clock gears don’t match up, so next thing i need to do is make some gears to go in between. At the moment it skips each 8-9th number.

The final work I wanted to do was have the clock switch off when there is no one in the room. Then quickly speed back up to the correct time when someone enters the room.

ECG Badge

Posted in Arduino by antoinettejcitizen on 06/09/2011

I would like to create a wearable ECG. This would monitor your heart rate and display it on a small badge. Like this (you will need to click to see my dodgy gif animation)

I don’t know if this is possible, but my research thus far hasn’t rule it impossible yet.

Update: I found this tutorial using a Xprotolab oscilloscope to display heart rate. Once I locate the very tiny oscilloscope, I will give it a try!

Sims Needs Meter: Breadboard Prototype

Posted in Arduino, 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, 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, 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, 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!

Black Box

Posted in Arduino, Black Box, LCD, Sensors by antoinettejcitizen on 04/09/2011

This is my Black Box. It is an art object that tracks and stores information about its environment. It does noting with the collected data except remember it, continually accumulating information about its own existence. The fours lines are time in existence, the distance in has travelled, current position and relative percentage to current position and an overall interactions count.

I have written a few post about the making of this box. Part One //  Part Two . And there is likely to be more. I am going to be working on some upgrades for this including:

  • charging circuit
  • low power state for shipping
  • Longitude/latitude configuration into regions
  • memory recall- randomly recalls previous states. ie “day 34 in Brisbane, 34890 interactions”
  • randomly removing or “forgetting” data
After its next set of updates I would like to start shipping it around the world. If you would like to offer the Blackbox a place to stay for a couple of days, please contact me.

Black Box: On the tram

Posted in Arduino, Black Box, LCD, Sensors by antoinettejcitizen on 03/23/2011

I have hook up my GPS module to my Black box prototype.  For this I wanted to calculate the distance travelled. So I am using a gps distance calculation example, which calculates the distance between two longitude/latitude points. Code only had to be modified slightly to update the waypoint to be measured against and accumulate the total distance travelled. I took it for a tram ride. It works… As it calculates the distance between waypoints, it is more accurate the more often it updates. This code below is programmed to update every 1/4 of a sec, but mine does not get close to that. 1-5minutes seems standard. I will have to look into how to get steadier updates.

GPS distance pde

So currently it is using the four lines on the LCD to display- Time in existence, kilometres travelled, percent of the time it has been in a certain position and an interactions count. I have been working on storing these variables and data logging all collected info to SD. It took a while to get it’s memory working. Writing to SD was simple. But reading this info back and turning into meaningful data was a bit more complex (well for me it was). You need read the data back into a string and then convert string to a char array turn the array into a float/long etc… or maybe you could just read the info back into a char array. hmmm.

My new favourite friends are:

atol  and atof

example:
long stringToLong(String s)
{
char arr[12];
s.toCharArray(arr, sizeof(arr));
return atol(arr);
}

The box is looking a bit worse for wear, but I wired up a shield for everything yesterday. So it is good to go. Will be making the actual box next week.

Blackbox: Part I

Posted in Arduino, Black Box, LCD, Sensors by antoinettejcitizen on 03/14/2011

This is my first test of my “black box” work. I have been fond of the idea for a while of an art object that tracks and stores information about its environment. It does noting with the collected data except remember it, accumulating information about its own existence. So to do this I will be interfacing a few different sensors (GPS, accelerometer,) and putting these in a small black box with a LCD screen to display its collected data. The cardboard box is just temporary until i make the real one.

My next few posts will be the progressions of this work. I have started by testing the accelerometer. For this i have only needed to use 2-axis. At the moment it is set to display which way it is positioned. (right way up, upside down, left side up etc etc) the percentage shown is relative to how often it is in the current position compared to the other positions. So in the picture above it has been upside down for 50% of the time.

Arduino Bots

Posted in Arduino, LCD, Motors by antoinettejcitizen on 03/11/2011

These are my arduino bots. They are made of pan and tilt servos and LCD screens. They “talk” to each other via their screens. Images or video of these do not show up the text on the LCD screens, so i will have to make a version with subtitles (On my list of things to do). They are basically little robots who are trying to collaborate. They talk about potential ideas, try a few things out, have some discussions and a couple of fights.

LCD

The Monochrome LCDs are 16×2, one is I2C interface the other is a 3 wire interface- this is what i had, so is what i used. more on LCD…

Servo

Their bodies are each made of two servos for the pan and tilt movement. External power is needed if you are connecting multiple servos to your arduino… just make sure you connect the grounds together. On servos: http://www.arduino.cc/playground/ComponentLib/Servo

etc

Using large amounts of text for running a dialogue heavy project like this will use up all your ram and cause a stack overflow. I learnt this a little bit too late in my project and just switched to a mega (the 8KB was enough). but next time I will save text strings to flash(progmem). The uno has 2KB of sram compared to 32KB of progmem.

I would also like to have these bots running from independent arduino and communicating with each other. With my limited experience was slightly too ambitious for this project- but once i get them back I will give it a try and post my results.

SD Microprinter

Posted in Arduino, Microprinter by antoinettejcitizen on 03/10/2011

This is my Microprinter that prints txt files from SD cards. Eventually I would like to hook it up to a ethernet shield and make it do some automated web crawling (programming research required before i get there).

Information on this project:

Microprinters:

Links to Microprinter projects: http://microprinter.pbworks.com/w/page/20867146/FrontPage

Arduino Sketch: https://github.com/rooreynolds/microprinter/

Thermal Printers

You will need a POS thermal printer. Citizen and Epson are commonly used.

Citizen CBM 1000 II: Datasheet (This is for my model)

Citizen CBM 1000: Microprinter wiki

Connecting serial to Arduino:

Rs232 (Sipex sp3222 3232) <>  arduino: Tutorial // Datasheet

Another Rs232  <> Arduino: http://www.arduino.cc/en/Tutorial/ArduinoSoftwareRS232

Info on serial Connections: http://en.wikibooks.org/wiki/Serial_Programming/RS-232_Connections

MicroSD shield

http://www.sparkfun.com/tutorials/172

SDFat Library: SdFat.zip

Another tutorial: http://tronixstuff.wordpress.com/2010/06/01/part-review-microsd-card-arduino-shield/

Follow

Get every new post delivered to your Inbox.