AVR ATmega64/32/16 Extension Board

May 18th, 2008

During my current robotic project I was using ATTiny26 with L298 motor controller on one universal board, accelerometer on another board (home etched), serial level converter (max232) on yet another universal board and for programming I was using another (fourth) board...

It was modular - ok, but I got tired with all the wires, problems, keeping code below 2KB level and that's why I designed, ordered, soldered and tested new board implementing all required features. I just wanted to share the PCB schemas and ideas. Keep in mind that it's mine third board design ever. Previous designs shall not be commented (I know they are awful)...


  1. No SMD packages (except for accel which has no version but LCC8). This might be disadvantage but it's very convenient for electronic beginners. My future designs will be mostly SMD... Also I was using only popular parts that I can get easily.
  2. Designed for ATMega64 (the most powerful Atmel µController sold in DIP packaging), yet it should be pin compatible with ATmega32 and ATmega16.
  3. Voltage stabilization using 7805
  4. Two motors controlled using L298 (46V / 4A max) with selectable PWM inputs (jumpers on PCB)
  5. MAX232N with one communication channel hard-wired to AVR serial, second simply led out.
  6. Analog VCC filtering + separate analog ground plane + separated analog pins.
  7. 2-axis Analog Devices accelerometer hard-wired to PA0, PA1, PA2 with selectable reference voltage.
  8. GPIO outputs, TWI pull-ups, quartz, 4 stabilized VCC+GND connectors
  9. Programmable with ISP10Pin connector. (Which can be connected directly to LPT port using 4 resistors and cable)
  10. Routed by hand - no preservatives!
  11. 90mm x 65mm dimensions

Board screenshots:

I've ordered and soldered two boards, tested only one. Tests show that power stabilization, serial communication, accel wiring, isp10pin programmer and quartz are perfectly ok. L298 still needs testing. Coming soon. ;) (Update: Tested and works! Remember to turn off JTAG to work in default pin configuration)

Second board soldered:
ATmega64/32 board
Additional photos: Top view, in device

Handy pinout: PDF, ODG

Eagle project files: .sch file, .brd file

Notes: There are 2+1 possible powering scenarios of this PCB:

  1. One external power between 7.5V and 20V. The "Common" jumper is closed, voltage given at "POWER" pins. 7805 stabilizes power for µC.
  2. Separate supplies; motors supply on "POWER" connector, µC supply of 5V (externally stabilized) on the "VCCLINE". "Common" jumper is opened and 7805 not used.
  3. Separate supplies; motors supply on "POWER" connector. µC VCC >=7.5V connected to one pin of "Common" jumper and is stabilized using 7805. GND is always one.

Any ideas what should have been done differently? Especially in RLC part (in which I suck)? Did you like it? Any ideas how to enhance it? For e.g. I'd like to have RF transmitter on board, but this parts are far from generic and accessible...

Comment by bla repository » Archive » Inverted pendulum, balancing robot

submitted on October 12th, 2008 at 01:43

[...] board for this design is described here and it uses ATmega644 µC. Currently the code reached 10kB mostly because of floating point [...]

Comment by Josh

submitted on October 26th, 2009 at 21:34

You definitely want to include diode protection against back EMF as outlined in the L298 datasheet. This protects the L298! Other than that, your design is very much similar to what I've been working on :)

Add a comment [+] Hide the comment form [-]

I'm a bot, please ignore this comment.

I'm not a bot. Tick this box.

This is a mail of my good friend who loves rubbish email. Send him some if you want to land on my not-so-welcome lists: John Sparrow john@thera.be john(at)thera.be