Make? You bet. Speed? …Not so much.

We had the second SpeedMake beta at this Tuesday’s Public Night meeting. In the proud Crash Space “Fail1, fail2, …, failn-1, WIN!” tradition, there were some teething problems. The objective was to build the Cornfield Electronics’ Trippy RGB Waves kit, a device that cycles a LED through an RGB color space, and responds to sensed motion. Unfortunately, the game was called for time; Carlyn and Josh won on points, having gotten the RGB cycling functionality of their kit up and running.

While it seemed that people were still having fun figuring stuff out, the general consensus was that the objective for this competition was too hard to achieve; too much make, not enough speed. On the plus side, we now have a (very) firm upper bound on how difficult a casual SpeedMake competition should be, and the next beta will definitely be easier (and quicker to complete), while still retaining the game mechanics that people liked.

People Making the Trippy RGB Waves kit. It doesn't look like a killer, does it?

People working on the RGB Trippy Waves kit. It doesn’t look like a killer, does it?

The Trippy RGB Waves kit is actually a really neat design, which showcases some very good hardware that’s useful in all sorts of electronics projects. More below the fold.

The beating heart of the kit is an Atmel AVR ATtiny25 microcontroller. For those not familiar with the beast, a microcontroller is essentially the little brother of the CPU in the computer you’re reading this post on. It’s a lot slower and can do less stuff than a typical computer CPU, but has the advantage of being much, much cheaper.

From the perspective of an electronics hobbyist, the ATtiny25 is kind of like a Swiss Army Knife, only without that little plastic slide-out toothpick. The two are also similar in that for a little more money, you can always buy the next model up of either one, which will have a lot more functionality (much of which you’ll probably never actually use). The Atmel AVR line runs from the humble ATtiny4 up to the mighty XMEGA256 and the new AVR32 chips. I’ve yet to find a good, concise, datasheet-to-english explanation of what something like the ATtiny25 does, so I’ll take a stab at it here.

The Attiny25 is an 8-bit RISC processor, and runs at a speed of 10 MHz, maximum. It has 2K internal Flash memory, 128 bytes (that’s right, bytes) of EEPROM, and 128 bytes of SRAM. The chip has 8 pins, with 2 pins dedicated for power and ground, leaving 6 pins for digital IO. These 6 pins can be reprogrammed to perform all sorts of hardwired alternate functions. A first installment of a list and explanation for some of the most common stuff follows. The terse function names follow the Atmel datasheet conventions, here.

Pin 1 (PB5):

RESET: Triggering the reset line the right way will take the chip into or out of programming mode, where new code can be flashed to memory

ADC0: Analog to Digital Converter, Channel 0. with this functionality activated, pin 1 reads the analog voltage signal level of whatever is connected to the pin, and reports a 10-bit digital value.

Pin 2 (PB4):

XTAL2: internal op-amp circuit output for using ATtiny25 with an external crystal oscillator, for generating a more precise clock frequency.

CLKO: outputs the signal from the chip’s “divided system clock.”

ADC2: Analog to Digital Converter, Channel 2. Same functionality as ADC0.

Pin 3 (PB3):

XTAL1: internal op-amp circuit input for using chip with an external crystal oscillator.

CLKI: Input for driving the chip from an external clock

ADC3: You know the drill on this one by now.

That’s probably enough on AVR functionality for now; description of the last 4 pins and the gripping conclusion will follow in a future post.

Another cool device in the kit is a Vishay TSOP32138 infrared receiver. This Vishay part is sensitive to IR radiation that is being strobed on and off at 38 kHz. It outputs “LOW” if it sees 38 kHz IR, and “HIGH” if it doesn’t. The device has a sort of notch filter, which means that sensitivity to IR drops by about 3 dB (translation: a lot) if frequency increases or drops by 10%. This is good, because it means that all sorts of IR signals at different frequencies can be transmitted and received in a design using this kind of receiver, without interference between the signals.

One interesting feature of the Vishay IR receivers we got, is that power and ground are switched relative to the Vishay datasheet. We were able to figure this out using a super special secret Crash Space diagnostic technique1. While Vishay’s tech writing could use some work, it turns out the parts themselves can take a fairly impressive amount of abuse.

We initially did some twiddling with this system, which failed in an annoying but interesting way. In the Trippy kit, the ATtiny25 firmware code instructs the chip to strobe an IR led at ~38 kHz. When your hand passes over the kit, the light is bounced back to the Vishay receiver, and this is where the kit’s motion sensitive capability comes from. We tried to replace the kit’s LEDs with bigger, brighter ones from Sparkfun (because bigger = better, QED). But these LEDs needed a higher supply voltage, so we replaced the 3.0 V kit coin batteries with 3.7 V ones, also from Sparkfun. The new LEDs worked and cycled through the color space, but the motion sensing no longer worked. Turns out, the ATtiny25 system clock, a RC-oscillator, is voltage sensitive. So when we increased the supply voltage, the frequency the chip was strobing our IR LED at went up to ~40 kHz, and the Vishay receiver could no longer see it. A small change in one part of the system resulted in an unpredicted and large change in system performance. For those who are interested, coping with this sort of complexity/emergent behavior problem is one of the things that systems engineers (and their unsung brethren, the test engineers) do for a living.

1: Super Special Secret Crash Space Diagnostic Technique #532: “Um…should these IR receivers really be getting hot enough to fry eggs on?”

One thought on “Make? You bet. Speed? …Not so much.

  • April 19, 2010 at 11:38 am
    Permalink

    Wish I could have stayed long enough to join in. Looked pretty fun.

    Reply

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.