Lesson 1: What is an Arduino ??

Introduction

Hello And Welcome to Electro Nerds Academy! This lesson marks the beginning of our Arduino series. Throughout this journey, we will explore the Arduino programming environment and learn how to integrate hardware components to build exciting projects.

But before diving in, let’s establish a solid understanding of what an Arduino is and how we can program it effectively.

What is Arduino??

Arduino is an open-source programmable circuit board designed for building electronic projects. It simplifies hardware prototyping, making it accessible to beginners and professionals alike.

Types of Arduino Boards:

Arduino offers over 100 hardware products, including microcontroller boards, shields, carrier kits, and accessories. Some popular models include

✔️ Arduino Leonardo – Features built-in USB communication

✔️ Arduino Nano – Small and compact, perfect for mini projects

✔️ Arduino Mega – More memory and I/O pins for complex projects

✔️ Arduino Uno – The most widely used board, ideal for beginners

In this lesson, we will focus on the Arduino Uno, which is widely recognized as the best starting point for learning.

Understanding Key Components On Arduino UNO Board:

  1. Reset Button: This button resets the Arduino board, i.e., start the program from the beginning. we can reset the UNO board in two ways. First, by pressing the reset button on the board. Second, we can connect GND potential to the RESET pin just above the 3.3V power pin.
  2. USB Port (Type-B): Used for powering the board and uploading code from a computer.
  3. USB-to-Serial Converter (ATmega16U2): Converts USB signals into serial data that the microcontroller understands. It Allows communication between the computer and Arduino.
  4. Crystal Oscillator (16 MHz): The 16 MHz quartz crystal oscillator provides the clock signal to the microcontroller. It ensures that instructions are executed at a precise and stable speed. Without the oscillator, the microcontroller wouldn’t run reliably.
  5. Voltage Regulator: Converts input voltage (from the barrel jack) to a stable 5V level that the microcontroller needs.
  6. Power Jack (Barrel Connector): Used to connect an external voltage source to power the Arduino. It Accepts 7-12V DC but the recommended voltage is 9V for stable performance.
  7. Power Pins:
    • 3.3V − Provides 3.3V output for low-power devices.
    • 5V − Provides stable 5V output for powering components like sensors. Most of the components used with Arduino board works fine with 3.3 volt and 5 volt.
    • GND(Ground) − There are several GND pins on the Arduino, any of which can be used to ground your circuit.
    • Vin − Accepts 7-12V power input for external power sources. Works similarly to the power jack.
  8. Analog Input Pins (A0-A5): These 6 analog pins are used to read analog sensor values. Convert real-world signals (e.g., temperature, light) into digital values. They can also be used to input and output digital signals just like a normal digital pin on the board.
  9. Microcontroller (ATmega328P): The brain of the Arduino Uno, responsible for executing code. A 16 MHz clock speed ensures fast processing. Contains 32 KB Flash memory, 2 KB SRAM, and 1 KB EEPROM for storing programs and data.
  10. ICSP Header (In-Circuit Serial Programming): The ICSP (In-Circuit Serial Programming) header is a set of six pins used for programming the microcontroller directly. It allows uploading firmware to the ATmega328P using an external programmer instead of the USB interface. Essential for burning bootloaders or updating the microcontroller when the USB port isn’t available.
  11. Power LED: Whenever the Arduino Board is powered ON this LED lights up.
  12. Pin 13 LED: A built-in LED connected to Digital Pin 13. Useful for testing without an external LED.
  13. Digital I/O Pins (0-13): There are 14 digital pins that can be set as either INPUT or OUTPUT. To read and output digital signals (HIGH/LOW). Digital pins preceded with a Tilde(~) symbol can also be used to output a PWM signal. The seven PWM pins are pins 3, 5, 6, 9, 10 and 11.
  14. AREF (Analog Reference Pin): This pin is used for setting a custom reference voltage for analog readings. Usually left unused unless working with precise analog sensors.
  15. ICSP Header for the ATMEGA 16U2 Microcontroller: By using these pins we can write sketches(programs) directly to the “ATmega16U2”, which is USB-serial conversion IC of Arduino Uno. we can add new features or write programs to support additional USB protocols, but it is very rarely used because it cannot be written by the Arduino IDE.
  16. RX and TX LED’s: TX (Transmit) LED Lights up when the Arduino sends data to the computer or another device. RX (Receive) LED – Lights up when the Arduino receives data from the computer or another device. These LEDs provide a quick visual indicator that serial communication is happening.

