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.
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 / SoC | Atmel ATmega168 |
| Architecture | 8-bit AVR RISC |
| Clock speed | 16 MHz |
| Flash / Storage | 16 KB (for program code) |
| RAM / SRAM | 1 KB |
| Operating voltage | 5V |
| Digital I/O pins | 14 |
| Analog / ADC | 6 (10-bit resolution) |
| PWM | 6 (on digital pins 3, 5, 6, 9, 10, 11) |
| Connectivity | โ |
| USB | ATmega8U2 (for serial communication/programming) |
| Power input | 7-12V recommended via DC barrel jack or Vin pin, 5V via USB or header |
| Dimensions | 70mm x 53mm (2.75in x 2.09in) |
Pinout & pin functions
| Pin | Function |
|---|---|
| GND | Ground |
| GND | Ground |
| 5V | Power output (regulated 5V) |
| 3.3V | Power output (regulated 3.3V) |
| AREF | Analog Reference voltage |
| RESET | Reset button input |
| 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 |
| 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 |
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.