Tag Archives: AVR

Tiny portable AVR projects: Business card breakout boards

XX8_complete

For all of our different AVR microcontroller based projects, we seem to find ourselves continually wiring up minimalist target boards; little circuit boards that fit both the AVR and a 6-pin header for connecting to your in-system programmer. And, when you find yourself hand-wiring the same circuit over and over again on a protoboard, that’s really just life’s way of telling you “just lay out a damn printed circuit board already.”

Coincidentally, we needed a new business card.
Continue reading Tiny portable AVR projects: Business card breakout boards

Reminder: Microcontroller classes this week at TechShop

   ATtiny2313

Tomorrow (Monday 3/3/08) at TechShop in Menlo Park, CA, I’m giving another AVR intro class. These classes have been big, lively, engaging and interesting, with a lot of good questions– two sessions are scheduled this month:

Monday, 3/3/08, 6:30-8:30 PM, and

Saturday, 3/22/08, 1:00-3:00 PM

Seminar: Introduction to AVR Microcontrollers

AVR microcontrollers are powerful and versatile single-chip computers that cost only a few dollars each. You may have noticed that a number of our interesting projects are based around these, using them to make smart little toys and machines.

This class is aptly billed by TechShop as “How To Use AVR Microcontrollers in Your Projects.” Indeed. We’ll be bringing along a number of our cool AVR-based Evil Mad Scientist Laboratories projects from to show off some of the things that you can do with these little marvels, and how you might go about doing it.

Formal class description: “AVR microcontrollers are powerful, versatile and inexpensive single-chip computers that are remarkably easy to program in C, using entirely free and open-source tools that run on Macs, Windows, and Unix-like operating systems. In this practical introduction to AVR microcontrollers, we’ll take it from the beginning so that you can get started using them for your own cool projects. Some topics to be covered include: different types of AVRs and how to pick one for your application, getting a programmer, installing software tools, how to get started actually programming them, and how to download and run your code on the microcontroller. Class format is a one hour lecture followed by show-and-tell demonstrations and ample time for questions.”

Sign up here.
   

Seats are still available in one other microcontroller project class:

Soldering Project: Build a Micro Readerboard

A fun little soldering class, where you can customize the phrases in and build your very own LED Micro-Readerboard. It’s a cute little toy that spells out a preprogrammed messages (e.g., your name– for an LED nametag!), one letter at a time, on its display. In the class, you get to choose what messages to put on your readerboard, solder it together and take it home. It’s a neat, self-contained project that’s a great example of what you can do with a little AVR microcontroller; a perfect “my first microcontroller” project for anyone who hasn’t played with one yet. This is an intermediate soldering class; some prior soldering experience is needed. Other than that, no prior knowledge is assumed, so this class is great for kids too.

Next Classes:

  • Saturday, 3/8/08, 1:00 PM
  • Saturday, 3/22/08, 4:00 PM

Sign up here!

Learn about microcontrollers at TechShop in 2008

Starting next week and over the next few months, I’ll be teaching several different self-contained microcontroller-oriented classes at TechShop, at different levels of skill and with different emphases:

 

 

  • Soldering Project: Build a Micro Readerboard
  • Soldering Project: Build an AVR Programmer
  • Seminar: Introduction to AVR Microcontrollers

The classes are held at TechShop, a San Francisco Bay Area “open-access public workshop,” located just off of 101 in Menlo Park, where you can go use a wide range of tools to make things, and take all kinds of classes.
   

Soldering Project: Build a Micro Readerboard

This is a fun little soldering class, suitable for anyone with a bit of soldering experience (even youngsters), where you can customize the phrases in and build your very own LED Micro-Readerboard. It’s a cute little thing that spells out a preprogrammed messages (e.g., your name), one letter at a time, on a single-character alphanumeric display. In the class, you get to choose what messages to put on your readerboard, solder it together and take it home. It’s a neat, self-contained project that’s a great example of what you can do with a little AVR microcontroller. This is an intermediate soldering class; a little bit of prior soldering experience is assumed. The class typically runs about 90 minutes, but soldering experts will finish more quickly and we’ve reserved space for two hours just in case. Class size is limited to 5 students.

This class is scheduled to be given

  • Saturday, 2/9/08 1:00 PM
  • Saturday, 2/23/08 4:00 PM
  • Saturday, 3/8/08, 1:00 PM
  • Saturday, 3/22/08, 4:00 PM

Sign up here.

 

And speaking of AVR Microcontrollers….
Seminar: Introduction to AVR Microcontrollers