Powering The Arduino Board:

We can power our Arduino board in several ways, depending on our application and available power sources. Here are the main ways to power an Arduino Uno:

1️⃣ USB Power (5V via USB Port)

The Arduino can be powered using a USB Type-A to Type-B cable connected to a computer, power bank, or USB adapter. Provides 5V and up to 500mA (from a computer) or 1A+ (from a wall adapter).Used for both powering the board and uploading sketches.

Best for: Development, debugging, and short-term use.

2️⃣ DC Power Jack (7V – 12V) :

Uses a barrel jack (2.1mm center-positive) to connect an external power adapter. Accepts 7V to 12V DC, which is regulated down to 5V by the onboard voltage regulator.

Best for: Standalone projects that need stable external power.

3️⃣ Vin Pin (7V – 12V)

You can supply 7V – 12V directly to the Vin pin. The voltage regulator converts it to 5V for the board.

Best for: Powering from batteries or external power supplies.

4️⃣ 5V Pin (Direct 5V Input)

Supplying 5V directly to the 5V pin bypasses the onboard voltage regulator. Can be powered by an external regulated 5V power source.

⚠️ Risk: No overvoltage protection, so incorrect voltage can damage the board.

Best for: When using an external regulated 5V power supply.

Getting Started with Arduino Programming:

Arduino programming is done by writing software programs(known as sketches in Arduino Eco system). They are written in a simple language similar to C. These sketches have a .ino file extension.

Downloading The Arduino IDE:

To write and upload sketches to our Arduino UNO board, we use the Arduino Integrated Development Environment (IDE), which is freely available at arduino.cc website,

🔸Once you are at the arduino.cc website’s home page, click on the software tab at the top.

🔸Select the IDE depending on your operating system.

🔸then click on just download to download the IDE to your computer. The installation process is pretty straight forward. When prompted to install the necessary drivers make sure to allow it. Once installed, you will find the Arduino IDE shortcut on your desktop.

Exploring the Arduino IDE:

When you open the Arduino IDE, you will be prompted with an interface like this with some pre written code. We will get back to it shortly but lets first explore the important parts of the IDE.

1️⃣ Menus (File, Edit, Sketch, Tools, Help) – Provides various functions
2️⃣ Editor Window – The main area where you write your code
3️⃣ Compile Button – Checks the code for errors
4️⃣ Upload Button – Compiles and then uploads the code to the Arduino board
5️⃣ Serial Monitor – Displays data sent from the board
6️⃣ Serial Plotter – Graphically represents data

Connecting Your Arduino Uno to the PC For Programming

🔸Connect the Arduino Uno via USB A to B cable with your PC


🔸Open the Tools Menu and select the correct COM Port


🔸Under Board Options, select Arduino Uno

Now, you’re ready to write and upload your first sketch!

Uploading Your First Program: The “Blink” Example

Let’s conclude this lesson by uploading your first program, which will make the onboard LED (connected to pin 13) blink. Since you may not be familiar with coding yet, there’s no need to worry! The Arduino community has thoughtfully provided pre-written example sketches within the IDE to help beginners get started. We’ll use one of these built-in examples—called “Blink”—to run on our Arduino UNO. To do this,

🔸 Open the Files Menu and select Examples > Basics > Blink

🔸 A new window with the Blink sketch will open. Then simply click the upload button and wait for confirmation.

🔸 When you click the upload button the output window pops up. Any error or warning messages will be displayed here in this window. And also the compile and upload status of the program is shown here. As shown in the image below that the program is being compiled.

🔸 Once the program is compiled it will show done compiling after that the upload process will start and once the code is successfully uploaded to the Arduino UNO it will show done uploading as shown in the image below.

Once uploaded, observe your Arduino Uno’s built-in LED blinking at 1-second intervals. Congratulations! 🎉 You’ve successfully run your first Arduino program.

Leave a Comment

Your email address will not be published. Required fields are marked *