ATmega32 Prototyping PCB

HOME > Creative Technology > AVR Mega32 PCB

ATmega32: completed
In another page, I described a PCB that I made to hold an Atmel AVR microcontroller chip, the ATmega8. Having done that, and having learnt about the ATmega8, some of the limitations of that chip became apparant. But the ATmega8 is not the only AVR chip! There are many others, and the one that looked like a good choice for a second PCB was the ATmega32. This chip comes in a 40-pin DIL package (as well as in surface-mount packages) and has four 8-bit parallel I/O ports.

Another advantage of using the larger AVR chip is that there are still more devices to choose from that fit the same basic chip pinout. Going up the scale from the ATmega32, there's the ATmega644, which has more memory as well as extra I/O devices. The pinout is much the same, for all these 40-pin DIL chips, so one PCB should work for all of them. Another advantage of the new chips is that they have two serial ports, which makes applications like serial protocol convertors possible.

This list summarises the design goals for this board, in no particular order:

In order to achieve the proper pinout on the I/O connectors, I had to reverse the sequence of the connections to the Port A pins, pins 33 to 40 on the DIL chip. This made all of the I/O connectors identical, with one connector for each of the ATmega32's four I/O ports: Ports A, B, C and D. This is what leads to the track pattern that you can see in the lower left-hand corner of the photo of the PCB, below. Four pins on each connector were set aside for ground, and four pins for 5V power. I would have liked to have added additional power supply voltages, but the constraint of using a single-sided PCB made that too difficult.

One thing I didn't do was add the dual RS-232 buffer chip. The reason was rather silly: my offcut of copper-clad PCB material was too small to build the complete board! I left off about a fifth of the design, which meant that I had to omit the MAX232 or MAX220 chip. Of course, the Atmel AVR chip still has the serial ports in it, so I can add an off-board level shifter if and when required. I could even build a level shifter chip into a 9-pin "D" connector.

The final design was done using the free GNU PCB program and then printed onto junk-mail paper with an HP LaserJet 4+ printer. The toner from that printing was then transferred to the copper-clad board with a hot domestic smoothiing iron and the paper was soaked in warm water to remove it, leaviing the board ready to etch. Etching was done with ferric chloride in the usual way, and then the toner was removed with acetone, leaving the board ready to drill. I drilled most of the holes to 0.8mm diameter, but some of them needed to be a little larger, 1.0mm. The larger size was needed for the I/O connectors, the two-pin power connector, the reset switch and the six-pin programming header.

AVR prototyping PCB AVR prototyping PCB

Having completed the board, of course I have found a number of mistakes in the design. The main problems are with clearances; I just didn't leave enough room around the 16-pin I/O connectors. The placement of one of the wire links ended up underneath the six-pin programming header, which requires a little care in assembly to fit that wire first. The four I/O connectors look good, but if I was to build a board that used all of them and plugged in on top of the AVR board, all sorts of things would get in the way. It would be much better to keep the area clear for plug-ins and move the power connector, programming header and power-on LED out to the ends of the board.

The 15mil (15 thousandths of an inch) tracks have worked perfectly, connecting the six-pin programming header to the proper pins on the AVR chip. I didn't need to use the wire links to make those connections. The pull-up resistor for RESET fits OK under the AVR chip's socket, even if it is a bit of a kludge.

More photos of the PCB and the etching process are in this Flickr set, and photos of the final board are in this Flickr set.

Bill of Materials
QtyDescriptionManufacturer's Part NumberFarnell Order CodeRS Order Code
1ATmega32 MicrocontrollerAtmel ATMEGA32-16PU917-1282 
140-pin DIL SocketMulticomp 2227MC-40-06-05-F1110-3855 
116MHz Crystal, HC49/SIQD LF A161K971-3700 
222pf ceramic capacitorMulticomp 2222 680 34229113-8845 
3100nf ceramic capacitorMulticomp MCRR25104X7RK0050121-6438 
110nf ceramic capacitor   
16-way 0.1-inch HeaderHarting 09 18 506 7324109-6984 
416-way 0.1-inch Female HeaderMulticomp 2214S-16SG-85159-3492 
12-pin KK HeaderMolex 22-27-2021973-1148 
1Rectangular amber LED   
1390Ω resistor   
110kΩ resistor   
1Pushbutton switch   
To upgrade to ATmega324, delete the ATmega32 and the 16MHz crystal, and add the following:
QtyDescriptionManufacturer's Part NumberFarnell Order CodeRS Order Code
1ATmega324P MicrocontrollerAtmel ATMEGA324P-20PU145-5110 
120MHz Crystal, HC49/SVishay Dale XT49S 20M XT49S-20 B04 E2146-9646 


Return to the Creative Technology page

Return to John Honniball's home page

Copyright © 2008 by John Honniball. All rights reserved.