ATtiny2313AVR microcontrollers are powerful and versatile single-chip computers that cost only a few dollars each. You may have noticed that a number of our interesting projects are based around these, using them to make smart little toys and machines.

This class is aptly billed by TechShop as “How To Use AVR Microcontrollers in Your Projects.” Indeed. We’ll be bringing along a number of our cool AVR-based Evil Mad Scientist Laboratories projects from to show off some of the things that you can do with these little marvels, and how you might go about doing it.

Formal class description: “AVR microcontrollers are powerful, versatile and inexpensive single-chip computers that are remarkably easy to program in C, using entirely free and open-source tools that run on Macs, Windows, and Unix-like operating systems. In this practical introduction to AVR microcontrollers, we’ll take it from the beginning so that you can get started using them for your own cool projects. Some topics to be covered include: different types of AVRs and how to pick one for your application, getting a programmer, installing software tools, how to get started actually programming them, and how to download and run your code on the microcontroller. Class format is a one hour lecture followed by show-and-tell demonstrations and ample time for questions.”

This class is scheduled to be given

  • Tuesday, 2/5/08 6:30-8:30 PM
  • Saturday, 2/23/08 1:00-3:00 PM
  • Monday, 3/3/08, 6:30-8:30 PM
  • Saturday, 3/22/08, 1:00-3:00 PM

And speaking of programming….

 

Soldering Project: Build an AVR Programmer

USBtinyISP, assembledIn this class you will solder together, test out and get to take home a USB programmer for AVR microcontrollers. With this hardware tool and free cross-platform software, you can use your computer to write code for and program these little one-chip wonders.

This is an Intermediate Soldering Project; you must have prior soldering experience. You are encouraged, but not required, to bring a laptop along. (If you do bring your computer, you should have a chance to install the necessary software and test it out with your new programmer.)

Class size is limited to 5 students.

This class is scheduled to be given

  • Saturday, 2/9/08 4:00-6:00 PM [Full!]
  • Sunday, 2/24/08 2:00-4:00 PM — Just added!
  • Saturday, 3/8/08, 4:00-6:00 PM [Full!]

Sign up for these and other TechShop classes here.

LED Mini Menorahs:: Open source kits

Holiday motivation

All cynicism aside, one of the cool things about the holiday season is that it often provides a good excuse to play with lights.

Hanukkah in particular has been a festival of lights for more than a dozen centuries longer than there have been lights on Christmas trees. History notwithstanding, Hanukkah still lags behind Christmas in the transition from traditional light sources like candles towards microcontroller driven arrays of LEDs. While that may be simply due to the relative flammability of dry pine trees versus that of metal menorahs, the irony is that Hanukkah– unlike Christmas– actually requires observers to light up specific lights in a specific order, which is exactly the sort of thing that you want a microcontroller for.

Can’t find an open-source LED menorah at your local big box store? Not to worry!
Make one yourself from our instructions, which include source code for the AVR microcontroller (we use an ATtiny2313). Complete soldering kits to make your own– no programming needed– are also now available in quantity at our new web store.
(Note: While I cringe every time that I see Christmas displays up before Halloween, we aren’t actually too early in this case. Hanukkah starts on the evening of December 4th this year.)

Using an ADXL330 accelerometer with an AVR microcontroller

ADXL3XX   Makeshift socketX up: Red   X down: blue

The last decade has seen more than an order of magnitude drop in the price of
accelerometers, devices capable of measuring physical acceleration (often in more than one direction). History suggests that whenever a useful technology makes a precipitous drop in price, unexpected applications follow, and that’s exactly what has happened in this case.

Starting from zero and summing up acceleration, you can use an accelerometer to find velocity, and from that derive relative position information. By measuring the acceleration due to gravity, one can also determine orientation (technically, inclination)– you can tell which way it’s pointing. Those are pretty useful skills for a chip! And so as bulk prices for tiny chip-scale three-axis accelerometers have begun to approach $5, they have started to appear in all kinds of mass-market applications that you might not have predicted: laptop computers (for hard drive protection), smart phones and cameras (for orientation– e.g., portrait vs. landscape on the iPhone), cameras for image stabilization, and quite visibly in the controllers for Nintendo’s Wii system.

With all that promise, you might think that an accelerometer is a difficult beast to harness. That turns out not to be the case. In this little project we demystify the mighty accelerometer and show you how to get started playing with one. In the spirit of hobbyist electronics we do this the easy way– without designing a PCB or even soldering any surface-mount components.

