Flora Arduino platform project catVector

Table of Contents:
Video
Components
Method
Applications
Roles

The catVector is a demonstration of interactive wearable electronics using Adafruit's “Flora” Arduino platform. It performs one function. When the cat is at rest, the RGB “pixels” are off. When the cat is in motion, the RGB pixels display the direction and intensity of their movement. Though mainly an art-piece to accentuate the range of motion of the feline it is attached to, it is also a demonstration of simple interactivity using an accelerometer as an input data device, and the pixels as a simple, visual output device.

Components

The cat finder uses as it's input the Flora 3-axis accelerometer/magnetometer based on the LSM303 integrated IC. The device measures the 3-dimensional vector of motion and sends this information over an I2C (pronounced “I-squared-C”) interface to the Flora Microcontroller.

The Flora controller module is the heart of the system, providing the processing power of the ATMega32 microcontroller and hosts the code to parse and translate the input from the LSM303 to a meaningful output for the LED modules via a bitstream sent to a digital output pin.

The Flora Smart Pixels, of which there are four, provide the visual output of the system, accepting bitstream information from the Flora controller. They are capable of displaying 24-bit colour at varying brightnesses either individually addressed or in unison (as in this case).

Method

The motion data received by the controller is in the form of two 3-dimensional vectors – X, Y and Z axis information. The controller code queries the accelerometer at two close intervals to determine if the cat is actually moving. A simple conditional statement comparing the two queries combined vectors one tenth of a second apart determines this, moderated by a threshold value to limit it's sensitivity to a reasonable value.

If the cat is indeed in motion, the x, y, and z values are translated into red, green and blue values using reducing functions to fit them into reasonable values of 0-255. The greater the intensity of motion in a particular direction determines the brightness of that particular colour. For example, if the cat moves faster in the X direction, the LEDs will appear brighter red. Naturally, it is more than likely that the cat will be moving in several axies at once and the relative values of red, green and blue will blend together to form a specific colour representing the total 3-dimensional motion of the feline.

Since positive and negative values for the motion vector are possible, for example: left and right, back and forth, up and down, only appropriate pixels, positioned at the four corners of the wearable, will be lit indicating definitive motion in that direction.

If the cat is at rest, the LEDs will indicate the direction to magnetic north (haven't figured out how to do this yet).

A simple fading effect is included to smooth transitions between states.

Applications

Apart from an artistic pet decoration, this device could be used for many purposes. For example, locating a black cat in a dark room, a handy companion that is also a compass, and to study and appreciate the graceful movements of your cat.

Roles

Lana Milley - idea, design
James Rowland - developer