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?

That's:
* 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.

... Single Sided Serial part of schematic as RoBotX suggested, I have built it and I can confirm it works, in fact you have seen the thing in Madrid working with your USB to serial converter you had with you.

On the other hand you can just get an FT232RL chip and build an USB to ttl serial converter ... yeah I did that too, unfortunately it is SMD and I think I lost the PCB files I used ... :(

Finally you can find a phone data cable for an older phone to get USB to 5V ttl conversion on the cheap side.

I had an old USB to  Cell phone cable and I made a FTDI-like cable 

similar to this: http://letsmakerobots.com/node/23728

 

http://www.arduino.cc/en/Main/ArduinoBoardSerial

It is a relatively simple transitor inverter to level convert from +-12v to 0-5v

But very useful nevertheless!This is the way I'll go about it. Thanks for finding me the link.

http://webzone.k3.mah.se/k3dacu/arduino/releases/serial_v2/arduino_rs232_v2.png

 

Better use this schematic, as it has autoreset and LEDs:

... as I had anticipated. The use of diodes and capacitors dumbfounded me. So I googled a bit and found an excellent explanation of this Sparkfun circuit:

http://www.uchobby.com/wp-content/uploads/2007/06/ttl2rs232.gif

The diode/cap provide a steady negative voltage supply, so that the circuit can produce negative voltages in order to signal from TTL uC to RS232 PC. The positive signals to the PC are "only" Vcc (+5V in my case), but most current PC's will accept that as a distinct signal. Even though dinosaurs once designed it to be higher than that, because they were running much longer cables than us.

The article does not explain the use of a diode (D2 in your circuit) between the base of the PC-to-uC-transistor (T1) and GND . The Sparkfun version has a pull down resistor (R2) instead. Perhaps a diode provides a cleaner signal than a resistor?

I refuse to build any circuit from scratch that I do not design myself (or at least fully understand). I might as well just buy a ready made solution off the shelf. Which I often do in daily life. This is not daily life. This is my hobby. My study. These are all my LMR. These must all belong to us.

The transistors have a max Veb of 6V.  One circuit uses a voltage divider the other uses a clamping diode,  they both keep Veb below 6v.

I have reasons to check my transistors already. This only adds to those reasns. Thanks for the heads up.

Rik, I can't explain how the transistor circuit works, as I never bothered with it. I always used a MAX232 for my circuit. Anyway, if you want, I can mail you a USB-serial cable, already converted to work with the uBotino.

This is between me and the 2n3904's now! 8-)

If I can't get it to work, I'll get the Sparkfun convertor. Or a proper all purpose USB-ftdi-TTL thingey. Like I said before: I want to "own" the design mentally. I may be cursing, but I'm cursing my way to self sufficiency.