Note: An updated version of this article is now available here.
Continue reading Using an ADXL330 accelerometer with an AVR microcontroller

Class Reminder: Choosing a Microcontroller (Sat 7/7 @ TechShop)

ATtiny2313MakeController

Tomorrow I’ll be again giving my seminar called “Choosing a Microcontroller” at TechShop. This class is a broad introduction to the capabilities and variety of single-chip computers, as well how to actually pick one for a given application. It’s easy to get overwhelmed looking at the variety of range of micros, from four-bit micros that have a 4-bit wide data path — and actually cost four bits— to AVRs and PICs, basic stamps and Arduinos, to 32-bit gorillas with names like ARM, Blackfin, and Coldfire. So, we’ll try and cut through the fog and help you figure out where to get started.

If you’ve heard people getting excited about or doing cool things with microcontrollers and want to learn more, this might be a great introduction to the field.

Sign up for the class here.

If you are interested in the topic but can’t make it, you might want to take a look at our
list of resources for choosing microcontrollers.

This is the last time that this particular class will be offered in the near future. Another intro AVR class will be forthcoming, probably in August. As always, if you have other ideas for classes that are within our expertise, please let us know.

Resources for getting started with AVRs

This is a short list of resources for getting started with AVR microcontrollers. It’s intended as a supplement to intro AVR classes that we have given. We intend to periodically update this list; leave your suggestions for additions in the comments, please. (Last update: October 2012)

First of all, these GUI installers for the GNU AVR toolchain are really excellent: Two flavors for Mac and Windows:

CrossPack (Mac – recommended solution)

MHV AVR Tools (Windows – recommended solution. Also available for Linux and Mac)

On Linux and Unix-like operating systems (Macs included) you can also follow the directions given by bdmicro (330 kB PDF) for installing the components one at a time.

Almost certainly the best place to get started is at Ladyada’s AVR tutorial. It is extensive and up to date, and it will probably be kept up to date better than most of the other resources that we mention here.

A couple of other sets of instructions and reference guides:

Some notes on hardware:

A few interesting examples of AVR source code:

  • TV-B-Gone, the open-source version.
  • Gobs of other good examples at Ladyada.net
  • Procyon AVRlib by Pascal Stang. Open-source C libraries to do all kinds of things– some quite advanced.

Our own articles about and using AVR microcontrollers:

  1. An AVR-based Analog Plotbot with an E-Paper Display
  2. Quick and Dirty D to A on the AVR: A timer tutorial
  3. Fixing a bad frequency fuse bit on an AVR
  4. Resources for choosing a microcontroller
  5. Programming the Atmel ATtiny2313 in Mac OS X (only partly Mac specific– but mostly out of date. Some hints about programmers, programming, and target boards.)
  6. How to make high-tech LED decorations for the holidays
  7. LED Micro-Readerboard, version 2.0
  8. LED Micro-Readerboard, version 2.0: FAQ File (with hints about programming)
  9. Instructables: Micro-Readerboard Build
  10. Using AVR microcontrollers: Minimalist target boards
  11. The Adafruit Industries USBtinyISP kit
  12. Using an ADXL330 accelerometer with an AVR microcontroller
  13. AlphaPOV: An alphanumeric persistence of vision display
  14. MiniPOV Cylon firmware
  15. Make a Robotic Snap-O-Lantern!
  16. Peggy, A Light Emitting Pegboard Display
  17. Solid freeform fabrication: DIY, on the cheap, and made of pure sugar
  18. Meggy Jr RGB
  19. POV Lissajous figures
  20. Resurrecting Tennis for Two
  21. Business card breakout boards for ATmega48/88/168/328
  22. Scariest Jack-o’-Lantern of 2008
  23. Simple Solar Circuits
  24. The Mignonette
  25. Peggy 2.0
  26. Single Sided Circuit Board with an ATtiny2313
  27. Business card breakout boards for ATtiny2313
  28. Basics: Serial communication with AVR microcontrollers
  29. Giant 7-segment displays
  30. Deluxe LED Menorah
  31. The Larson Scanner
  32. The Rovin Pumpkin
  33. The Bulbdial Clock
  34. Using an ADXL335 accelerometer with an AVR microcontroller
  35. Mac Sleep Light Pumpkin
  36. Octolively Interactive LED panels
  37. ISP Shield for Arduino
  38. Reading and writing flash contents
  39. Sharing target boards
  40. On the design of the Bulbdial clock
  41. Diavolino
  42. Interactive Game of Life Exhibit
  43. Say Hello to xmega
  44. Blink an LED with an AVR
  45. The Art Controller

