Table of Contents
- 1 Introduction
- 2 The Arduino Pro Mini
- 3 Using the FTDI Adapter
- 4 Programming the Pro Mini
- 5 Robot Arm Controller
- 6 Conclusion
Today we will take a look at the Arduino Pro Mini, a small yet powerful member of the Arduino family.
Although the Pro Mini is a small device it is quite powerful, as it uses the same processor chip as the Arduino Uno. In fact in some ways it is even more versatile, and it’s small form factor and low cost makes it ideal for use in permanent projects.
However programming the Pro Mini is done a bit differently than an Uno, mainly because the Pro Mini has no USB port.
Of course, there is a way around this, so follow along and see how the Pro Mini can be useful for your next Arduino design. And, as a bonus, we will build a battery-powered controller for a small robot arm.
The Arduino Pro Mini
The Arduino Pro Mini was originally developed by SparkFun. Although no longer available from the official Arduino store it is an open-source design and is now manufactured by several different companies. You will have no problem finding one at a very low price.
As its name would imply the Pro Mini is a very tiny device, it’s not much bigger than the DIP version of the ATMega328 chip. The Pro Mini uses a surface-mount ATMega328, giving it the full power of the Arduino Uno in a much smaller package.
In fact, in many ways, the Pro Mini is even more versatile than the Uno.
Arduino Pro Mini Pinout
One way in which it is more capable than the Uno is that most Pro Mini designs have two additional analog input ports, which can also double as extra digital I/O pins. This is due to the surface-mount version of the processor having more leads than the DIP version that the Uno is based upon.
Another way that the Pro Mini outshines its bigger brother is that it is available in both a 5-volt and 3.3-volt model. This opens up the possibility of creating battery powered projects, or directly interfacing with 3.3-volt logic devices.
The 3.3-volt Pro Mini runs at a slower clock speed, 8 MHz. For most applications, this will not be an issue.
But for all its extra versatility the Pro Mini has one feature lacking – it has no USB port.
While this may seem like a major drawback it isn’t really, in many Arduino projects the USB port is only used for programming and debugging. Once that is done with the USB port just sits there, taking up both space and consuming some current.
To program and debug a Pro Mini you will use an external device, called an FTDI Adapter.
Using the FTDI Adapter
FTDI is an abbreviation for semiconductor manufacturer Future Technology Devices International. In addition to interface chips, the company also manufactures a wide range of video adapter and other integrated circuits.
The adapters we are interested in are produced by several manufacturers and are used to interface USB or serial ports to microcontrollers. They are easily obtained on eBay or Amazon, as well as most well-stocked electronics stores.
FTDI adapters come in several shapes and sizes, all of them will have a USB (usually Mini USB) port and a 6-pin connector to attach to the Pro Mini.
FTDI Voltage Select
The FTDI adapter not only provides a USB port to allow you to communicate with the Pro Mini, it also supplies power.
Because the Pro Mini is available in both 3.3-volt and 5-volt models it is critical that you give it the correct supply voltage. The FTDI adapter will have a method of selecting the correct supply voltage, this is usually in the form of a jumper, a switch or a trace on the circuit board that needs to be cut or jumpered.
Make sure you get the voltage setting correct, applying 5-volts to a 3.3-volt Pro Mini can damage or destroy it!
Connecting the FTDI to the Pro Mini
Your FTDI adapter will have a connector, usually a 6-pin male header, to attach to the Pro Mini. In most cases you can just directly attach it, however one important thing to note is that this connector (and the connector on the hPro Mini) is not always mounted the same side up.
In the above image, I show a couple of Arduino Pro Minis and two FTDI adapters. The connector on the blue Pro Mini (the 5-volt one) is reversed from the connector on the red Pro Mini (the 3.3-volt one).
The two FTDI adapters also wired backward from each other!
The connections on the FTDI adapter for the Pro Mini are as follows:
- DTR – Data Terminal Ready, a control signal sent to the Pro Mini from the FTDI adapter to let it know that it is ready to send data.
- TX – Transmit, the signal sent out from the FTDI adapter.
- RX – Receive, the line that receives data from the Pro Mini.
- VCC – The Power supply voltage, either 3.3 or 5 volts DC.
- CTS – Clear To Send, a control signal sent back from the Pro Mini to let the FTDI adapter know it can send data.
To connect the FTDI adapter to the Pro Mini you need to match the signals up as follows:
Note that the Transmit and Receive lines are crossed between the two devices, which makes perfect sense if you think about it.
You will also note that the CTS input to the FTDI adapter is grounded, or held at a digital LOW. This essentially tells the adapter that it is always clear to send data. The Pro Mini will have an extra pin that is grounded for this purpose.
Use the diagram above and check the labels on the connectors for both your FTDI adapter and Pro Mini and you should have no problem connecting the two devices to each other.
Programming the Pro Mini
After you connect your FTDI adapter and Pro Mini together it’s time to program it.
Most FTDI adapters use a mini USB (not micro USB) connector, so you will need to ensure that you have the correct type of cable. The mini USB cables are not as popular as they used to be but they are still used for many cameras and microphones.
Connect the other end of the cable to your computer. If your computer is a Linux or Mac then you are ready to go.
For some Windows users you may need to install drivers to get your FTDI adapter recognized by your computer.
Arduino IDE Settings
Programming the Pro Mini is no different than programming an Arduino Uno, however, you do need to setup your Arduino IDE for the correct type of board and processor first.
Here is how you do it:
- Open your Arduino IDE.
- Select the Tools menu item from the top menu.
- Go down to the Board menu item in the Tools menu. A sub-menu will open, listing a large number of Arduino compatible boards.
- Select Arduino Pro or Pro Mini from the sub-menu. The Tools menu will close after you make your selection.
- Open the Tools menu again. You should now see an additional menu item called Processor.
- Select Processor. A sub-menu will open, listing different Pro Mini configurations.
- Select the correct processor (usually ATMega328P) and voltage/clock frequency to match your Arduino Pro Mini.
- Make sure you have also selected the correct Port, the one attached to your FTDI adapter.
Your Arduino IDE is now ready to use with the Arduino Pro Mini.
You may now use your sketch with the Pro Mini. All of the example sketches, such as Blink, should work without modification.
Robot Arm Controller
As an example of using the 3.3-volt Pro Mini, I have created a very simple robot arm controller, meant to be used with the MeArm robotic arm.
If you are not familiar with the MeArm you can read about constructing it. You can also use this controller with any arm that has four servo motors, or expand upon it.
The real purpose of this hookup and sketch is to show you how to use a 3.3-volt Arduino Pro Mini. I’ll be the first to admit that the controller is very basic, one day soon I’ll show you a much more capable controller.
The hookup for the robot arm controller is shown below:
The interesting things about this hookup is how the reference voltage for the analog inputs is established.
The potentiometers are hooked up to provide a variable voltage to four of the analog inputs. On a 3.3-volt Pro Mini this voltage should vary between ground and 3.3-volts. A higher voltage would overflow the analog to digital converter in the Pro Mini and could also possibly damage it.
Our power supply, however, is 6-volts. This can be provided by either a bench supply or batteries. A 6-volt supply is ideal for the servo motors, but it is too high to use for the analog reference voltage.
The Arduino Pro Mini is powered using the 6-volt supply connected to its RAW voltage input. This employs the built-in linear voltage regulator on the Pro Mini to derive the 3.3-volts it requires.
When the RAW voltage input is used the VCC pin on the Pro Mini now becomes an output, instead of being a voltage input. The output is 3.3-volts from the internal regulator.
This is the voltage used as a reference for the analog to digital converters.
Once you have everything hooked up you’ll need to upload the following sketch to make it all work.
Robot Arm Control Demo
Demonstrate use of 3.3 volt Arduino Pro Mini
Controls 4-DOF Robot Arm with 4 potentiometers
Powered by 6-volt power source
DroneBot Workshop 2019
// Include Servo Library
// Create 4 servo objexts
Servo base, left, right, claw ;
// Integers for analog inputs from potentiometers
int basePin = A0; // Middle Pot Analog Input Pin
int leftPin = A1; // Left Pot Analog Input Pin
int rightPin = A2; // Right Pot Analog Input Pin
int clawPin = A3; // Claw Pot Analog Input Pin
int baseValue = 0; // Middle Pot Value
int leftValue = 0; // Left Pot Value
int rightValue = 0; // Right Pot Value
int clawValue = 0; // Claw Pot Value
// Attach servo objects to output pins
// Read the Pot Values
// Convert to values between 0 and 180 for the servos
baseValue = map(analogRead(basePin), 0, 1023, 0, 180);
leftValue = map(analogRead(leftPin), 0, 1023, 0, 180);
rightValue = map(analogRead(rightPin), 0, 1023, 0, 180);
clawValue = map(analogRead(clawPin), 0, 1023, 0, 180);
// Write values to servos
base.write(baseValue); // Base servo position
left.write(leftValue); // Left servo position
right.write(rightValue); // Right servo position
claw.write(clawValue); // Claw servo position
delay(400); // Short Delay
The sketch is very basic. It uses the Arduino Servo Library, which is included in the Arduino IDE.
Four servo objects are declared, one for each of the servo motors. They are named base, left, right and claw to represent the function of each motor in the MeArm.
Some integers are also defined to represent the analog input pins that the potentiometers are connected to. Integers are also defined to represent the value obtained from each potentiometer, this will be the value used to position the servo motors.
In the Setup the servo objects are attached to the pins used to control the servo motors.
The Loop is very simple. The potentiometer values are read and are converted using the Arduino Map Function to values between 0 and 180, which is what the servo objects need to position the motors.
The value is then written to each servo. Then, after a short delay, it is all done again.
Load the sketch to your Pro Mini before you plug it into the circuit. Then disconnect the FTDI adapter and plug in the Pro Mini to the breadboard.
Connect a suitable power supply and start controlling your MeArm. If you find it “chatters” or moves erratically try increasing the value of the electrolytic capacitor.
With any luck you’ll be able to control the arm better than I could (I’m a terrible robot arm driver it would appear)!
The Arduino Pro Mini lives up to that old adage that “good things come in small packages”. It is a fully capable microcontroller that can make use of all of your existing Arduino Uno sketches. Its availability in both 3.3-volt and 5-volt configurations will allow you to design small battery-powered projects that you could not use the Uno for. And it is very inexpensive as well.
So give the Pro Mini a try for your next design.
Here are some components that you might need to complete the experiments in this article. Please note that some of these links may be affiliate links, and the DroneBot Workshop may receive a commission on your purchases. This does not increase the cost to you and is a method of supporting this ad-free website.
Code from this article – The Pro Mini arm controller sketch, in a ZIP file.