Compact Micro controller with ATmega328 – Arduion Pro/Mini 8 MHz

By Dan Chen, November 13, 2015

Understand ATmega328

Using Eagle, I designed the board to be compact but with essential break out pads . I broke out 4 analog pins and 2 digital pins. The 4 Analog pins are great to drive the servos and sensors,  I also included the USB jack just for power and a LED for debugging. You only need to solder the pins that you frequently use. I left ISP and FTDI pins exposed for programing.

You can download the Eagle drawing here. ATmega328-8mhz

Screen Shot 2015-09-13 at 5.48.57 PM Screen Shot 2015-09-13 at 5.49.08 PM

 

atmega328-pinout-datasheet-32TQFP-28-PDIP

atmega328-tqfp-arduino-pinout copy

I used http://fabmodules.org and Roland mill to create my board, using the 1/64 End mill to cut out the trace, and  1/32 to cut out the outlines (cutting the entire board out)

DSC07069 DSC07073

Trace with 1/64 end mill ki-trace_double

Outline with 1/32 end mill

ki-outline_double

After milling out the trace and cutting out the board we are ready the stuff the board.

DSC07078

 

You only need to break out the pins that out need, you can skip the FTDI and the ISP cable for smaller profile.DSC07284

DSC08012

 

Burning Boot loader

DSC08006

You will need FTDI cable, to program, get serial data and mainly provide power. You can also program with just AVR Programmer, but you will still need to provide your board power.
AVR ISP MKII Programmer (ISP, Xmega, TDI) to burn the boot loader.
AVR programer does not provide power.

 

Tips for getting Arduino IDE working on your own board

#1. Here are the json URLs for all Mega & Attiny board with all sorts of processor speed (1, 8, 16, 20 mHz)

Open up your Arduino preferences window,
Paste The following URLs into the Additional board section.
https://adafruit.github.io/arduino-board-index/package_adafruit_index.json,https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json,https://raw.githubusercontent.com/sleemanj/optiboot/master/dists/package_gogo_diy_atmega8_series_index.json
Screen Shot 2015-11-23 at 10.59.25 AM
Go to board manager (tool> board) to install
Install these 2 items under board manager (you might need to restart to see them)
Screen Shot 2015-11-24 at 12.49.03 AM

#2. Burn Boot Loader using your FabISP from previous class or AVR MII

Just make sure you pick the right processor speed, especially internal vs external.

#3. Done!
All you need to program now is the FTDI cable, you can also use ISP pins to do all your programing and take out the FTDI cable all together (you might want to break out the TX/RX if yo wanna do serial tutorial communication)

Essential Parts

Atmel ATMEGA328P-AU X1
http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail&itemSeq=186429144&uq=635864181113698007

10K Ohm Resistor X2
http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail&itemSeq=186429193&uq=635864181113698007

0 OhmResister X3
http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail&itemSeq=186429208&uq=635864181113698007

1µF Capacitors X1
http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail&itemSeq=186429274&uq=635864181113718011

0.1µF Capacitors X2
http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail&itemSeq=186429256&uq=635864181113698007

Total: Under $5

Screen Shot 2015-12-22 at 11.14.18 PM

One stop shop
http://www.digikey.com/classic/Ordering/AddPart.aspx?WT.z_cid=Shared_Cart

 

Optional SMD Parts

2×3 Male Pin Header
http://www.mouser.com/ProductDetail/FCI/95278-101A06LF/?qs=%2fha2pyFaduiCRukte8wAuu7BXZIVZmru%252bW%252bgCDezjEwuPQxSlhMN9w%3d%3d

2×2 Male Pin Header
http://www.mouser.com/ProductDetail/FCI/95278-101A04LF/?qs=%2fha2pyFaduiCRukte8wAunHLx7bj6YHKxr38FVF%2fm0p41uROE%252bmkVA%3d%3d

Male Pin, 1 Row: For FTDI
http://www.mouser.com/ProductDetail/3M-Electronic-Solutions-Division/961108-5500-AR-PR/?qs=sGAEpiMZZMs%252bGHln7q6pm53vbKor1bMJaWYB%2fZP5SAs%3d

More Details at 
https://docs.google.com/spreadsheets/d/1U-jcBWOJEjBT5A0N84IUubtcHKMEMtndQPLCkZCkVsU/pub?single=true&gid=0&output=html

FTDI Cable
http://www.amazon.com/SparkFun-FTDI-Cable-5V/dp/B00DJBNDHE/ref=sr_1_3?ie=UTF8&qid=1450844227&sr=8-3&keywords=ftdi+cable

AVR Programmer
http://www.amazon.com/Compatible-AVRISP–System-Programmer-interface/dp/B00C7VV6E4/ref=sr_1_3?ie=UTF8&qid=1450844326&sr=8-3&keywords=avr+programmer

You can also use FAB ISP and USB Tinny
http://fab.cba.mit.edu/content/projects/fabisp/