Let's Make Robots!

Home made AVR (Arduino) programmer "cable"

Cable used to program standalone AVR (Arduino) chips (ATMEGA328p)


This weekend I made me a "cable" to program my ATMEGA328p chips the Arduino way. As usual by design goal is to use what I have rather than buy a solution, in this case I'm not going for a MAX232 chip for the level shifting, but  doing it the discrete way with coponents I had laying around.

Closeup on circuit board



Solder side


Pins that goes into breadboard with AVR

The schematic is based on the one found here: http://www.uchobby.com/index.php/2007/06/11/ttl-to-rs232-adaptor-explained/ but I left out their R2 since I could not figure out what good is did there. On the other hand I added a 10K before the AVR pin2 to protect against an eventual sort circuit in the case we a software bug tries to pull up the RX pin2.

Somehow I seems not to be able to make the last image crystal clear, something with scaling I think.

UPDATE 15-Jan-2012: I have lowered the resistor between collector on the lower transistor and "AVR RX". It was 10K now its 1K. This was necessary  when using the circuit with my bluetooth interface modules.


Comment viewing options

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

Basile asked why I did not use the severino design (http://arduino.cc/en/uploads/Main/ArduinoSeverinoSchematic.png) for the discrete level shifting.

My design is quite close to the severino but one thing makes me wonder why both works.

The severino feeds the DTR to reset non inverted but in my design I invert the signal. (we both run it through a 100nF cap as well)

An other source of inspiration where http://avrprogrammers.com/bld-arduino-max232.php, which as far as I can tell also inverts the signal.  (and I expect the same to be true for my Duemilanove)

Anybody know if the Arduino IDE actually toggles the DTR pin more than a once when it uploads the program to the chip?

True, a max232 would have been a slicker option, but if you read my design goals you would understand why I did it the way I did. I did not have a max232 laying around.

Yes, I estimate it took me 8 hours to go from initial idea to finish:

  • some research on google, 60m
  • design the circuit, 90m
  • finding usable components in my boxes, 30m
  • making a prototype, 60m
  • testing and measuring electric characteristics, 30m
  • building, 120m
  • testing again, 30m
  • blogging, 60m

No, you don't have to use a max232 with my circuit here, it's actually the component it replaces.

to make that small circuit u took over 8hours huh?

anyway i gotta question we use the max 232 to step down to ttl level so instead of that ur using this?

or  do we have to connect this too to the max232