Arduino Duemilanove ATmega168: A Deep Dive into a Classic
Explore the features, capabilities, and legacy of the Arduino Duemilanove ATmega168, a foundational board for many makers.
The Arduino Duemilanove ATmega168, released around 2008, represents a significant step in the Arduino's evolution, building upon earlier designs with increased memory and improved power management. It features the Atmel ATmega168 microcontroller, a popular 8-bit AVR RISC processor, which provided a good balance of processing power, peripheral availability, and low cost for its time. This board was instrumental in bringing microcontroller programming to a wider audience, making it accessible to hobbyists, students, and artists.
At its core, the ATmega168 is an 8-bit AVR microcontroller based on the RISC architecture. It boasts 16KB of Flash memory for program storage, 1KB of SRAM for runtime variables, and 512 bytes of EEPROM for non-volatile data. With 23 general-purpose I/O (GPIO) pins, multiple timers, analog-to-digital converters (ADCs), and serial communication interfaces (UART, SPI, I2C), it offered a robust platform for a wide range of embedded projects. The Duemilanove specifically improved upon its predecessors by offering a more stable power supply and a clearer pin layout.
As part of the Arduino family, the Duemilanove ATmega168 shares the same open-source philosophy and easy-to-use development environment (the Arduino IDE). It sits between earlier boards like the Diecimila and later, more powerful boards like the Uno (which also uses an ATmega microcontroller but typically a larger one like the ATmega328P). The Duemilanove was designed for makers who needed more than the very basic capabilities of earlier Arduinos but didn't require the advanced features or higher processing power of more complex microcontrollers. Its 16MHz clock speed and ample I/O made it suitable for interactive projects, sensor reading, and basic control tasks.
The Duemilanove ATmega168 is an excellent choice for beginners taking their first steps into physical computing, as well as for intermediate makers looking for a reliable platform for projects that don't demand cutting-edge performance. Its straightforward programming model, extensive community support, and readily available libraries make it easy to learn and implement complex functionalities. It's particularly well-suited for educational purposes and for developing proof-of-concept prototypes where simplicity and cost-effectiveness are key considerations. Its legacy continues to influence modern microcontroller development boards.
Watch
Related video, embedded from YouTube.
Specifications
| Microcontroller / SoC | Atmel ATmega168 |
| Architecture | 8-bit AVR RISC |
| Clock speed | 16 MHz |
| Flash / Storage | 16 KB (of which 2 KB used by bootloader) |
| RAM / SRAM | 1 KB |
| EEPROM | 512 Bytes |
| Operating voltage | 5V |
| Digital I/O pins | 23 (of which 13 can be used as PWM outputs) |
| Analog / ADC | 8 channels, 10-bit resolution |
| PWM | 6 channels (on pins 3, 5, 6, 9, 10, 11) |
| Connectivity | UART, SPI, I2C |
| USB | ATmega168 does not have native USB; FTDI FT232RL USB-to-Serial chip for programming and serial communication |
| Power input | 7-12V DC via barrel jack or VIN pin, or 5V via USB or 5V pin |
| Dimensions | 70mm x 53mm |
Pinout & pin functions
| Pin | Function |
|---|---|
| GND | Ground |
| GND | Ground |
| 5V | 5V Power Output |
| 3.3V | 3.3V Power Output (regulated from onboard regulator) |
| AREF | Analog Reference Voltage |
| RESET | Reset Pin |
| D0 (RX) | Digital I/O, UART Receive |
| D1 (TX) | Digital I/O, UART Transmit |
| D2 | Digital I/O |
| D3 | Digital I/O, PWM |
| D4 | Digital I/O |
| D5 | Digital I/O, PWM |
| D6 | Digital I/O, PWM |
| D7 | Digital I/O |
| D8 | Digital I/O |
| D9 | Digital I/O, PWM |
| D10 (SS) | Digital I/O, SPI Slave Select |
| D11 (MOSI) | Digital I/O, SPI Master Out Slave In, PWM |
| D12 (MISO) | Digital I/O, SPI Master In Slave Out |
| D13 (SCK) | Digital I/O, SPI Serial Clock |
| A0 | Analog Input, Digital I/O |
| A1 | Analog Input, Digital I/O |
| A2 | Analog Input, Digital I/O |
| A3 | Analog Input, Digital I/O |
| A4 (SDA) | Analog Input, Digital I/O, I2C Data |
| A5 (SCL) | Analog Input, Digital I/O, I2C Clock |
| VIN | Power Input (7-12V recommended) |
| IOREF | I/O Reference Voltage (typically 5V) |
Wiring & circuit basics
Powering the Arduino Duemilanove ATmega168 requires careful consideration to avoid damage. The board can be powered via its DC barrel jack (7-12V recommended, with a current rating of at least 1A for most projects) or the VIN pin. An onboard voltage regulator steps this down to a stable 5V for the microcontroller and I/O pins. Alternatively, a regulated 5V supply can be connected directly to the 5V pin, or via the USB port when connected to a computer or USB power adapter. Avoid connecting voltages higher than 5V directly to the 5V pin, as this can damage the microcontroller.
The Duemilanove operates at a logic level of 5V. This means that when a digital pin is HIGH, it outputs approximately 5V, and when it reads a HIGH signal, it expects a voltage close to 5V. When interfacing with sensors or modules that operate at 3.3V, a logic level shifter is necessary to prevent damage to the 3.3V device. Conversely, if you are using a 5V-tolerant sensor that outputs a 3.3V signal, the Duemilanove will typically recognize it as HIGH, though it's good practice to check the specific sensor's datasheet.
A common beginner project is to blink an LED. Connect the longer leg (anode) of an LED to a digital pin that supports PWM, such as D9, through a current-limiting resistor (typically 220-330 ohms). Connect the shorter leg (cathode) of the LED to a GND pin. The resistor is crucial to prevent the LED from drawing too much current and burning out the microcontroller pin or the LED itself. The Arduino IDE code would then toggle this pin HIGH and LOW to make the LED blink.
Programming & getting started
The primary toolchain for the Arduino Duemilanove ATmega168 is the Arduino Integrated Development Environment (IDE). Download and install the latest version of the Arduino IDE from the official Arduino website. Once installed, connect the Duemilanove to your computer via a USB cable. In the Arduino IDE, select 'Arduino Duemilanove w/ ATmega168' from the Tools > Board menu and choose the correct COM port under Tools > Port. To upload your first program, you can use the 'Blink' example sketch (File > Examples > 01.Basics > Blink), modify the delay times if desired, and click the Upload button.
For more advanced development or alternative environments, PlatformIO is a popular choice, offering better project management and support for various frameworks. While the ATmega168 doesn't natively support MicroPython or CircuitPython, these environments are designed for more capable microcontrollers. The Arduino IDE's C/C++ based language, however, is well-documented and has a vast library ecosystem, making it the most practical and widely supported method for programming this board.