Arduino serial programming using a Nokia phone cable


breaduino

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.

This is the cable and the markings on plug.

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.

Tags:

Subscribe

Subscribe to our e-mail newsletter to receive updates.

7 Responses to “Arduino serial programming using a Nokia phone cable”

  1. Mongoose January 26, 2011 9:21 am
    #

    Awesome little find! I’ve been trying to find a way to program an arduino through USB and avoid using the COM1 Programmer since Windows 7 does not like giveio – Might i ask your environment setup (Which programmer did you use in / OS?)

  2. mgargiullo February 6, 2011 9:22 am
    #

    I use my Ubuntu desktop and/or netbook. Sorry, I haven’t tried with my Windows 7 notebook.

  3. Mongoose March 2, 2011 12:53 pm
    #

    What programmer does this emulate for the arduino? i’m assuming an AVR mk II – do you have any further steps for setting up the environment?

  4. mgargiullo March 3, 2011 11:28 am
    #

    It acts like a serial programmer (after you install the boot loader). The IDE will see it as a serial port. Just select that serial port in the IDE interface.

    To load the bootloader onto my home built Arduino, I did use the AVR MKII ISP.

  5. Mongoose March 3, 2011 4:23 pm
    #

    I’ve also noticed on the back of the chips, RX and GND are soldered together – if you remove the bridge, the chip wont come on — did you also come across this?

  6. Indikakis2 December 1, 2012 2:02 pm
    #

    Did you remove the both black wire loops or just the dts loop ?. Because in my cable I got 2 red wire loops instead of 2 black wire loops. One loop comes from right under the dtr pad to dtr and the other loop comes from just under Vcc to pad under the rx.

  7. mgargiullo December 13, 2012 12:03 pm
    #

    I’ll be honest. It’s been a while and my electronics bench has been moved around a bit. I believe I desoldered all the wires (just take note of where the originals are) and only used the cat5 pieces.

Leave a Reply