Let me begin with a brief rundown of what we're up to when we put an adapter/converter into play. These converters exist because as computers have evolved so have the languages they use to communicate with other devices. The concept is fairly easy to understand, just think of the converter as your own personal translator. Say you are in France, you don't speak French and you can't understand a word anyone is saying. You are going to need a converter! Or in this case we'd call them a translator. Someone that knows both the French and English language who can listen to the French and tell you in English what was said.
That is exactly how a computer adapter/converter works. Communication protocols (as they are called) are simply a specific set of rules that define how information is transferred. They are in fact their own languages, and just like people a computer can only understand a language that it knows. So trying to speak "serial" to a computer without a built-in serial port, is like trying to speak Mongolian to me - the computer nor I have a clue what is being said.
In this Instructable we are going to use an adapter so that our computer can understand and talk to (program) an Arduino Pro-Mini. There are a lot of different ways you can program an Arduino Pro-Mini. You can even do so using your Arduino UNO. My problem was finding a reliable way to program the pro-mini. In the past I have used my UNO to transfer Arduino sketches to a Pro-Mini for permanent use in my projects. That is until that method simply refused to work for me one day. And at the time I was attempting to update a program that I'd already loaded to a pro-mini using my UNO. Why it wouldn't work I never did figure out, but I did start looking for other ways to transfer my programs unto a Pro-Mini.
My current preferred method is to use a USB to UART/TTL converter. To date this method has not given me any trouble and is very easy to use.
A nice plus for this particular converter is that it provides both a 3.3v and a 5v output. This allows you to have one converter that works with both the 3.3v and 5v versions of the Pro-Mini.
Step 1: Items You Will Need
- Arduino Interface Program
- Arduino Pro-Mini
- USB to Serial Adapter
- USB cable with micro mini connector
- Something to upload to the Pro-Mini (any of the example programs will work also, like BLINK)
- Patch cables
Step 2: Setup and Configuration
There is one trick to wiring this up, and that is finding the DTR (data terminal ready) pin on the Pro-Mini. If you look at a Pro-Mini you will not find a pin labeled as DTR, but it's there. It is the far left pin on the programming header. The label by it says "GRN" (see pic). Besides that just crossover the TX and RX and you're set.
So wire it up as follows;
+5v from converter to VCC on mini
GND from converter to GND on mini
TX0 from converter to RXI on mini
RXI from converter to TX0 on mini
DTR from converter to GRN (DTR) on mini
Arduino Interface Setup:
You need to tell the Arduino program what board you are using. To do so;
- Open the Arduino program (if it's not already)
- Select Tools on the menu bar
- In the Tools menu, select Board: "name of current board"
- In the drop down list, select "Arduino Pro or Pro Mini"
Select Tools on the menu bar again and check that the;
- the "Processor" is correct for your board
- the "Port" is correct for your board
With that done you should now be able to upload a sketch to the Pro-Mini. Well, after you plug in the USB cable to your computer and the converter that is.
Step 3: Specifications and Documentation
USB 2.0 to TTL UART 6PIN Module Serial Converter CP2102
- USB to TTL Serial Converter
- USB to TTL Adapter
- Use this device to connect your PC to a serial (TTL level) device.
- Uses CP2102 chipset and has a standard 0.1" pitch terminal strip to connect directly to UART or I/O pins
- USB specification 2.0 compliant with full-speed 12Mbps
- 6 pins for 3.3V, RST, TXD, RXD, GND & 5V
- All handshaking and modem interface signals
- Baud rates: 300 bps to 1.5 Mbps
- Byte receive buffer; 640 byte transmit buffer
- Hardware or X-On/X-Off handshaking supported
- Event character support Line break transmission
- USB suspend states supported via SUSPEND pins
- Supports Windows 98SE, 2000, XP, Vista, Window7, Mac OS 9, Mac OS X & Linux 2.40
- Size: 42mm X 15mm (approx)
- Weight: 4g (approx)
The specification sheet for the CP2102 main chip is attached above.