MakerLab
ArduinoArduino NG

Arduino NG: The Classic ATmega168 Workhorse

Explore the capabilities of the Arduino NG, a foundational board in the Arduino ecosystem, powered by the ATmega168 microcontroller.

Arduino NG

The Arduino NG (New Generation) represents a significant step in the Arduino's evolution, released around 2006. It was designed to be an accessible and affordable platform for hobbyists, artists, and students to create interactive projects. Building upon the success of earlier Arduino boards like the Diecimila, the NG introduced minor improvements and served as a bridge to more advanced microcontrollers.

At its heart, the Arduino NG features the Atmel ATmega168 microcontroller. This 8-bit RISC processor boasts a respectable amount of flash memory and SRAM for its time, allowing for moderately complex programs. The ATmega168 is well-supported by the Arduino IDE, making it a familiar and comfortable choice for those new to embedded systems programming. Its robust feature set includes analog-to-digital converters, hardware serial communication, and PWM capabilities.

Positioned as a successor to earlier models, the Arduino NG offered a more refined development experience. It maintained the standard Arduino form factor, ensuring compatibility with existing shields and accessories. This board was instrumental in popularizing the Arduino platform, enabling a generation of makers to bring their digital ideas to life with relative ease. It's particularly well-suited for beginners learning fundamental electronics and programming concepts, as well as for intermediate users developing projects requiring a stable and reliable platform.

The NG board typically came in two versions: Arduino NG and Arduino NG Rev. C. While largely similar, subtle differences in component placement or voltage regulation might exist. For most practical purposes, they offer the same core functionality. The ATmega168's capabilities, while modest by today's standards, are sufficient for a wide range of applications, from simple blinking LEDs to controlling sensors and actuators in more complex systems.

Watch

Related video, embedded from YouTube.

Specifications

Microcontroller / SoCAtmel ATmega168
Architecture8-bit AVR RISC
Clock speed16 MHz
Flash / Storage16 KB (for program code)
RAM / SRAM1 KB
Operating voltage5V
Digital I/O pins14
Analog / ADC6 (10-bit resolution)
PWM6 (on digital pins 3, 5, 6, 9, 10, 11)
Connectivityโ€”
USBATmega8U2 (for serial communication/programming)
Power input7-12V recommended via DC barrel jack or Vin pin, 5V via USB or header
Dimensions70mm x 53mm (2.75in x 2.09in)

Pinout & pin functions

PinFunction
GNDGround
GNDGround
5VPower output (regulated 5V)
3.3VPower output (regulated 3.3V)
AREFAnalog Reference voltage
RESETReset button input
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 Serial 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

Wiring & circuit basics

Powering the Arduino NG requires careful attention to voltage and current. The board can be powered via its DC barrel jack (7-12V recommended) or the Vin pin, which are regulated down to 5V by an onboard voltage regulator. Alternatively, it can be powered by 5V from a USB connection or a stable 5V external supply connected to the 5V header pin. Avoid supplying more than 12V to the barrel jack or Vin pin, as this can overheat and damage the regulator. Ensure any external power supply can provide sufficient current for the board and any connected components, typically at least 500mA.

The Arduino NG operates at a logic level of 5V. This means that digital HIGH signals are 5V and LOW signals are 0V. When interfacing with components that operate at different logic levels, such as 3.3V sensors or modules, a logic level converter is essential to prevent damage. Connecting a 5V output directly to a 3.3V input can destroy the sensor. Conversely, connecting a 3.3V output to a 5V input may not be reliably detected as HIGH by the Arduino.

For a basic LED circuit, connect the anode (longer leg) of an LED to a digital pin (e.g., D13) through a current-limiting resistor (typically 220-330 ohms). Connect the cathode (shorter leg) of the LED to a GND pin. This setup allows you to control the LED's state (ON/OFF) via the digital pin. For an I2C device like a sensor, connect its SDA pin to the Arduino's A4 (SDA) pin, its SCL pin to the Arduino's A5 (SCL) pin, its VCC to the Arduino's 5V pin, and its GND to a GND pin. Remember that I2C devices often require pull-up resistors on SDA and SCL, which are sometimes included on breakout boards or may need to be added externally.

Programming & getting started

The primary toolchain for the Arduino NG is the Arduino IDE, available for Windows, macOS, and Linux. Download the latest version from the official Arduino website. Once installed, select 'Arduino NG or older' from the Tools > Board menu and the correct COM port under Tools > Port. To upload your first program, you can use the 'Blink' example sketch (File > Examples > 01.Basics > Blink). Connect the Arduino NG to your computer via USB, click the 'Upload' button in the IDE, and the sketch will be compiled and transferred to the microcontroller. The onboard ATmega168 is programmed via the USB interface using the bootloader.

While the Arduino IDE is the most common method, advanced users might explore alternative development environments like PlatformIO, which offers more sophisticated project management and debugging capabilities. However, for beginners, the standard Arduino IDE provides a straightforward path to getting started with programming the Arduino NG and understanding the core concepts of embedded development.

Project ideas

Simple LED ControlControl an LED to blink, fade, or react to button presses. Uses digital output pins and potentially analog input for buttons. Teaches basic digital I/O and PWM concepts.
Temperature and Humidity MonitorInterface with a DHT11 or DHT22 sensor using digital pins to read environmental data. Teaches sensor interfacing and data logging.
Basic Robot MovementControl two DC motors via a motor driver IC (like the L298N) using digital pins for direction and PWM pins for speed. Introduces motor control and basic robotics.
I2C LCD DisplayConnect a 16x2 I2C LCD screen to display sensor readings or messages. Utilizes the I2C communication protocol (pins A4/A5) and teaches serial communication with peripherals.
Simple Alarm SystemCombine motion sensors (PIR) and buzzers/LEDs. The PIR sensor detects movement (digital input), triggering an alarm output. Teaches interrupt handling and basic security systems.
MIDI SynthesizerUse digital pins to read button presses representing musical notes and output MIDI signals via the serial port (TX/RX). Explores digital input, serial communication, and basic music synthesis.

Buying tips & gotchas

When purchasing an Arduino NG, be aware that it's an older board. New ones are rare, and you'll likely find them on the used market or as part of older kits. Genuine Arduino boards are generally reliable, but many clones exist. Clones are often cheaper but may have variations in component quality or pin mappings, so check specifications carefully. Ensure the board you buy has the ATmega168 chip, as some later 'NG' boards might have used other variants. Common pitfalls include powering the board with incorrect voltage or polarity, and incorrectly wiring 3.3V components to the 5V logic. Essential accessories include a USB cable (usually Type-A to Type-B), jumper wires, breadboards, and a selection of basic electronic components like LEDs, resistors, and buttons.