Let's Make Robots!

ISP or Serial programming an Arduino

I am the proud owner of an uBotino board by Robot-x. I do not own a USB-to-Arduino cable (FTDI with auto-reset). However, I do own computers with good old fashioned serial ports.

So I think I'm gonna build a serial programming circuit. Would the classic "Picaxe" level-correcting schematic work in this case?

* a voltage divider to shift down the signal from my PC from ca 11V to 5V;
* a series resistor in both data lines to limit current;

And what about the auto reset? Is that just a matter of connecting Arduino's RST to PC's DTR? Should I protect that current as well?

Update 16 March 2011.

So I designed, built and failed. Or rather, lost patience. I learned a lot though, so I am calling it a victory. A victory over my problem (I know it now, I know how to solve it, I now know my board fabricating is crap.) but also a victory over my own stubbornness.

So I caved, big deal! Here are three boards that should be able to program a uBotino. Or any Arduino that has no on board ftdi.

Two of which actually work....

From top, clockwise round:

- Home built level converter using a PNP-NPN pair of BJT's plus another PNP for auto reset feature.
- Same thing designed by professionals, soldered by me. No auto reset though.
- USB serial converter with FTDI, with auto reset feature. Requires special drivers in my OS. Comes ready made. Is tiny.

They all feature data traffic indicating LEDs.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Good to see you trying the transistors.

Once you've gotten used to them you would be surprised how handy it is to have a few general purpose transistors (both NPN and PNP) and resistors in stock.

They can be used for logic gates, voltage translation and even as simple amplifiers.

IC's are the simple solution but you don't usually learn much.

There are non-inverting RS232 interface IC's on the market.

Shit, I totally forgot: RS232 uses negative voltages. I don't think Arduino chips will accept that. The voltage dividers work beautifully by the way. -12V is nicely shifted to -4.27V.....

Yeah you read that right: negative. Those Picaxe boys really have got it goin' on for themselves!

From the 1st Picaxe manual:

Note that the two resistors are not a potential divider. The 22k resistor works with the internal microcontroller diodes to clamp the serial voltage to the PICAXE supply voltage and to limit the download current to an acceptable limit. The 10k resistor stops the serial input ‘floating’ whilst the download cable is not connected. This is essential for reliable operation.

Hmmm. The plot thickens and the likelihood of this scheme ever working verbatim on an arduino thingy shrinks. Time to start improvising and experimenting. 8-D

Rik, here is a schematic I have used to program my first Arduino compatible boards, before the FTDI cable came out with their specific pinout. I was using a MAX232 level converter for Tx, Rx and Rst pins from a DB9 serial connector. The pinout of the 5 pin connector at the left of the schematic is as follows:

pin 1 - GND
pin 2 - Vcc (5V) - provided by the target board, not from the serial port 
pin 3 - target board Rx pin
pin 4 - target board Tx pin
pin 5 - target board Rst pin 

If you look online at the original serial Arduino schematic, you will see that they used transistors for level conversion, I never tried this, but it works for sure. Build with what ever you have handy.


Well Rik, for serial programming you need the Arduino bootloader an some kind of serial ttl comms ... doesn't really matter how you go to that, as long as you get ttl :) 

Reset can be handled either the arduino way, DTR line I think, an yeah it would be a good idea to have a limiting resistor in there just to be safe... or the olde way by resetting the thing manually.

As for ISP or ICSP careful there, if you use it on an chip having the boot loader installed it *will* erase the bootloader when programming, so avoid it unless you want to skip the serial programming and get some more space on the chip.

I did not know that important difference between ISP and plain serial! I'm using a chip with Arduino bootloader already on board. So I will stay away from ISP thingies!

I'll experiment with an extended Picaxe circuit later this week.