Archive for the 'arduino' Category

Minimal Arduino with ATmega8

Posted by todbot on May 26th, 2009

Or: A good use for old Arduino boards

Like me, you may have a few old Arduino boards or ATmega8 chips (in the boards) laying around from when you were first playing with Arduino. Those chips can still be really useful as the heart of a tiny “Minimal Arduino” setup.

A normal Arduino board contains support components that make it easy to use. If you want a smaller footprint, you can get one of the many Arduino work-alike boards. But if you want a really small footprint, and reuse your old parts, you can make an Arduino board using just five components:
- ATmega8 chip
- single 10k resistor
- single 0.1uF capacitor
- tiny breadboard
- some hookup wire


(On the left, an IR remote controlled BlinkM. On the right an IR remote controlled RGB LED)
Read the rest of this entry »

Arduino chip sticker label

Posted by todbot on May 23rd, 2009

I’ve been working with a super minimal Arduino setup recently. After seeing Alex’s awesome Arduino/ATmega breadboard header, where he notes there’s no room on the PCB for pin labeling, I wondered if it would be possible to make a small sticker that goes on the ATmega chip, labeling the pin names.

Here’s my first attempt:
arduino-atmega-sticker

And in use:
arduino-atmega-sticker-use

This was created by printing on a full-page sticker then laser cutting it to shape. I could have also just cut out the sticker with scissors, or used regular printer paper and double-sided tape.

Some files if you want to try this out yourself:
- arduino-atmega-sticker.eps — EPS of just the sticker itself.
- arduino-atmega-sticker.svg — SVG version
- arduino-atmega-sticker.pdf — PDF version
- arduino-atmega-sticker-lasercut.cdr — Coreldraw file containing instructions & registration marks for printing then laser cutting your own sticker.

Tiny Servos as Continuous Rotation Gearmotors

Posted by todbot on April 11th, 2009

I’ve been exploring various types of gearmotors. DC motors by themselves spin too fast and have low torque. Gearmotors are motors with a gearbox that slows down the high speed of the motor and produces higher torque. Most gearmotors are pretty expensive though. I want a really cheap, almost throw-away, source of gearmotors. It turns out cheap servos can be made into continuous rotation gearmotors.

Modding servos for continuous rotation is not a new hack. You can find many examples of it. You can even buy a nice continuous servo made by Parallax. But I wanted a micro servo version. I’ve been getting cheap servo motors from Hobby City, and they have several super-tiny servos for less than $4. The ones I use here are the Hextronic HXT500 available for $3.49 each.

Here’s how to modify one of those servos to make it into a tiny little gearmotor.
Read the rest of this entry »

Wiichuck Adapter on TV!

Posted by todbot on February 28th, 2009

Woohoo, my little Wiichuck adpter for experimenting with the Wii nuchuck made it on TV, thanks to my buddy John Park and Make: TV.

See the Makezine blog post with the segment, or watch it here:


Maker Workshop - Personal Flight Recorder on Make: television from make magazine on Vimeo.

BlinkM & Arduino 3D models

Posted by todbot on June 23rd, 2008

Here’s a really quick 3D model of BlinkM, if anyone needs it. It’s accurate to ~0.1mm.

- blinkm.skp — BlinkM SketchUp model
- rgb_led_piranha.skp — Piranha RGB LED SketchUp model

And here it is plugged into the awesomely done Arduino Diecimila model by Jon-Paul from the Google 3D Warehouse.

SketchUp is pretty great, but I found a problem with it if you’re trying to make accurate to-scale electronic parts: it won’t create surfaces with an area of <1mm. Took me a while to figure that out. The solution is to make a 10x or 100x size version and then do a scale by 0.1 or 0.01 when you’re done.

How To Do Big Strings in Arduino

Posted by todbot on June 19th, 2008

Arduino makes it pretty easy to store & use character strings, but those strings compete with your variables, so you can’t do as much. Here’s how to put big strings into read-only program memory and use them.

Lots of sketches can have big strings in them. Maybe you’ve built a little command-line interface or you’re storing small web pages (for net-connected Arduinos). Normally you do something like this:

char hellostr[] =  "<html><head><title>hello world</title></head>"
                   "<body><p align=center><h1>hello world</h1></p>
                   "</body></html>";

// and then sometime later

Serial.println( hellostr );

The problem with this is that “hellostr” is stored in RAM along with your variables. The ATmega chip in Arduino only has 1kB of RAM. If your code is getting complex, and you’re using big strings, and lots of libraries, you may start having mysterious problems. Arduino can’t warn you if your sketch starts using too much RAM.

Instead, you can use PROGMEM, or PROGram MEMory, to store your strings. That is, the flash ROM memory that your code lives in. Using PROGMEM strings can be tricky, but here’s a little function called “printProgStr()” to make it almost as easy.

const char hellostr[] PROGMEM = "...";     // notice added 'const' and 'PROGMEM'

// given a PROGMEM string, use Serial.print() to send it out
void printProgStr(const prog_char str[])
{
  char c;
  if(!str) return;
  while((c = pgm_read_byte(str++)))
    Serial.print(c,BYTE);
}

// and then at some point

printProgStr( hellostr );

If you have another use for the string that isn’t “Serial.print()”, just create your own function and put whatever per-character handling function in there instead.

Get on the BlinkM Bus with a BlinkM Cylon

Posted by todbot on June 17th, 2008

BlinkMs are a lot of fun by themselves, but they’re also little network devices, each having its own address on an I2C network. Here’s where I think BlinkM can really shine since it makes controlling multiple RGB LEDs pretty easy. For Maker Faire, I wanted to show off this facet by having a single Arduino control a dozen or so BlinkMs on a single I2C bus. The result is shown in the little video below.

Read on for how this was put together.

Read the rest of this entry »

ThingM & BlinkM at Maker Faire!

Posted by todbot on May 2nd, 2008

ThingM (Mike and me and some friends) will be at Maker Faire Bay Area 2008 this weekend. Come by and visit us!

Our bench will be about “Experiments with Smart LEDs”. Basically we’re showing off BlinkM, the projects that led up to BlinkM, like my experiments with Smart LEDs, some future products we’re working on, and some fun projects using these gizmos.

Here’s some photos of some of the projects as they were being built:



And lots of the projects will be using various types of Arduino, if you’re into that sort of thing.