MakerLab
ArduinoArduino Duemilanove

Arduino Duemilanove: The Classic ATmega328P Workhorse

A foundational Arduino board that brought the ATmega328P to the masses, ideal for learning digital electronics and embedded programming.

Arduino Duemilanove

The Arduino Duemilanove, released in 2009, was a significant iteration in the Arduino family, marking a transition to the more capable ATmega328P microcontroller. It replaced the earlier ATmega168-based boards and became a de facto standard for hobbyists, students, and educators. Its straightforward design, coupled with the robust ATmega328P, made it an excellent platform for prototyping a wide range of electronic projects.

At the heart of the Duemilanove is the Atmel ATmega328P, an 8-bit AVR RISC microcontroller. This chip offers a good balance of processing power, memory, and peripheral capabilities for many common embedded tasks. It features a Harvard architecture, a set of 32 general-purpose working registers, and a rich instruction set that can be executed in a single clock cycle. The ATmega328P's popularity stemmed from its reliability, extensive documentation, and the ease with which it could be programmed using the Arduino IDE.

The Duemilanove sits as a mature and well-understood board within the Arduino lineage. It bridged the gap between earlier, more limited boards like the Diecimila and later, more feature-rich or connected boards like the Uno (which would soon adopt the same ATmega328P) or boards with integrated Wi-Fi. Its design prioritizes ease of use, with clearly labeled pins and a standard USB interface for programming and serial communication, making it particularly suitable for those new to microcontrollers or seeking a dependable platform for established projects.

This board is best suited for makers and students looking to dive into the fundamentals of digital logic, sensor interfacing, and basic automation. Its 5V operating voltage simplifies interfacing with many common electronic components, and its generous number of I/O pins allows for complex projects without immediate need for multiplexing or advanced expansion. For engineers, it serves as a reliable and cost-effective tool for rapid prototyping or for use in educational settings where a predictable and stable platform is paramount.

Watch

Related video, embedded from YouTube.

Specifications

Microcontroller / SoCAtmel ATmega328P
Architecture8-bit AVR RISC
Clock speed16 MHz
Flash / Storage32 KB (of which 0.5 KB used by bootloader)
RAM / SRAM2 KB
Operating voltage5V
Digital I/O pins14 (of which 6 provide PWM output)
Analog / ADC6 analog input pins (also usable as digital I/O pins), 10-bit resolution
PWM6 pins (Digital pins 3, 5, 6, 9, 10, 11)
ConnectivityNone built-in (requires external shields/modules)
USBFTDI FT232RL USB-to-Serial converter chip for programming and serial communication
Power input7-12V DC via barrel jack or VIN pin, or 5V via USB
Dimensions75mm x 53mm (approx. 2.95" x 2.09")

Pinout & pin functions

PinFunction
5VPower supply output (regulated 5V)
3.3VPower supply output (regulated 3.3V, generated by onboard regulator)
GNDGround
GNDGround
AREFAnalog Reference voltage
RESETResets the microcontroller
D0 (RX)Digital I/O, UART Receive
D1 (TX)Digital I/O, UART Transmit
D2Digital I/O
D3Digital I/O, PWM
D4Digital I/O
D5Digital I/O, PWM
D6Digital I/O, PWM
D7Digital I/O
D8Digital I/O
D9Digital I/O, PWM
D10 (SS)Digital I/O, SPI Slave Select
D11 (MOSI)Digital I/O, SPI Master Out Slave In
D12 (MISO)Digital I/O, SPI Master In Slave Out
D13 (SCK)Digital I/O, SPI Clock
A0Analog Input, Digital I/O
A1Analog Input, Digital I/O
A2Analog Input, Digital I/O
A3Analog Input, Digital I/O
A4 (SDA)Analog Input, Digital I/O, I2C Data
A5 (SCL)Analog Input, Digital I/O, I2C Clock
IOREFVoltage Reference for I/O pins (typically 5V on this board)
VINInput voltage (7-12V recommended)

Wiring & circuit basics