Using AVR microcontrollers: Minimalist target boards

USBtinyISP and simple target

This is a quick how-to guide on making ultra-simple development boards for programming AVR microcontrollers. Most recent-vintage AVRs can be programmed through an ISP (in-system programmer) connection; all that is really needed is a place for the chip to sit and a way to connect to the programmer.

That’s where these minimalist AVR “target boards” come in. These little boards cost only about $2 and take only a few minutes to make.

It turns out that I build a lot of these because asking “how do you make a circuit to program the AVR?” is really the same as asking how you can program an AVR that is in a circuit. And, we might as well start with a simple circuit.
Continue reading Using AVR microcontrollers: Minimalist target boards

The Adafruit Industries USBtinyISP kit

USBtinyISP, assembled

This week I’ve been trying out a new low-cost AVR programmer from Adafruit Industries, and it looks like a winner. The USBtinyISP AVR Programmer is an open-source, USB, in-system programmer (ISP) that you can get as a kit for $22. The design is simple, straightforward and fairly easy to assemble. It also manages to incorporate a couple of important features that I have found to be missing from the low-end USB AVR programmer from Atmel, the AVRISP MkII, while coming in at only half the price.

Continue reading The Adafruit Industries USBtinyISP kit

Learn about microcontrollers at TechShop

 

Coming up real soon now: Three microcontroller-oriented classes, on Saturday afternoons at TechShop, at different levels of skill and with different emphases:

 

 

  • Sat. June 9, 1:00 PM: Make a Micro Readerboard
  • Sat. June 16, 1:00 PM: Introduction to AVR Microcontrollers
  • Sat. July 7, 1:00 PM: Choosing a Microcontroller

The classes are held at TechShop, a San Francisco Bay Area “open-access public workshop,” located just off of 101 in Menlo Park, where you can go use a wide range of tools to make things, and take all kinds of classes.
   
Make a custom LED Micro-Readerboard

Next Saturday, June 9, I’ll be giving a fun little class, suitable for anyone with a bit of soldering experience (even youngsters), where you can customize the phrases in and assemble an LED Micro-Readerboard. It’s a cute little thing that spells out a preprogrammed messages (e.g., your name), one letter at a time, on a single-character alphanumeric display. These are much like the ones that we programmed to be holiday ornaments a few months ago, but these are actually extra-spiffy version 2.0 micro-readerboards with higher brightness and better battery life. And, if you take the class, you get to choose what messages to put on your readerboard and take it home. It’s a neat, self-contained project that’s a great example of what you can do with a little AVR microcontroller.

(UPDATE: Second class added on June 30, also at 1:00 PM.)

And speaking of AVR Microcontrollers….

 

ATtiny2313

Introduction to AVR Microcontrollers

Saturday, June 16, 1:00 PM

You may have noticed that a number of our interesting projects are based around AVR microcontrollers. AVR microcontrollers are powerful and inexpensive single-chip computers that are available in a wide range of sizes. They also happen to be remarkably easy to program in C, using entirely free and open-source tools that run on Macs, Windows, and Unix-like operating systems. In this practical introduction to AVR microcontrollers, we’ll take it from the beginning so that you can go home and use AVRs for your own cool projects. Some topics to be covered include: different types of AVRs and how to pick one, what kinds of programmer you should get, how to install the software tools, how to get started actually programming them, and how to download and run your code on the microcontroller.

Choosing a microcontroller

Finally, on July 7, I’ll be giving a repeat of this introductory microcontroller class, called Choosing a Microcontroller. This large-format seminar is designed to be a broad introduction to the capabilities and variety of single-chip computers, as well how to actually pick one for a given application. It’s easy to get overwhelmed looking at the variety of range of micros, from four-bit micros that have a 4-bit wide data path — and actually cost four bits— to AVRs and PICs, basic stamps and Arduinos, to 32-bit gorillas with names like ARM, Blackfin, and Coldfire. So, we’ll try and cut through the fog and help you figure out where to get started.

If you’ve heard people getting excited about or doing cool things with microcontrollers and want to learn more, this might be a great introduction to the field.

Sign up for these and other TechShop classes here.

(By the way, it’s hard to tell what types of things people want to learn about. So, if you have suggestions for other classes that you’d like to see taught by the Evil Mad Scientists, you can E-mail us or leave comments here or in the forums.)