First Microcontroller Build

Most people know about the popular Arduino board. I first discovered Arduino my first year in college. It was what I had long been missing in my projects, the ability to put some sort of controlling logic in and add automation.

Fast forward several years and I’m finally at a point where my projects have begun moving forward at the rapid progression they were before college and the real world hit me for the first time, and now I’m ready to take a crack at designing my own Arduino based microcontroller. Of course, the ultimate goal is higher than Arduino, I hope to be working with ARM controllers soon, but Arduino is a nice start.

What do I want in a microcontroller board? There are a few things I set out to include, mostly based on previous experience, but I wanted to start with something attainable. So things like:

  • USB support
  • Ability to plug in an RC LiPo battery directly
  • Embedded Xbee transceiver
  • Other addons as we go

Based on a rough idea of what I wanted I started scouring the internet for possibilities. I stumbled across ATmel’s Atmega32U4. It was the chip of choice due to its native USB support. This would mean I wouldn’t need to learn how to set up an FTDI chip and program a microcontroller in my first go. It’s been my experience that when I try too many new things at once I tend to make a lot of mistakes that end up wasting hours troubleshooting.

I should also mention that at this point instead of just building a microcontroller, I decided I would be redesigning my existing hodge-podge of parts my electronic rocket ignition system had turned into over the years. In the beginning it was a simple system with several selector switches that enabled me to control igniters through an extension cord. But it evolved when I first discovered Arduino into a wireless solution with one of the switches being used to switch between manual mode and wireless mode. Doing this added some new unique requirements:

  • Test continuity of igniter
  • Respond to inputs from the Xbee corresponding to the remote for my ignition system
  • (New)Send USART data over Xbee to my future ground station
  • Sound a buzzer anytime power is connected to the igniter

So starting with those requirements in mind and the ATmega32U4 chip I began my design. I referenced Sparkfun’s Pro micro board which also uses the ATmega32U4 to get the basic peripheral requirements for the chip. Below you can see what I ended up with for the design.

Launcher Board

Designing the PCB

While designing the PCB there were really only a few things I tried to consider:

  1. Connections for switch, battery, and igniter needed to be at the edge of the board
  2. The Xbee would be mounted on headers so parts could go under it
  3. I wanted the crystal as close to the uController as possible
  4. And I wanted a skinny shaped board in case I adapt it for fitting in a rocket

The result of these is shown below:
Launcher_PCB

Ordering Parts

In the past when I would design a PCB I would hap-hazardly send in the files, and order the parts that had been sitting in my digikey cart since I thought up the board design. Inevitably this would lead to missing parts, or the wrong size or quantity of required parts. With this project I took a more meticulous approach by creating a legitimate bill of materials or BOM. I then found the proper part numbers for all of the components and added my BOM to digikey. This cleared up most of those mistakes.

Putting the board together

Trying it out

Of course the first thing I wanted to do was to see if I could plug in the board and see it work, but I ran into a few minor roadblocks.

Required Resources

  1. AtmelStudio- Download here:AtmelStudio 7
  2. Arduino IDE

A good post on programming a chip with another arduino based chip: Arduino as ISP.

Lessons Learned For Next Time

  • Add onboard reset button
  • Add 6-pin iCSP header
  • Fix buzzer footprint
  • Fix buzzer diode P/N