The Arduino Duemilanove can be powered in several ways. The most common is via the USB cable connected to a computer, which supplies 5V. Alternatively, a DC power adapter (7-12V recommended) can be plugged into the barrel jack, or a voltage source between 7-12V can be connected to the VIN pin. An onboard voltage regulator handles the conversion to the 5V required by the ATmega328P and other 5V components. It's crucial to stay within the recommended voltage range to avoid damaging the board or its components. Never apply more than 12V to VIN or the barrel jack.

The Duemilanove operates at a logic level of 5V. This means that a HIGH signal is typically 5V and a LOW signal is 0V. When interfacing with 3.3V devices, such as some modern sensors or microcontrollers, it is essential to use level shifting circuits to prevent damage to the 3.3V device. Conversely, when connecting a 5V output from the Arduino to a 3.3V input, a voltage divider or level shifter might be necessary to avoid over-volting the 3.3V device.

For a simple LED circuit, connect an LED's anode (longer leg) to a digital pin (e.g., D13) and its cathode (shorter leg) to one end of a resistor (typically 220-330 Ohms for a standard LED). Connect the other end of the resistor to a GND pin. When the digital pin is set to HIGH (5V), current flows through the resistor and LED, illuminating it. For an I2C sensor, connect its VCC to the 5V pin, its GND to a GND pin, its SDA pin to the Arduino's A4 (SDA) pin, and its SCL pin to the Arduino's A5 (SCL) pin. Ensure the sensor is 5V tolerant or use level shifters if necessary.

Programming & getting started

The primary toolchain for the Arduino Duemilanove is the Arduino IDE (Integrated Development Environment). This free software, available for Windows, macOS, and Linux, provides a text editor, a compiler, and an uploader. To get started, download and install the latest version of the Arduino IDE. Connect your Duemilanove to your computer via USB. In the IDE, select 'Arduino Duemilanove w/ ATmega328' from the Tools > Board menu and choose the correct COM port from the Tools > Port menu. You can then write your code (sketches) in the editor, verify it by clicking the checkmark button, and upload it to the board by clicking the arrow button.

For a first program, the classic 'Blink' sketch is ideal. It demonstrates basic digital output. After selecting the board and port, navigate to File > Examples > 01.Basics > Blink. This sketch will toggle the onboard LED (connected to digital pin 13) on and off every second. Uploading this sketch confirms that your board is recognized, the IDE is configured correctly, and the basic upload process works. This simple test is crucial for ensuring your setup is ready for more complex projects.

Project ideas

Simple LED FlasherThis project involves blinking an LED at a set interval using a digital output pin. It's a fundamental introduction to digital output and timing loops, using pins like D13 or any other digital pin and a current-limiting resistor.
Temperature and Humidity MonitorUtilize a DHT11 or DHT22 sensor connected to a digital pin (and potentially I2C pins for other sensors) to read environmental data. This project teaches sensor interfacing, reading analog or digital sensor values, and serial communication for displaying data.
Ultrasonic Distance SensorEmploy an HC-SR04 ultrasonic sensor connected to digital pins to measure distances. This project explores pulse timing, basic trigonometry, and using sensors for real-world measurements.
Basic Robot ControlDrive two DC motors using a motor driver IC (like an L298N) connected to digital pins for direction and PWM pins for speed control. This project introduces motor control, power management, and basic mobile robotics concepts.
I2C LCD DisplayInterface a 16x2 I2C LCD display with the Arduino using the A4 (SDA) and A5 (SCL) pins. This project teaches how to use I2C communication protocol and display textual information, useful for project status or user input.
Automated Plant Watering SystemCombine a soil moisture sensor (analog input) and a small water pump controlled by a relay or transistor (digital output) to automate plant care. This project integrates sensor input with actuator control for a practical home automation application.

Buying tips & gotchas

When purchasing an Arduino Duemilanove, be aware that many clones exist. While often cheaper, their quality can vary, and some may have subtle differences in pin mappings or component choices that could affect compatibility. Look for boards that clearly state they use the ATmega328P and have the standard Duemilanove layout. Common pitfalls include miswiring power (especially exceeding 12V on VIN) or connecting 5V logic directly to 3.3V components without level shifting. Accessories like a set of jumper wires, a breadboard, basic electronic components (resistors, LEDs, buttons), and a 7-12V DC power adapter are highly recommended for getting started.