This instructable will guide you through the generic steps of designing and building an augmented microcontroller board. I have purposefully made it generic so that I do not limit it to a particular make or model of MCU, and I'll try to mention alternative ways of doing things to make it a bit easier for you.
I'm going to be designing and making an augmented microcontroller board for a 28 pin Microchip PIC, the 16F886. My example is going to be for a robot, so I'm going to include motor driver circuits, digital and ADC headers and some indication LEDs.
A generic list of materials/tools:
MCU and assorted supporting components (caps, resistors, headers)
A breadboard for prototyping
Some way of permanently building the circuit (I'll be etching copper board)
So — let's get started.
Step 1: Designing the Main Circuit
The most obvious element of the circuit is the microcontroller. Surrounding it will probably be:
Power Supply Regulation
External Clock (If you need one)
Let's deal with these one at a time…
Power Supply Regulation
Your MCU and surrounding circuitry will probably run at either 5v or 3.3v. I'm using 5v, but similar methods apply for 3.3v. There are two main types of DC-DC power regulation, linear and switching. Linear is easy, switching is more efficient. Linear involves one device, usually a three pin IC, and some capacitors, whereas switching will require a larger IC and various other components.
You need to include at least three power supply caps: ~10uF Aluminium across the unregulated supply, ~4.7uF across the regulated supply, and 0.1uF ceramic across the power rails of the MCU. If you don't have one elsewhere in your circuitry, you should have a ~300uF aluminium cap across the unregulated power too. A power indication LED is nice, too. One in series with a 1K ohm resistor, running off the regulated power is a nice touch. Make it green. We like green.
Most MCUs have some sort of reset or mclear pin that, when bought to a certain state, resets the MCU and makes it start it's program again. On the PIC16F886, this pin should be held high to enable the MCU to operate, but we'll add a reset switch which momentarily brings it low, resetting the MCU if we need to. Some MCUs have built in P/U resistors, so just a switch to GND is needed.
This is where the MCU connects to your computer to receive it's program. PICs and AVRs both use six pin headers, but in different formats. I'll be using a 6 pin RJ-45 socket, as they're hardy and will put up with me constantly plugging and unplugging as I try desperately to correct the errors in my programs! Consult relevant datasheets to see what the pinout of the connector is, and which pins of the MCU they need to connect to.
Sometimes there can be problems with adjacent data/clock lines, and some people recommend putting an R/C filter on one or both of the lines. This can help reduce crosstalk and interference, meaning less headaches later on. I'm not including a filter in this project.
Not all MCUs have an internal oscillator (an oscillator somewhere is required to give the MCU a synchronised 'beat' that all of it's sub-systems can work to), and even if it does, you might want a particularly high/low operating frequency, or a more accurate beat for intense timing applications. These can take various forms:
R/C Oscillator: Cheap and inaccurate. Only use this if your MCU has no int. oscillator, and you don't want to spend any money.
Crystal: More accurate and the metal cans look awesome on a PCB ;) They will require a couple of small caps. to function.
Canned oscillator: Is essentially a crystal and the caps in a little box/ceramic (as shown by schematic). I'll be using one of these.
These are usually very simple: A male or female header, connected to relevant pins. You could also use terminal blocks for more heavy-duty use. Most MCUs will not need Pull up/down resistors, but you might choose to add them to 'default' the pins to high/low. I suggest 47K-67K ohms, to +V or Gnd.
On the other hand, you might choose to add some extra circuitry between the MCU and the external connections. Leading conveniently onto the next step!