Arduino Mini - temporary notepad
Here is some INFORMAL documentation on the main Arduino Mini by a fan. It might be totally wrong, until this page says otherwise.
FIRST Thing: Determine which version of the Mini you have: 3, 4 or 5. Some newer versions had the ATmega168 or (now) the ATmega328, so check closely which MCU you do have. If you arrived here somehow other than from Arduino Web Site, please refer back to Arduino Mini Site to get the latest information and schematics and:
See the guide to the Arduino Mini and the Arduino Mini hardware page.
Warning: Don't power the Arduino mini with more than 9 volts, or plug the power in backwards: you'll probably kill it.
Differences between Mini and Arduino NG
- The mini's i2c / twi pinouts (AD4 and AD5) do not come with headers like the other pins, but can easily be soldered manually. (Update: Version 5 has AD0-AD7 available pins.)
- The mini uses an ATmega168 not ATmega8 ( Update: Version 5 uses ATmega328 pico power ), so...
- The mini uses a physically much smaller, more modern surface-mounted-style chip to reduce size. (Down side: you can't pop the chip in and out so easily to replace it or program it.)
- There is no power LED on the mini. (The component next to AD5 and AD7 is just a capacitor.) ( Version 5 *has* a power LED! )
- It's, um, smaller. Here's a photo of the mini alongside the NG, from pixelsumo.com. (A Mini USB adaptor is also pictured).
How to wire it up
Here's a picture of the mini in a bare-bones circuit, with just power, reset, and an LED on pin 13. Click to see larger image, which I have annotated on flickr:
- In the above image, the power lines are coming from +5v and Gnd from an Arduino NG board powered via USB.
How to check it is working
- If you have not programmed it yet, you can check it is running by putting an led and a resistor from pin 13 to ground. On powering up, and on every reset, the LED should blink quickly (3 times, I think). After a brief period (10 secs) the LED should start to blink with the same test program as is on the Arduino NG.
How to reset
As with the other ATmega chips, the basic idea is this:
Reset is done by taking the reset pin low briefly, then taken back to high. It should then be held high, normally. If it is left to float unconnected, it may cause unplanned resets. Immediately after you take the reset pin high again after it has been low (i.e. immediately after you release the reset button) pin 13 will blink rapidly for a second. (for me, 3 pulses in about 1 second)
Wiring a reset switch:
- Connect the reset pin to ground through a normally open push button.
- ALSO connect the reset pin through a large (10k ohm) resistance to +5v.
See also this forum thread on adding a reset button.
How to connect to the Mini USB Adapter
The main page already details this, pointing at this diagram.
Here's an annotated photo (on flickr) of a mini along with a usb connector:
March 26, 2009: The circuit in the photo seems to be wrong. 10K resistor not connected between RESET and +5V
Note however, that:
- I haven't tested the pictured circuit.
- It's inverted in relation to the circuit in the earlier photo.
How to program a Mini using a normal Arduino NG
You don't need a Mini USB Adaptor to program the Arduino Mini. You can also program the mini through an Arduino NG board, as follows:
- remove the atmega chip from an Arduino NG
- connect Rx (pin 0) on Arduino NG to Rx on Arduino mini
- connect Tx (pin 1) on Arduino NG to Tx on Arduino mini
- connect the Arduino NG to the computer via USB cable, thus powering the NG and the connected mini.
- In the Arduino IDE, change the chip to atmega168 in menu Tools:Microcontroller
- press verify/compile on the arduino IDE - you should get something like:
Binary sketch size: 4816 bytes (of a 14336 byte maximum).
If the maximum is instead around 7000 bytes then you haven't specified atmega168. You've missed a step!
- Push and release your reset button on your mini (see How to reset).
- press Upload on the Arduino IDE
- you should see Tx and Rx lights blinking on the Arduino NG board.
- you should see a message something like
Atmel AVR ATmega168 is found.
Firmware Version: 1.15
Firmware Version: 1.15
- After a delay of 5 seconds after upload completes, your program should start on the Mini.
Programming Troubleshooting (mini-specific)
There's already a page on troubleshooting. But here's some mini-specific stuff.
My program uploads ok, but the mini does crazy stuff (e.g. pin 13 led blinking in a fast dim blur).
You may have uploaded with Arduino IDE set to work with an atmega8. Make sure that Tools:Microcontroller is set to atmega168. I think it'd be better if such comms were simply rejected between the IDE and the Mini, or at least if Arduino IDE gave a warning after such a mismatched upload.
Like many playground pages, this is user-contributed info, not formal documentation. Use it at your own risk.
The mistakes are neillzero's - the correct bits, Gianluca's and Mellis'.