# Adafruit Metro Mini

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/045/195/medium800/adafruit_products_2590-06.jpg?1502653944)

We sure love the ATmega328 here at Adafruit, and we use them _a lot_ for our own projects. The processor has plenty of GPIO, Analog inputs, hardware UART SPI and I2C, timers and PWM galore - just enough for most simple projects. When we need to go small, we use a [Pro Trinket 3V](https://www.adafruit.com/products/2010) or [5V](https://www.adafruit.com/product/2000), but if you want to have USB-to-Serial built in, we reach for an **Adafruit METRO Mini**.

![](https://cdn-learn.adafruit.com/assets/assets/000/045/197/medium800/adafruit_products_2590-01.jpg?1502653955)

METRO Mini is the culmination of years of playing with AVRs: we wanted to make a tiny, breadboard-friendly development board that is easy to use and is hacker friendly. Metro Mini can be programmed with the Arduino IDE (select 'UNO' in the boards dropdown)

- **ATmega328 brains** - This popular chip has 32KB of flash (1/2 K is reserved for the bootloader), 2KB of RAM, clocked at 16MHz
- **Power the METRO**  **Mini** with 6-16V polarity protected on the Vin pin, or plug the micro USB connector to any 5V USB source.
- **METRO has 20 GPIO pins** , 6 of which are Analog in as well, and 2 of which are reserved for the USB-serial converter. There's also 6 PWMs available on 3 timers (1 x 16-bit, 2 x 8-bit). There's a hardware SPI port, hardware I2C port and hardware UART to USB.
- **GPIO Logic level is 5V** but by cutting and soldering closed a jumper on the bottom, you can easily convert it to 3.3V logic
- **5V onboard regulator** with 150mA out, 3.3V 50mA available via FTDI chip
- **USB to Serial converter** , there's a genuine SiLabs CP2104 hardware USB to Serial converter that can be used by any computer to listen/send data to the METRO, and can also be used to launch and update code via the bootloader
- **Four indicator LEDs** , on the top of the PCB, for easy debugging. One green power LED, two RX/TX LEDs for the UART, and a red LED connected to pin PB5 / digital #13
- **Easy reprogramming** , comes pre-loaded with the [Optiboot bootloader](https://github.com/Optiboot/optiboot)
- **Beautiful styling** by PaintYourDragon and Bruce Yan, in Adafruit Black with gold plated pads.

![](https://cdn-learn.adafruit.com/assets/assets/000/045/196/medium800/adafruit_products_2590-03.jpg?1502653950)

The Metro Mini comes as a fully assembled and tested board, with bootloader burned in and also a stick of 0.1" header. Some light soldering is required if you'd like to plug it into a breadboard, or you can solder wires or header directly to the breakout pads. [Once headers are installed they can be fitted into 0.6" wide sockets](https://www.adafruit.com/product/2206)

![](https://cdn-learn.adafruit.com/assets/assets/000/045/198/medium800/adafruit_products_2590-04.jpg?1502653971)

 **Detailed specifications:**

- ATmega328 microcontroller with Optiboot (UNO) Bootloader
- USB Programming and debugging via the well-supported genuine FTDI FT231X or the SiLabs CP2104
- Input voltage (Vin): 6-16V (a 9VDC power supply is recommended)
- 5V logic with 3.3V compatible inputs, can be converted to 3.3V logic operation
- 20 Digital I/O Pins: 6 are also PWM outputs and 6 are also Analog Inputs
- 32KB Flash Memory - 0.5K for bootloader, 31.5KB available after bootloading
- 16MHz Clock Speed
- Adafruit Black PCB with gold plate on pads
- 18mm x 44mm x 4mm / 0.7" x 1.7" x 0.2"
- Weight: 3g
- Derivative of ["Arduino UNO R3 Reference design"](http://www.arduino.cc/en/Main/ArduinoBoardUno)&nbsp;
- [Open source hardware files on github!](https://github.com/adafruit/Adafruit-METRO-328-PCB)

# Adafruit Metro Mini

## Pinouts

We packed a full Metro's worth of goodies into this slim little PCB. There's everything you need to build a project in Arduino - lets check it out!

![](https://cdn-learn.adafruit.com/assets/assets/000/045/199/medium800/adafruit_products_pinouts.jpg?1502654027)

![](https://cdn-learn.adafruit.com/assets/assets/000/110/574/medium800/adafruit_products_Adafruit_Metro_Mini_Pinout.png?1649187209)

PDF of above pinout image available [here](https://github.com/adafruit/Adafruit-METRO-328-PCB/blob/master/Adafruit%20Metro%20Mini%20Pinout.pdf).

# USB & Serial converter
![](https://cdn-learn.adafruit.com/assets/assets/000/045/200/medium800/adafruit_products_usbserial.jpg?1502654226)

The USB plug is how you will need to program and debug your code. We use it to both power your project and also provide the USB serial interface. Check the **Arduino IDE Usage** page for how to install the drivers.

# Microcontroller & Crystal
![](https://cdn-learn.adafruit.com/assets/assets/000/045/201/medium800/adafruit_products_chipxtal.jpg?1502654244)

This is the brains of your Metro Mini. We use the ATmega328P at 16 MHz. This matches the same exact chip used in the Adafruit Metro and Arduino Uno, so you know that you'll have 100% compatibility.

# LEDs
![](https://cdn-learn.adafruit.com/assets/assets/000/045/207/medium800/adafruit_products_leds.jpg?1502654335)

There are 4 LEDs in the middle of the board. In no particular order:

- **ON** is a green LED that is always lit when the board is powered, it is connected directly to the 5V power supply through a 1K resistor
- **L** is the red 'pin 13' LED and is connected to (you guessed it) pin #13 through a 1K resistor
- **RX** and **TX** are controlled by the USB serial chip. They will let you know when data is sent from or to the computer. Both are yellow. They are driven by the USB serial chip only, you cannot control them directly.

# Power Pins & Regulators
![](https://cdn-learn.adafruit.com/assets/assets/000/045/202/medium800/adafruit_products_powerpins.jpg?1502654254)

The bottom row has 6 power pins that you will find handy!

- **USB** is connected directly to the micro USB connector, and is great when you need a lot of 5V power for NeoPixels or servos, etc. If USB is not plugged in, this will not be powered
- **3V** this is the 3V regulator ouput. On the FTDI-using Metro Mini, this will be 50mA output. On the CP2104-using Metro Mini it will be 500mA max output. Note you can only get 500mA out when its plugged into USB
- **5V** is the 5V output. If powered from USB, it is powered from USB power through a Schottkey diode. If you are only powering from Vin, it will give you up to 150mA of current out
- **Vin** is the battery input. You can provide 5V to 16V input. Note that we linearly regulate this down, so using a higher voltage will cause your board to heat up _more_. 5-8V is a good place to stay.

You can connect both USB and Vin power, and the metro will automatically switch between the two to maintain the highest voltage output on 5V out.

![](https://cdn-learn.adafruit.com/assets/assets/000/045/203/medium800/adafruit_products_regulators.jpg?1502654262)

# Digital I/O Pins
![](https://cdn-learn.adafruit.com/assets/assets/000/045/204/medium800/adafruit_products_digitals.jpg?1502654281)

On the right hand side are all the digital I/O pins you expect. These match the same names/usage of the Adafruit Metro and Arduino UNO. They are all 5V logic output/input unless you've set the Mini to be 3V logic (see at the end)

The two pins labeled **0** and **1** are the two Serial pins that are used to [send data to and from the Arduino to the USB-Serial translator chip](../../../../ladyadas-learn-arduino-lesson-number-0/usb-jack-and-interface#usb-inteface-chip).&nbsp;

_Don't connect anything to Digital 0 or 1 unless you are super sure because it will affect your Metro's ability to communicate!_

- **Digital 2** through **Digital 12** are normal every day digital pins. Pins # 3, 5, 6, 9, 10, 11 can do PWM output
- **Digital 13** is a little special because [it is also connected to the **L LED**.](../../../../ladyadas-learn-arduino-lesson-number-0/leds#step-12) You can use this pin without affecting the Arduino just be aware that the **L** LED will also blink at the same time.

## SPI Port

The ATmega328p has a hardware SPI port, but you can only use the following pins:

- **SPI Clock** on D13
- **SPI MISO** on D12
- **SPI MOSI** on D11

The default chip select pin is D10. If you aren't using that pin for CS, it has to be a digital output. So we recommend using that pin for your first SPI-device CS

## I2C Port

The ATmega328p has a hardware I2C port, but you can only use the following pins:

- **I2C Data** on A4
- **I2C Clock** on A5

## UART Port

The ATmega328p has a hardware UART port, **but it is used for the Serial connection and programming the chip bootloader so it isn't recommended!**

- **UART TX** on D0
- **UART RX** on D1

For connecting to Serial-needing devices we recommend SoftwareSerial which can use any two pins

# Analog In + Digital I/O Pins
![](https://cdn-learn.adafruit.com/assets/assets/000/045/205/medium800/adafruit_products_analogs.jpg?1502654303)

The analog input pins are special pins that can read sensors. They can also be used as digital input/output pins, they really are the most versatile pins!

Each analog pin can read a voltage between 0 and 5V. When used in digital mode, they are all 5V logic output/input. Unless you've set the Mini to be 3V logic (see at the end) in which case the analog read-range and logic level is 3.3V

# Other Pins
![](https://cdn-learn.adafruit.com/assets/assets/000/045/206/medium800/adafruit_products_otherpins.jpg?1502654321)

There's a **Reset** pin and button, they are connected together. When **RST** is connected to ground, it will reset your Metro Mini. Note it will not reset the serial connection so you can keep that open when resetting. The button will do the same as connecting **RST** to ground, but its fun to press.

**Aref** is the analog reference, which can be connected to other voltages when you want to change the range or quality of your analog readings.

# Voltage Select Jumper
![](https://cdn-learn.adafruit.com/assets/assets/000/045/208/medium800/adafruit_products_backpins.jpg?1502654342)

On the bottom of the board, there is a **Vio** jumper, which you can see ties the middle pad to **5V**. If you want to use your Metro Mini in 3V logic mode - which can really simplify connecting to many chips, sensors, and displays - cut the little trace to the left, and solder the middle pad and right pad together. Use a multimeter to check that you really cut that trace, as shorting 3V and 5V together is very bad and may damage your Mini!

# Adafruit Metro Mini

## Assembly

![](https://cdn-learn.adafruit.com/assets/assets/000/045/571/medium800/adafruit_products_2590-03.jpg?1503285189)

## Prepare the header strip:

Cut two strips to length if necessary. It will be easier to solder if you insert it into a breadboard -&nbsp; **long pins down**

![adafruit_products_DSC_3755.jpg](https://cdn-learn.adafruit.com/assets/assets/000/045/570/medium640/adafruit_products_DSC_3755.jpg?1503285179)

## Add the board:

Place the board over the pins so that the short pins poke through the pads

![adafruit_products_DSC_3759.jpg](https://cdn-learn.adafruit.com/assets/assets/000/045/572/medium640/adafruit_products_DSC_3759.jpg?1503285230)

## And Solder!

Be sure to solder all pins for reliable electrical contact.  
  
Solder one side of the board at first  
  
_(For tips on soldering, be sure to check out our&nbsp;_[_Guide to Excellent Soldering_](http://learn.adafruit.com/adafruit-guide-excellent-soldering)_)._

![adafruit_products_DSC_3761.jpg](https://cdn-learn.adafruit.com/assets/assets/000/045/573/medium640/adafruit_products_DSC_3761.jpg?1503285260)

![adafruit_products_DSC_3765.jpg](https://cdn-learn.adafruit.com/assets/assets/000/045/574/medium640/adafruit_products_DSC_3765.jpg?1503285275)

![adafruit_products_DSC_3767.jpg](https://cdn-learn.adafruit.com/assets/assets/000/045/575/medium640/adafruit_products_DSC_3767.jpg?1503285282)

![adafruit_products_DSC_3768.jpg](https://cdn-learn.adafruit.com/assets/assets/000/045/576/medium640/adafruit_products_DSC_3768.jpg?1503285303)

Flip the breadboard around to solder the other strip

![adafruit_products_DSC_3769.jpg](https://cdn-learn.adafruit.com/assets/assets/000/045/577/medium640/adafruit_products_DSC_3769.jpg?1503285322)

![adafruit_products_DSC_3770.jpg](https://cdn-learn.adafruit.com/assets/assets/000/045/578/medium640/adafruit_products_DSC_3770.jpg?1503285342)

![adafruit_products_DSC_3773.jpg](https://cdn-learn.adafruit.com/assets/assets/000/045/579/medium640/adafruit_products_DSC_3773.jpg?1503285362)

![adafruit_products_DSC_3777.jpg](https://cdn-learn.adafruit.com/assets/assets/000/045/580/medium640/adafruit_products_DSC_3777.jpg?1503285371)

You're done! Check your solder joints visually and enjoy!

![adafruit_products_DSC_3778.jpg](https://cdn-learn.adafruit.com/assets/assets/000/045/582/medium640/adafruit_products_DSC_3778.jpg?1503285444)

# Adafruit Metro Mini

## Arduino IDE Usage

# Installing USB Serial Drivers

The USB plug is how you will need to program and debug your code. We use it to both power your project and also provide the USB serial interface. On older Metro Mini's we used a FT231X chip. On newer Metro Mini's we now have the CP2104 chip. Both act the same but the CP2104 is a little less expensive so we were able to lower the price. For either one, you'll need to install drivers if you are using Mac or Windows. Linux comes with both drivers already.

**Windows users** can try plugging the board in, Windows update will probably install drivers for you. If the device is not recognized, simply download and install the Adafruit Windows Driver package. When you run it, make sure to click that you want to install the SiLabs CP210x and FTDI chip drivers too!

[Download Windows Drivers for all Adafruit Products](https://github.com/adafruit/Adafruit_Windows_Drivers/releases/latest)
If you are running [**Mac OS X , please use the SiLabs drivers**](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers) here

Warning: 

[Download the CP2014 Legacy USB Driver](http://community.silabs.com/t5/Interface-Knowledge-Base/Legacy-OS-Software-and-Driver-Packages/ta-p/182585)
Once drivers are installed and you've rebooted, you will have a Serial COM port.

- [How to find your COM Port on Windows](../../../../ladyadas-learn-arduino-lesson-number-0/install-software-windows#find-your-serial-com-port)
- [How to find your Serial device on Mac OS X](../../../../ladyadas-learn-arduino-lesson-number-0/install-software-mac-os-x#find-your-serial-port-device)
- [How to find your Serial device on Linux](../../../../ladyadas-learn-arduino-lesson-number-0/install-software-linux#verify-your-serial-port)

# Driver Installation on Mac OS X

The latest versions of Mac OS X may complain when you install the driver that it doesn't have permission.

The latest versions of Mac OS X may complain when you install the driver that the system extension was blocked

&nbsp;

Click **Open Security Prefs**

![adafruit_products_adafruit_3352.png](https://cdn-learn.adafruit.com/assets/assets/000/073/845/medium640/adafruit_products_adafruit_3352.png?1553832877)

Click **Allow** next to `System Software from "Silicon Laboratories Inc"`

![adafruit_products_adafruit_3353.png](https://cdn-learn.adafruit.com/assets/assets/000/073/846/medium640/adafruit_products_adafruit_3353.png?1553832925)

![adafruit_products_adafruit_3354.png](https://cdn-learn.adafruit.com/assets/assets/000/073/850/medium640/adafruit_products_adafruit_3354.png?1553833060)

When complete, check for `/dev/cu.SLAB_USBtoUART` by typing `ls /dev/cu.*` into Terminal

![](https://cdn-learn.adafruit.com/assets/assets/000/073/849/medium800/adafruit_products_adafruit_3355.png?1553833012)

# Using the Arduino IDE

The Adafruit Metro Mini is an 'Arduino Compatible' - that means that when using the Arduino IDE or other Arduino-friendly development environments, you can simply treat the 'Mini like an Arduino UNO.

When programming, simply select **Arduino UNO** in the dropdown menu!

![](https://cdn-learn.adafruit.com/assets/assets/000/045/229/medium800/adafruit_products_arduino_selectuno.png?1502682159)

[Check out Ladyada's Learn Arduino Lesson #1 to get your Metro Mini Blinkin'](https://learn.adafruit.com/ladyadas-learn-arduino-lesson-number-1)
[Simon Monk also has a great set of guides on Arduino!](https://learn.adafruit.com/series/learn-arduino)
# Adafruit Metro Mini

## Downloads

# Files

- Derivative of ["Arduino UNO R3 Reference design"](http://www.arduino.cc/en/Main/ArduinoBoardUno)&nbsp;
- [Open source hardware files on github!](https://github.com/adafruit/Adafruit-METRO-328-PCB)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library)
- [ATmega328P product page](http://www.atmel.com/devices/atmega328p.aspx)
- [PrettyPins pinout diagram PDF on GitHub](https://github.com/adafruit/Adafruit-METRO-328-PCB/blob/master/Adafruit%20Metro%20Mini%20Pinout.pdf)
- [3D Model of Metro Mini V2 on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/2590%20Metro%20Mini%20V2)
- [3D Model of Metro Mini on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/2590%20Metro%20Mini)

[SVG For Metro Mini PrettyPins Diagram](https://cdn-learn.adafruit.com/assets/assets/000/110/579/original/Adafruit_Metro_Mini_Pinout.svg?1649187464)
# Schematic
![](https://cdn-learn.adafruit.com/assets/assets/000/045/231/medium800/adafruit_products_schem.png?1502682416)

# Fabrication Print
![](https://cdn-learn.adafruit.com/assets/assets/000/045/232/medium800/adafruit_products_fab.png?1502682421)

# 3D Model of Metro Mini V2
![](https://cdn-learn.adafruit.com/assets/assets/000/117/622/medium800/adafruit_products_2590_Metro_Mini_V2.jpg?1674584998)

# 3D Model of Metro Mini Rev B
![](https://cdn-learn.adafruit.com/assets/assets/000/117/623/medium800/adafruit_products_2590-Metro-Mini-Rev-B.jpg?1674585027)


## Featured Products

### Adafruit Metro Mini 328 V2 - Arduino-Compatible - 5V 16MHz

[Adafruit Metro Mini 328 V2 - Arduino-Compatible - 5V 16MHz](https://www.adafruit.com/product/2590)
One of our star development boards is the&nbsp; **Adafruit METRO Mini 328** , an excellent lil fellow that lets you&nbsp;make your Arduino-based project tiny.&nbsp;&nbsp;Recently we had to redesign this board to move from the obsolete CP2104 to the available CP2102N, and one thing...

In Stock
[Buy Now](https://www.adafruit.com/product/2590)
[Related Guides to the Product](https://learn.adafruit.com/products/2590/guides)
### Zebra Byte Case for Adafruit Metro Mini

[Zebra Byte Case for Adafruit Metro Mini](https://www.adafruit.com/product/2709)
Never&nbsp;hack&nbsp;without a helmet, now you can protect your cute little [Adafruit Metro Mini](https://www.adafruit.com/products/2590) with this chic new&nbsp; **Zebra Byte Case**!

This laser-cut DIY plastic enclosure is designed to perfectly&nbsp;frame your...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2709)
[Related Guides to the Product](https://learn.adafruit.com/products/2709/guides)

## Related Guides

- [Rainbow Chakra LED Hoodie](https://learn.adafruit.com/rainbow-chakra-led-hoodie.md)
- [A Z80 CP/M emulator for the SAMD51](https://learn.adafruit.com/z80-cpm-emulator-for-the-samd51-grand-central.md)
- [Sandblaster - 3D printed sand buggy](https://learn.adafruit.com/sandblaster-3d-printed-sand-buggy.md)
- [3d Printed Neopixel Tactile Switch Buttons](https://learn.adafruit.com/3d-printed-neopixel-tactile-switch-buttons.md)
- [Open Sesame! A SMS-controlled door lock](https://learn.adafruit.com/open-sesame-a-sms-controlled-door-lock.md)
- [Ladyada's Learn Arduino - Lesson #2](https://learn.adafruit.com/ladyadas-learn-arduino-lesson-number-2.md)
- [Metro Minimalist Clock](https://learn.adafruit.com/metro-minimalist-clock.md)
- [Wizzy: A Needle Felted Cat](https://learn.adafruit.com/wizzy-a-needle-felted-cat.md)
- [Ladyada's Learn Arduino - Lesson #1](https://learn.adafruit.com/ladyadas-learn-arduino-lesson-number-1.md)
- [Digital Circuits 7: MCUs... how do they work?](https://learn.adafruit.com/mcus-how-do-they-work.md)
- [Adafruit ItsyBitsy ESP32](https://learn.adafruit.com/adafruit-itsybitsy-esp32.md)
- [Ladyada's Bento Box](https://learn.adafruit.com/lady-adas-bento-box.md)
- [Adafruit Music Maker Shield](https://learn.adafruit.com/adafruit-music-maker-shield-vs1053-mp3-wav-wave-ogg-vorbis-player.md)
- [Butterfly Bench with Edge Lit Acrylic](https://learn.adafruit.com/butterfly-bench-with-edge-lit-acrylic.md)
- [Sound Sample Sweater](https://learn.adafruit.com/sound-sample-sweater.md)
