October 2007

XBee to USB modules

Droids.it has a breakout board for XBee radios, and a USB-to-Xbee board available.

The USB board is nice, because in addition to having a built-in 5V-to-3.3V regulator and indicator LEDs, it’s got all the pins of the XBee broken out on the side of the board. Makes development of XBee projects easier.

The breakout board also has its own regulator on board, making it easy to interface with a 5V project. It’s also got the serial pins broken out to a single row, making it easy to mount on the side of a breadboard.

The prices on both are reasonable for the European market. As the US dollar continues to sink, they’re a bit pricier for US customers, but still reasonable, for now.

Thanks to Rob Faludi and Jeff LeBlanc for testing help, and to Luigi Carnevale for supplying sample boards.

Technorati Tags: , ,

XBee
circuits

Permalink

Startup Checks

When you’re making a microcontroller circuit that drives a high current load like a motor or an incandescent light, it’s not uncommon to make a mistake and create a circuit that draws too much electrical energy on startup and causes the microcontroller to reset itself constantly. To debug this, it helps to put a routine in your startup() function so you can see when the microcontroller has started up. For example, I often blink an LED three times in the startup. If the LED blinks three times then stops, I know the microcontroller has successfully run the startup and gone into its main loop. If it blinks constantly, I know the microcontroller is continually resetting, so there’s a problem.

Hans Steiner recently showed me his trick for checking for the startup routine on the Arduino: he writes to the microcontroller’s EEPROM, or permanent memory, and reads back the result. Every time the Arduino resets, it’ll increment the EEPROM value. Since this value is stored even when the Arduino is not powered, you’re going to get a new number each time it’s run.

Thanks to Hans for the code.

Technorati Tags: ,


Continue Reading »

arduino/wiring
circuits

Permalink

Peak finding in Processing

In a previous example, I showed how to detect a peak in a changing analog value on a microcontroller. This example shows how to do it in Processing, assuming the microcontroller is just sending you binary values from 0 to 255. It graphs the incoming bytes, and when a peak is detected, it draws an ellipse and prints a message in the message pane.

Thanks to Matt Young for helping me debug this.

Technorati Tags: , ,


Continue Reading »

Processing

Permalink

RFID Readers from SonMicro

Mike Kuniavsky and Tod Kurt of ThingM recommended these RFID readers from Son Micro. They’re some of the cheapest ones I;ve seen on the market, and relatively small.

Thanks to Anne Hong for sending the link.

Technorati Tags: , , ,

circuits

Permalink

Data graphing program that saves to a file

This Processing sketch takes data from the serial port, graphs it, and writes it to a text file with a time stamp if there’s a significant change in any of the incoming values. It expects five values between 0-255 in ASCII, separated by tabs, and ended by a carriage return and newline.

The text file it generates is tab-delimited, and can be read easily in a spreadsheet.

A Wiring/Arduino program to send data to this sketch follows at the end.

Continue Reading »

Processing

Permalink

USBTinyISP

Recently, I’d been trying to re-program some Atmega168’s for use in Arduino modules, and was having no luck using my AVRISP MkII programmer. All appeared to be working, but it kept failing. I even dug into the details of avrdude, and the programmer responded as if it was working but delivered no love.

Fortunately I had on hand a USBTinyISP from Adafruit. Even more fortunately, Limor Fried has written some nice instructions on the programmer and on installing and running avrdude to program with it. What’s nice is that she’s packaged the software well, so you can run it without too much hassle. The only thing I had to learn was how to point avrdude at her custom config file, by using the -C flag, like so:

./avrdude -C avrdude.conf -v -p m168 -e

(etc)

Even nicer, David Mellis is including support for this programmer in Arduino 0010, so that I can burn new bootloader firmware onto the chips using it without needing to touch the command line app.

Even nicer still: her programmer’s cheaper than the AVRISP mkII (of which I have blown up a few). I may blow this one up in time too, but I’ll be able to afford to replace it much easier.

Technorati Tags: ,

arduino/wiring
circuits

Permalink

Virtual Color Fader for Max/MSP

This Max/MSP patch reads in a serial string like this:

Rnnn
Gnnn
Bnnn

Where nnn is an ASCII-formatted decimal number from 0 to 255. It then converts the values into the RGB colod for the patch’s background.

An Arduino program to send the appropriate data follows.

To use the patch, copy the text and paste it into a new max patch window.

Thanks to David Mellis and Jamie Allen for the collaboration. These patches were written for a one-day Arduino workshop at NIME 07 hosted by the three of us. The Arduino program comes from the Arduino example files, by David Mellis.

Technorati Tags: , ,


Continue Reading »

Max/MSP
arduino/wiring

Permalink

Analog to Frequency for Max/MSP

This Max/MSP patch takes a serial string in and converts it to a numeric value, then plays a frequency using the value.

To use the patch, copy the text and paste it into a new max patch window.

Thanks to David Mellis and Jamie Allen for the collaboration. These patches were written for a one-day Arduino workshop at NIME 07 hosted by the three of us. The Arduino program comes from the Arduino example files, by David Mellis.

Technorati Tags: ,


Continue Reading »

Max/MSP
arduino/wiring

Permalink

Physical Pixel Controller

This Max/MSP patch turns on or off an LED attached to an Arduino. Max and the Arduino communicate serially.

To use the patch, copy the text and paste it into a new max patch window.

Thanks to David Mellis and Jamie Allen for the collaboration. These patches were written for a one-day Arduino workshop at NIME 07 hosted by the three of us. The Arduino program comes from the Arduino example files, by David Mellis.

Technorati Tags: , ,


Continue Reading »

Max/MSP
arduino/wiring

Permalink

LED Fader in Max/MSP

This Max/MSP patch sends data out the serial port. The corresponding Arduino program reads the data from Max serially and uses it to set the brightness of an LED on digital pin 9.

To use the patch, copy the text and paste it into a new max patch window.

Thanks to David Mellis and Jamie Allen for the collaboration. These patches were written for a one-day Arduino workshop at NIME 07 hosted by the three of us. The Arduino program comes from the Arduino example files, by David Mellis.

Technorati Tags: , ,


Continue Reading »

Max/MSP
arduino/wiring

Permalink