Ardiuno Pro-Mini Bring Up

 The Plan

I have been playing around with various projects using my Arduino Uno and Mega.  Each time I have to rip up my previous project to move on to another to re-use the Arduino.  I would like to keep some projects in tact so I found a really cheap Arduino Pro-Mini platform for $3.08.  I bought it here: http://www.banggood.com/Wholesale-New-Ver-Pro-Mini-ATMEGA328-328p-5V-16MHz-Arduino-Compatible-Nano-Size-p-68534.html.  It is cheap enough that I could buy a few and dedicate them to some of my projects.

In addition to being really cheap, it is tiny.  It can be used on projects that I might want to be kept small.  The entire module is not much bigger than quarter.  Here is a picture…

IMG_0828

The Trade Offs /Limitations

Due to the small size (and likely the low price) this board is missing some things:

  1. This Arduino board doesn’t have a USB to serial module on board.  You will not be able to just plug in a USB cable to a PC and start working.  I plan on using a Arduino Uno’s SW UART to communicate with it.
  2. The Uno and Mega is powered from the 5V supply of the USB from the PC.  Since there is no USB port on the Pro-Mini, I will need to find another way to power the board.  If I am already using an Arduino Uno to communicate with it, I can just use the 5V output of the Uno to power it.

The 1st Power Up

All I did was to power up the Pro-Mini using my Uno.  Here is the Fritzing diagram….

ProMiniPowerUp

When power was applied, the power LED turns on and another LED started blinking.  With some probing around, I see that the digital IO pin 13 is the one blinking the LED.  I am assuming that the Arduino example sketch “Blink” was pre-loaded on the board…..

ProMiniBlinkLED

The Sketch Programming Process

I first tried to program the Pro Mini by following several tutorial on line with no success.  I was able to successfully reprogram the boot loader on the Pro Mini using this tutorial… http://arduino.cc/en/Tutorial/ArduinoISP but when I tried to load a sketch, it wouldn’t work.

I also found a tutorial on how to use an FTDI USB to Serial TTL adapter cable to load sketches to the Pro Mini here: http://arduino.cc/en/Guide/ArduinoProMini.  Reading through it, it looked really simple.

  • The serial communication is just using the standard serial RX and TX.
  • Power is supplied using the 5V supply of the USB cable.
  • The only somewhat complicated portion was using the cables RTS line to reset the Arduino.  This pin would be connected to the pin labeled DTR on the Pro Mini board.

Looking at the Pro Mini schematic (http://arduino.cc/en/uploads/Main/Arduino-Pro-Mini-schematic.pdf), this DTR line is a way to toggle the Atmel chips reset line…..

ProMiniDTR

It also looks like the push button can also toggle this reset line.

The Simplified Sketch Programming Process – My version

I really don’t want to purchase a FTDI cable so I came up with my own hack way of using my UNO board to program the Pro Mini.  In essence, I am going to use the USB to Serial module built on the UNO board as an FTDI cable replacement.  To do that…

  • connect the TX of the UNO to the TX of the Pro Mini
  • connect the RX of the UNO to the RX of the Pro Mini
  • connect the 5V of the UNO (which is being powered by the USB cable to the PC) to the VCC of the Pro Mini.
  • disable the rest of the UNO HW by tying the RESET line of the UNO board to ground.

Here is a quick Fritzing diagram…

ProMiniSketchProgrammingSetup

The only thing missing in this simplified set up is that the Arduino IDE can’t reset the Pro Mini during the programming process.  To get around that , I simply manually reset the Pro Mini during the programming process with the push button on the Pro Mini board (not the UNO board).  The sequence is….

  1. Set the board type to the Pro Mini in thd Arduino IDE.
  2. Set the COM port # to the COM port # of the UNO board.
  3. File -> Upload…
  4. When the IDE status is showing “Compiling”, I press and hold the reset button on the Pro Mini board.
  5. When the IDE status reaches “Uploading”, I let go of the reset button on the Pro Mini board.

You have to make sure to let go soon after the “Uploading” shows up.  The time window is about 2-3 seconds so is not that hard to time.  If you wait to long, you will miss the hand shaking during boot up and it won’t work reprogram the Pro Mini.   There is probably some signal I could find on the UNO that I could solder to to make the reset work but I like not needing to make too many mods to get this working.

With this process I can now reprogram my Arduino Pro Mini with HW I already have set up most of the time.

The Cautions

Soldering Capability:

  • The unit I bought did not have any of the headers soldered on.  I had to solder them on myself.  If you are not comfortable soldering, you might not be able to use the board.

L Header Placement:

  • This board has a convenient header with just the 6 essential signals to get the board running on one edge.  The kit also comes with an L header that is intended to be used for it.  I mistakenly soldered it to the underside of the board like the other 2 straight headers.  This causes a problem when trying to plug the board onto a bread board.  The L bracket gets in the way.  Here is a picture of the problem…
  • ProMiniLHeaderProblem
  • Once soldered on, it is really hard to remove since you would need to melt the solder on all 6 pins simultaneously while trying to pull out the header.  I am just living with it on this first one I bought.  Lesson learned.
Advertisements