My last article briefly described my first Arduino built on a breadboard. I also talked about loading the bootloader with an AVRISP MKII programmer. Once you’ve written your code for your Arduino you need a way to get your code onto your chip. The bootloader makes it as easy as a serial cable and the chip’s own TX/RX pins.
The actual Arduino has a built in USB to Serial chip, while ours does not. In order to program it we need to add our own. There are a bunch of ways to do this, but happened to have a few Nokia ca-42 phone cables in my parts bin.
So why the Nokia CA-42? Its actually a USB to Serial converter in a cable.
You can pick these up on ebay or dealextreme which is where I got mine. There are some things to watch out for as these only have 3 wires in them by default. They usually have 3 wires (tx,rx,gnd). While this is technically enough to program with you’ll be missing out letting the cable power the circuit and the auto-reset functionality.
These cables usually have three wires connected.
Of the handful of I’ve disassembled, only two have had the same color wires in them.
Use a pick or small screwdriver to gently pry up starting above the USB plug.
Now slowly work your way around the plug case. There are 6 plastic friction pins that hold the two sides together.
You’ll notice the three wires connected to tx,rx and gnd, but there are also two loops soldered in.
If you look closely, you can see the solder pads marked gnd,rx,dtr,tx,vcc from left to right. I de-soldered the three wires and the black wire that was attached to the dts pad.
I used a section of cat 5 cable. I used the orange pair for 5v+ vcc and gnd, The blue pair for rx & tx. I used the green wire for dts. I trimmed down the brown pair and the green/wht wire. I then tinned, trimmed the ends and soldered the wires to the board.
I had about 3/4 of an inch of wire unsheathed. Once all the wires were soldered I gently twisted the wires so they shorten to fit into the case.
Take note of which color you use for what. Take a picture, write it down, whatever, just make sure you know which wire is for what.
Old cable and rebuilt cable side by side. The cover snaps right back on.
NOTE: The TX wire from your cable goes to the RX pin of the Arduino and the RX wire goes to the Arduino’s TX cable.
The DTS wire will enable the auto reset function for programming which is very very helpful. Connect this wire through a 0.1uf capacitor to the reset pin on the Arduino.