Microcontroller
A microcontroller (MCU)is a tiny computer built into a single chip. It's made to
control small tasks in electronic devices — like turning on lights, controlling a
fan, or running a microwave.
It has everything it needs inside one chip:
• A processor (like a mini brain) to follow instructions,
• Memory to remember things (both temporarily and permanently),
• And input/output parts to talk to other devices or buttons and sensors.
Microcontrollers are used in things like washing machines, remote controls, cars,
and robots. They don’t do big jobs like full computers, but they’re perfect for
handling simple tasks quickly and reliably.
2
3.
Microprocessor
A microprocessor isa small electronic chip that acts like the brain of a
computer. It takes input (like numbers or instructions), does some math or
decision-making, and gives the output.
In simple terms, a microprocessor:
• Takes instructions from memory (like a list of tasks),
• Understands what to do (this is called decoding),
• Performs the task (like adding two numbers), and
• Gives the result.
Without a microprocessor, a computer wouldn’t be able to work. It controls
everything — from running games to opening apps and typing in documents.
So, just like your brain helps you think and make decisions, the
microprocessor helps a computer work by following instructions very quickly. 3
4.
Microprocessor vs Microcontroller
4
FeatureMicroprocessor Microcontroller
Main Job Solves general problems, like in
computers
Controls specific things, like in a
washing machine or remote
Memory Needs separate memory (not built-in) Has memory built-in (like RAM and
ROM)
Use Used in computers, laptops, printers Used in smart devices like A.C.,
microwave, robots
Difficulty More complicated Simpler and easier to use
Cost Usually more expensive Cheaper and used in low-cost devices
Power Use Uses more power Uses less power, more efficient
How It
Stores
Programs
Stores programs and data in the
same place
Keeps programs and data separate
(faster)
Key Parts ofArduino Uno R3
1️
1️
⃣ Microcontroller Chip (ATmega328P):
The “brain” of the Arduino. Runs your code and
controls input/output.8-bit AVR microcontroller
with 32 KB Flash memory.
DIGITAL I/O PINs (0 to 13):
2️
⃣
Pins used to read digital inputs (like a button) or
send digital outputs (like turning an LED
ON/OFF).Pins 0 & 1 are also used for Serial
Communication (RX, TX).
USB Port:
3️
3️
⃣
Connects Arduino to your computer. Used for
uploading code and for serial communication
(monitoring data).
4️
⃣ External Power Supply (DC Jack):
Lets you power the Arduino with an external 6
7.
5️
5️
⃣ 3.3V DCPin:
Provides 3.3V output for sensors and modules that
require lower voltage.
6️
⃣ 5V DC Pin:
Provides regulated 5V output. Powers external
modules and breadboard circuits. Comes from USB
or onboard voltage regulator.
7️
7️
⃣ GND (Ground):
Ground reference for the circuit. All circuits must
connect GND to complete the loop.
8️
⃣ Analog Input Pins (A0 to A5):
Read analog signals (like sensor
voltages).Converts analog voltage to digital values
(ADC).Useful for sensors like LDR, temperature,
potentiometers. 7
IR (Infrared) Sensors
•Function: Detect infrared light; used for object detection or remote
controls.
• Use in Arduino: Obstacle sensing robots, line followers, remote receiver/
transmitter.
11
IR LED (Transmitter):This is like a tiny flashlight that emits infrared light, which we
can’t see.
Photodiode or Phototransistor (Receiver): This part senses if any IR light comes
back.
How It Detects an Object:
The IR LED constantly sends out infrared light in a straight line.
If there’s no object, the light just goes away — nothing bounces back.
If there is an object in front, the light hits the object and reflects back to the
photodiode.
The photodiode picks up this reflected light
13
14.
Servo Motors
• Function:Rotates to a specific angle within a range (0°–180°).
• Use in Arduino: Precise position control — robots, RC cars, camera
gimbals.
14