Using Arduino Pro Mini on your projects
09/30/2020If in any of your projects you have limits in terms of space or power consumption one of the best solutions is to work with an Arduino Pro Mini board. The USB port and the programmer circuitry have been removed from the design. As a result, its dimensions are considerably reduced. That’s why for the new version of Bike Pixel I’m thinking of using one of these boards.
There are currently two versions of the Pro Mini plates. It is possible to find them in 3.3V with a processor at 8MHz and with 5V at 16MHz. In both cases, apart from reducing their size, they use less energy than their big brothers (especially in the case of the 3.3V version).
Model | Height | Width | Length | Price (clon) |
Arduino Uno | 10 mm (0.4 in) | 53.4 mm (2.1 in) | 68.6 mm (2.7 in) | $2.74 |
Arduino Nano | 7.6 mm (0.3 in) | 18.5 mm (0.73 in) | 44.0 mm (1.7 in) | $1.93 |
Arduino Pro Mini | ~2 mm (0.07 in) | 17.8 mm (0.7 in) | 33.0 mm (1.3 in) | $1.78 |
As you can see on the table the price of the Pro Mini is also a little lower. This is mainly due to the fact that the board has a smaller number of components.
USB to serial UART board
At the expense of this reduction in price, power consumption and size, we will have access to a smaller number of input/output PINs and the lack of a USB port. For this reason we will have to work with an external signal converter module to program the board.
There are several modules on the market that allow us to easily connect a Pro Mini board to the USB input of our computer to do its programming. In my case I have used an FTDI module that is one of the cheapest ($1.24 on AliExpress, $5.99 on Amazon) and integrates a FTDI FT232RL chip. This chip is in charge of converting the USB signals into UART signals (RS232) which are the ones understood by the Arduino’s microcontroller.
Connexion and wiring
To connect the FTDI module to the Arduino, all you have to do is connect the programming pins on both boards accordingly. This means that the pins can be connected directly or by using wires to each other:
- DTR to DTR (Data Terminal Ready) (or BLK): which just keeps the Arduino’s reset state active. During this process, the bootloader is loaded and checks for a few seconds whether you are trying to send code. If so, it will delete and write the flash memory with the new program.
- TXD to RXD (Transmit Data, Read Data): so that the serial data transmitted by the Arduino is received by the FTDI module.
- RXD to TXD: so that the Arduino board receives the data transmitted by the programmer.
- VCC to VCC (Voltage Common Collector): which will power the Arduino board with 5V or 3.3V. Depending on the configuration we have chosen, we will also have to configure the switch on the FTDI board.
- GND to GND (Ground): which will act just as a ground.
- GND to GND (optional): that in principle it is not necessary to connect. Moreover, in the case of some programmer modules it is not even included.
If you are working with a module designed specifically for Arduino, this connection will be as easy as entering the programmer’s pins on the Pro Mini board. In my case, I am working with a clone and the connection I made is shown in the picture bellow.
Arduino IDE configuration
Once these PINs are connected, we can connect the FTDI module to the computer via USB and send the code to the board. To do this, depending on whether we are working with a 3.3V or 5V Arduino in the Tools menu within the Arduino IDE, it is necessary to select the options:
- Board: pick Arduino Pro or Pro mini.
- Processor: pick ATmega328P (5V, 16MHz) or ATmega328P (3.3V 8MHz) depending on the version we have. This menu also shows the options for choosing the ATmega168 processor that can be found in older versions. In the case of new versions you will normally find the ATmega328P processor. The main difference between both is that the new one has twice the memory for code.
After configuring our IDE, we can compile and upload our code to the board by simply pressing the Upload button on the top bar (or selecting the option Program/Upload on the menu). If everything goes well, you will see the data transmission and reception LEDs blinking and your code will start working as soon as the operation is finished. During this process, it will normally be necessary to press the Arduino against the FTDI module a little to ensure that the PINs make contact. If there where any problems you will need to use wires.
Conclusion
Although it can be scary at first, as you have seen using Arduino Pro Mini boards in your projects it is very simple. Just connect an FTDI module and we can take advantage of all the benefits that these boards offer. We will be able to save space, reduce consumption and at the same time save some money.