Microcontrolled

Tonight Dann and I got some serious work done on a project we’ve undertaken to make a set of LED poi that are cooler than any made before. Or at least, cooler than most made before.

Poi is a Maori word for a type of food, but we aren’t making food. The way poi is made is by taking a tuber, placing it in a sock-like bag, and then swinging it around in circles, banging it against a rock to soften it. This process of swinging and object around that is on the end of a flexible chain or rope, is now an art form/dance, and the apparatus used is still called ‘poi’. If you’ve been following along, you’ll notice that I use poi for fire spinning, lengths of chain with a wick on the end.

Anyway, these poi are to be LED powered, so that they can be used in places where fire is less kosher, like the living room, or small rooms, or a dry forest floor.

The basic premise for these poi is that they will have red, green and blue LEDs, and will be capable of mixing them in different brightnesses so as to make the full spectrum of colors.

The poi will also be equipped with an accelerometer so that it can detect how fast it is spinning, and change color accordingly. The current implentation uses an Analog Devices ADXL150 accelerometer which is micromachined into a 14 pin SOIC chip. It measures accelerations of +/- 50 gees along one axis. This is very convenient, because as you’ll recall from your high school physics class, a spinning object is always experiencing an acceleration perpendicular to the direction of rotation. My back of the envelope calculations suggested that poi at full tilt whirl experience about 35 gees.

Dann has some experience with AVR microcontrollers, which are to be the brain of this project. A microcontroller is basically a computer on a single chip, that can be programmed to perform whatever actions your little brain can dream up. In this case, the accelerometer outputs a voltage proportional to the acceleration it is experiencing. This voltage is sampled by the ADC (Analog to Digital Converter), and read into memory. Then, based on this value, the red, green and blue LEDs are flashed at different rates to mimic a color. If you take an LED light, and flash it on and off at a frequency too fast for your eyes to see, but vary the ratio of time it is on to the time it is off, you can change the apparent brightness. That process is called PWM (Pulse Width Modulation). In our case, a timer counts out 256 steps, and the LEDs all turn themselves on at the beginning and then turn themselves off again at their preset time, the longer they stay on, the brighter they appear.

For right now, we have basic functionality on a test board. The accelerometer works beautifully, and the chip programming is coming along at a decent pace. After several hours of work, Dann and I had a working prototype, that when spun, changed the PWM for the three LEDs, producing a shift in color from blue to red as the poi sped up. Not bad!

Further design issues involve speeding up the PWM, optimizing the code, and tweaking the values to produce the smoothest shift in color from slow to fast. Further design ideas involve changing things other than color in relation to speed, and even doing image display.

Imagine if there were a row of LEDs all the way up the chain. As the poi spin, the row of LEDs shows a different set of pixels in an image, so as the poi makes a full circle, it draws a picture in the air. Of course, the pixels would be in a polar arrangement, meaning conversion from regular images would be odd. Then there is the issue of synchronizing frame rate with spinning speed, but we think we know how that could be done. At the bottom of a poi’s circle, it is experiencing the acceleration of the spin, plus 1g due to gravity. At the top of the circle, the poi is experiencing the acceleration of the spin, minus 1g due to gravity. This results in a 2g difference between the top and bottom of the circle. This would oscillate in a neat sinusoidal pattern, and comparing high and low values could yield a frequency value, from which a frame rate could be derived. Complex, but with very cool possibilities.

3 Responses to “Microcontrolled”

  1. on 23 May 2004 at 10:02 pm Andrew

    Cool! Now, for the plan I had in mind a while ago, and wasn’t going to get to, but you’re so close now, why not:

    instead of just having them make light, how about have them make sound too?

  2. on 16 Jul 2004 at 3:22 pm Andrew

    Well, it is remember the info now – sorry about that – I think I just forgot to click “yes” before or something? Or does the cookie expire after only a short order?

  3. on 31 Aug 2004 at 8:12 am Jon

    Sounds like the same thing I’m working on… Only I’m using a PIC rather than an AVR. If you don’t mind me asking, what base frequency do you use for the PWM?

Feed on comments to this Post

Leave a Reply

Anti-Spam Protection by WP-SpamFree