Antoinette J. Citizen

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.
Advertisement

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, experiments, 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, experiments, 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.

Monochrome LCD

Posted in Arduino, experiments, LCD by antoinettejcitizen on 03/10/2011

This is my 20 x 4 monochrome LCD. I have connected it via a parellel interface as I need more features than the 3-wire interface can do (special characters, Blink function etc). But here is a tutorial on both methods->

Tutorial: http://tronixstuff.wordpress.com/2011/01/08/tutorial-arduino-and-monochrome-lcds/

You can use the parallel interface to connect multiple LCDs. All the pins(5) can be shared except you would use a separate enable wire for each additional LCD and separate contrast pot.  This is discussed on the arduino forum (with pictures!).

Other connection methods are Serial or  I2C (Arduino Library).

I also have a I2C LCD from DFRobot- which I used  for one of the Arduino bots. I love my I2C LCD, so simple and only uses 2 analog pins + these can be shared with other I2C devices.