Using Arduino Pro Mini
Using Arduino Pro Mini is interesting because it is an economical and fast solution.
The software on the Arduino IDE can be uploaded directly or with very small modifications.
Pro Mini occupies a small space, suitable for miniaturization.
As a hardware structure, the Pro Mini comes from an Arduino UNO from which the USB communication channel was abandoned. Thus, a cheaper and smaller module is obtained.
Basically, an Arduino Pro Mini is used as an Arduino UNO, except for the Upload Software phase, which is done by one of the methods described below. Of course there are other methods but the ones described seemed to me the most convenient.
Most ArduinoPro Mini I came across are in the following categories:
-ATmega328, 3V3 , 8MHz (microcontroller, power supply , tact frequency)
-ATmega328, 5V, 16MHz
-ATmega168, 3V3 , 8MHz
-ATmega168, 5V , 16MHz
In the main photo you can see:
1. Arduino Pro Mini (front-rear view)
2. CP2102 connections board
3. CH340 connections board
4. CP2102 adapter board
5. CH340 adapter board
6. Arduino UNO.
Below will be presented 3 methods of programming the Arduino Pro Mini, each of you can choose the most suitable method.
Supplies
All components can be found on AliExpress at low price.
Programming Pro Mini Using Arduino Uno
For this you need an Arduino Uno with microcontroller in THT version, USB cable for connection to PC (laptop) and some connecting wires (see photo 1).
Remove the microcontroller from the Arduino Uno.
We make connections between the two boards according to the table:
Pro Mini.......... Arduino Uno
Rx................................... Rx(D0)
Tx ...................................Tx(D1)
DTR ............................... Reset
GND .............................. GND
Vcc .................................3V3 (5V for Pro Mini supplyed at 5V)
In the present example, a 3.3V Pro Mini was used. Be careful not to supply to + 5V because it will damage.
We connect the assembly from photo1 to a USB port of the PC (laptop). The Arduino UNO driver needs to be installed (this is already done for those who have worked with Arduino).
We check if the ensemble is seen by the system and at what port on the way (for Widows):
Start-->Control Panel-->Hardware and Sound-->Device Manager.
In our case it can be seen that Arduino is connected to COM3 (see photo2).
Now we can program the Arduino Pro Mini. We will upload a simple program (Blink, which flashes an LED installed on the board). In Arduino IDE we will launch Blink sketch via File -> Examples -> Basics -> Blink.
Here we will have to make the board visible to the system: on the Tools path we declare the Arduino Pro or Pro Mini board (see photo3).
In the same way we will declare the type of microcontroller and the supply voltage (see photo4).
Also here we will set the connection port (see photo5).
Now, you can upload to Blink sketch and we will see the LED on the board Pro Mini flashing.
Programming Pro Mini Using CH340 Adapter Board
In photo6 you can see:
1. CH340 adapter board. It was purchased for less than $ 1, including shipping.
2. Connection board between Arduino Pro Mini and CH340 adapter board.
This board can be made according to the instructions in Step4, but can be replaced with wire connections.
It is recommended to use this board when we have to program many Pro Mini boards.
3. Arduino Pro Mini board.
We make connections between the two boards according to the table:
Pro Mini.......... CH340 adapter board
Rx....................................Tx
Tx.....................................Rx
Gnd..................................GND
Vcc...................................3V3 (5V for Mini Pro powered to 5V)
DTR..................................NC
On the CH340 adapter board there are 3 pins for supply: Vcc, 5V, 3v3. Making a short circuit between Vcc and one of the other 2 pins sets the supply voltage of 3V3 or 5V.
Warning! Improper voltage can lead to the destruction of the Arduino Pro Mini.
For programming Pro Mini Using CH340 Adapter Board, we will assemble the 3 boards as in photo6 (of course wire connections can be made).
Properly position the jumper, according to the desired supply voltage (in our case 3V3).
We connect the assembly with a corresponding cable to a USB port of the PC (laptop).
Next, the programming is done as in Step1, with the only but important exception:
in the Upload phase of the sketch, immediately after "Upload" appears (after compilation) press short tlme the "Reset" button on the Pro Mini. As a result, "Done uploading" appears after the board has been programmed.
It is not necessary to install an additional driver for CH340 adapter board, being used the driver of Arduino UNO (or Nano), which is also with CH340.
Update.
I recently received (Jun 2021), from various suppliers, ProMini modules powered by 5V.
I was surprised to find that the arrangement of the pins on the programming plug are arranged exactly the opposite than in the case of modules powered by 3V (see photo 6a).
Therefore, in addition to placing the power jumper in the 5V position, it is necessary to reverse the ProMini in the programming coupling (see photo 6b).
Programming Pro Mini Using CP2102 Adapter Board
In photo7 you can see:
1. CP2102 adapter board. It was purchased for less than $ 1.5 , including shipping.
2. Connection board between Arduino Pro Mini and CP2102 adapter board. This board can be made according to the instructions in Step4, but can be replaced with wire connections. It is recommended to use this board when we have to program many Pro Mini boards.
3. Arduino Pro Mini board.
We make connections between the two boards according to the table:
Pro Mini.......... CP2102 adapter board
GND.................................GND
Vcc...................................3V3 (5V for Mini Pro powered to 5V)
Rx.....................................Tx
Tx......................................Rx
DTR..................................DTR
Warning! Improper voltage can lead to the destruction of the Arduino Pro Mini.
For programming Pro Mini Using CP2102 Adapter Board, we will assemble the 3 boards as in photo7 (of course wire connections can be made).
Properly position the jumper, according to the desired supply voltage (in our case 3V3).
We connect the assembly with a corresponding cable to a USB port of the PC (laptop).
The CP2102 adapter board requires its own driver for operation.
The driver installs itself the first time the board is connected to the system.
If this does not happen, access the address:
https://www.silabs.com/developers/usb-to-uart-brid...
where, in the DOWNLOADS section you will find a suitable driver for your system.
Next, the Pro Mini programming is done as in Step1.
From my point of view it is the most convenient method of programming, which I recommend.
Making Connections Boards
Making Connections Boards is very simple and can be done in your own workshop.
For this you will need, for each board (see photo8):
-Male pin header 4 pins (2 pcs)
-Jumper switch 3 pins (1 pc)
-PCB home made (1pc)
Photos 9, 10 show the assembled boards, without labels, front-back.
Photos 11, 14 show the wiring diagrams, according to the tables of Step2, 3 .
Photos 12, 15 show the mechanical drawing of the 2 boards, these having identical dimensions, of 20X40mm.
Photos 13, 16 show the drawings of the 2 boards in Express PCB, a program that can be downloaded and used freely from the internet.
The material will be simply plated and 1mm thick. This thickness is necessary to be able to solder the pins of the 4 pin male headers, which will be bent at an angle of 90 degrees.
Photo 13,16 shows Connections Boards (top view) represented in Express PCB. Here we have the drawings of the PCBs and the location of the components. No metallic holes.
The couplings are stiffened on the PCB with metal wires tinned to the PCB as in photos 9,10.
The paths of the PCBs are completely tinned.
At the end we will execute the labels that we will stick on the Connections Boards. These have an important role for establishing the correct supply voltage, but also for the correct introduction of the modules in the couplings( see photo 6,7).
Label drawings can be found in the attached PDF file.
Downloads
Final Conclusion
It is worth trying to work with Arduino Pro Mini because there are the following advantages (for example compared to an Arduino UNO):
-the cost price of the module 3 ... 4 times lower.
-about 4 times smaller.
-slightly lower energy consumption (not much, but in mobile applications it matters).
Your own software or that of the Arduino IDE can be used without problems on the Pro Mini.
That is why it is convenient to make the effort to program such a module.
And that's it!