0% found this document useful (0 votes)
35 views26 pages

ARDUINOVA

The document provides an overview of microcontrollers, microprocessors, and the Arduino platform, emphasizing their importance in modern electronics and prototyping. It includes detailed project descriptions, objectives, hardware requirements, working principles, and code examples for various Arduino projects such as LED blinking, intruder alarms, and sensor data reading. The document serves as a hands-on workshop guide for beginners and professionals to learn and innovate using Arduino technology.

Uploaded by

deepikaraj775
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views26 pages

ARDUINOVA

The document provides an overview of microcontrollers, microprocessors, and the Arduino platform, emphasizing their importance in modern electronics and prototyping. It includes detailed project descriptions, objectives, hardware requirements, working principles, and code examples for various Arduino projects such as LED blinking, intruder alarms, and sensor data reading. The document serves as a hands-on workshop guide for beginners and professionals to learn and innovate using Arduino technology.

Uploaded by

deepikaraj775
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

ARDUINOVA

HANDS-ON ARDUINO WORKSHOP


INTR0DUCTION TO MICROCONTROLLERS,
MICROPROCESSORS,& ARDUINO
THE HEART OF MODERN ELECTRONICS & PROTOTYPING

The rapid evolution of electronics and computing


is driven by microcontrollers and microprocessors.

These devices are at the core of modern


technology.

Understanding them is essential for electronics,


programming, and embedded systems.
MICROCONTROLLER VS MICROPROCESSOR

● Compact ICs for specific tasks (e.g., home ● Central Processing Unit (CPU) for
appliances, industrial automation). general-purpose computing (e.g., Intel
Core i7, AMD Ryzen).

● Peripherals: Built-in peripherals (memory, ● Peripherals: Requires external


I/O ports, timers). components for peripherals.

● Power Consumption: Low, suitable for ● Power Consumption: High, requires


battery-powered devices. external power sources.

● Use Cases:Automation, robotics, IoT. ● Use Cases: General-purpose devices like


computers.
ARDUINO: OPEN-SOURCE ELECTRONICS PLATFORM
FOR CREATING INTERACTIVE PROJECTS

● Combines user-friendly hardware and software.

● Controls sensors, motors, and other components.

● Accessible for beginners and professionals

Brief History of Arduino

● Developed in 2005 at the Interaction Design


Institute Ivrea, Italy.

● Created to provide affordable microcontroller


boards for students.

● Gained global popularity due to simplicity and


versatility.
ARDUINO UNO ARDUINO’S OPEN-SOURCE
APPLICATIONS OF
OVERVIEW ECOSYSTEM
ARDUINO
Key Features: Open-source hardware:
Allows customization and creation of Robotics: Build and control
Microcontroller: ATmega328P new boards. robots.
(brain of the board).
Free software (Arduino IDE): IoT: Smart devices, home
Power Jack: External power supply. Extensive code libraries for building, automation, and connectivity.
sharing, and modifying projects.
USB Port: Programming and Automation: Industrial
power. machine/process control.
Fosters innovation in robotics, IoT, and
Digital Pins: 14 for input/output (6 automation.
Prototyping: Rapid testing of
with PWM). electronic projects.

Analog Pins: 6 for analog input. Education: Teach programming


Microcontrollers and microprocessors form and electronics to beginners.
Reset Button: Restarts the board. the backbone of modern technology.
Wearables: Interactive wearable
Voltage Regulator: Maintains stable Arduino simplifies electronics prototyping for
gadgets.
power supply. beginners and experts.

Its versatility drives innovation across


industries like robotics, IoT, automation, and
education.
01 LED BLINKING WITH EXTERNAL LED USING BREADBOARD

02 INTRUDER ALARM USING USING ULTRASONIC SENSOR

03 READING SENSOR DATA: DHT SENSOR AND ULTRASONIC SENSOR WITH


SERIAL MONITOR

04 CONTROLLING DEVICES WITH INFRARED: USING IR AS A SWITCH WITH


ARDUINO
PROJECT 1: LED BLINKING WITH EXTERNAL LED USING BREADBOARD
OBJECTIVE HARDWARE REQUIREMENTS

To create a simple LED blinking circuit using an 1. Microcontroller:


Arduino and an external LED connected through Arduino Uno
a breadboard. 2. LED: Single-color LED
3. Resistor: 220Ω
4. Additional
Components:
Breadboard, jumper
wires, power source

WORKING PRINCIPLE

1. Digital Output Control: The Arduino controls


the LED by sending HIGH and LOW signals to
the pin connected to the LED.
2. Blinking Effect: A delay between switching
the LED ON and OFF creates a blinking effect
CIRCUIT DIAGRAM Code
#define ledPin 13
Connections:
void setup() {
● LED: pinMode(ledPin, OUTPUT);
○ Anode (longer leg) → Arduino Digital Pin 13 }
via a 220Ω resistor
void loop() {
○ Cathode (shorter leg) → Arduino GND
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
delay(1000);
}

Code Explanation

1. #define ledPin 13: Assigns the name ledPin


to Digital Pin 13 for better readability.
2. Setup: Configures the ledPin as an
OUTPUT.
3. Loop: Continuously turns the LED ON
(HIGH), waits for 1 second (delay(1000)),
turns it OFF (LOW), and waits for another
second, creating a blinking effect.
Demo Steps
1. Assemble the circuit on a breadboard as
per the circuit diagram.
2. Connect the Arduino to a computer or
power source via USB.
3. Upload the provided code using the
Arduino IDE.
4. Observe the LED blinking with a
1-second ON and OFF cycle.

Extensions
1. Multiple LEDs: Extend the circuit to
control multiple LEDs in different
patterns (e.g., sequential blinking).
2. Adjustable Timing: Use a potentiometer
to dynamically adjust the blinking speed.
3. IoT Integration: Add Wi-Fi or Bluetooth
modules to remotely control the LED
blinking.
PROJECT 2: INTRUDER ALARM USING USING ULTRASONIC SENSOR

OBJECTIVE HARDWARE REQUIREMENTS


1. Ultrasonic Sensor:
The objective of this project is to utilize an ultrasonic
HC-SR04
sensor to detect intrusions within a specified range 2. Microcontroller: Arduino
and trigger an alarm, such as a buzzer or LED light, to Uno

alert of the intrusion. 3. Alert Mechanisms:


Buzzer and LEDs
4. Additional Components:
Breadboard, jumper
wires, power source
WORKING PRINCIPLE Connections:
1. Ultrasonic Detection: The HC-SR04 ultrasonic sensor emits
Include a clear wiring diagram that
ultrasonic waves and measures the time taken for the echo to illustrates the following connections:
return after hitting an object.
● Ultrasonic Sensor:
2. Distance Calculation: The Arduino processes the sensor data to
○ VCC → Arduino 5V
calculate the distance to the object.
○ GND → Arduino GND
3. Triggering the Alarm: If the calculated distance is below a ○ Trigger Pin → Arduino Digital
predefined threshold, the Arduino activates the buzzer and LEDs Pin 9
to signal an intrusion. ○ Echo Pin → Arduino Digital Pin
8

Buzzer:
CIRCUIT DIAGRAM

● Positive Terminal → Arduino Digital


Pin 10
} ● Negative Terminal → Arduino GND

LEDs:

● Anode → Arduino Digital Pins 11, 12 (for


multiple LEDs)
● Cathode → Resistor → GND
Code void loop() { if (distance < 50 && distance >
0)
#define trigPin 9 long duration;
{
#define echoPin 8 int distance;
// Adjust threshold as needed
#define buzzer 10
digitalWrite(buzzer, HIGH);
#define ledPin 11 digitalWrite(trigPin, LOW);
digitalWrite(ledPin, HIGH);
delayMicroseconds(2);
}
void setup() {
digitalWrite(trigPin, HIGH);
else {
pinMode(trigPin, OUTPUT);
delayMicroseconds(10);
pinMode(echoPin, INPUT); digitalWrite(buzzer, LOW);
digitalWrite(trigPin, LOW);
pinMode(buzzer, OUTPUT); digitalWrite(ledPin, LOW);

pinMode(ledPin, OUTPUT); }
duration = pulseIn(echoPin, HIGH);
Serial.begin(9600); delay(100);
distance = duration * 0.034 / 2;
} }

}
Code Explanation
● pinMode(trigPin, OUTPUT): Sets Trigger pin as
#define trigPin 9 #define echoPin 8 #define buzzer output.
10 #define ledPin 11 ● pinMode(echoPin, INPUT): Sets Echo pin as
input.
#define: Used to assign names to pins for better ● pinMode(buzzer, OUTPUT): Sets buzzer pin as
output.
readability.
● pinMode(ledPin, OUTPUT): Sets LED pin as
output.
● trigPin: The pin connected to the Trigger pin of ● Serial.begin(9600)`: Starts serial
the ultrasonic sensor (HC-SR04). communication at 9600 baud.
● echoPin: The pin connected to the Echo pin of
Loop:
the ultrasonic sensor. ● void loop()`: Runs continuously.
● buzzer: The pin connected to the positive ● Sends 10-microsecond pulse to the Trigger
pin.
terminal of the buzzer. ● Measures the time for the Echo pin to receive
● ledPin: The pin connected to the positive the reflected wave.
● Converts time to distance (cm).
terminal of the LED.
● Checks if the distance is below 50 cm.
● If true: Activates buzzer and LED.
Setup: ● If false: Deactivates buzzer and LED.
-void setup(): Initializes pins and serial ● Pauses for 100 milliseconds before restarting.
communication.
Demo Steps
1. Connect all components as per the circuit
diagram.
2. Upload the provided code to the Arduino.
3. Test the system by placing objects at varying
distances. Observe the buzzer and LEDs
activating when the object is within the
threshold range.

Extensions
1. Relay Module Integration: Add a relay
module to control high-power alarms or
lights for more robust security applications.
2. IoT Integration: Use Wi-Fi modules like
ESP8266 to send alerts to a smartphone or
remote monitoring system in real-time.
PROJECT 3: READING SENSOR DATA: DHT SENSOR AND ULTRASONIC SENSOR
WITH SERIAL MONITOR

OBJECTIVE HARDWARE REQUIREMENTS

This project demonstrates how to read data from a 1. Arduino board (e.g.,
Arduino Uno, Nano)
DHT sensor (for temperature and humidity) and an
2. DHT sensor (DHT11 or
ultrasonic sensor (for distance) using an Arduino
DHT22)
microcontroller and display the readings on the serial
3. Ultrasonic sensor
monitor.
(HC-SR04)
4. Breadboard
5. Jumper wires
6. Resistor (10kΩ)
WORKING PRINCIPLE-DHT WORKING
SENSOR PRINCIPLE-ULTRASONIC
SENSOR
● Measures temperature and
humidity. ● Sends out high-frequency
● Converts physical data into sound waves via Trigger pin.
digital signals. ● Measures the time taken for
● Arduino reads data using the the wave to bounce back via
DHT.h library. Echo pin.
● Calculates distance
CIRCUIT DIAGRAM }

Connections:

● DHT Sensor:

VCC to 5V, GND to GND, Data to Digital


Pin 7.

● Ultrasonic Sensor:
C

VCC to 5V, GND to GND, Trigger to Pin 9,


Echo to Pin 10.
long distance = duration * 0.034 / 2; Float hic =
Code dht.computeHeatIndex(tempC,
return distance; hum);
#include <DHT.h> Serial.print("Temperature: ");
}
#define DHTTYPE DHT22 Serial.print(tempC);
void setup() {
#define DHTPIN 2 Serial.println(" °C");
Serial.begin(9600);
DHT dht(DHTPIN, DHTTYPE); Serial.print("Humidity: ");
dht.begin();}
#define TRIG_PIN 12 Serial.print(hum);
void loop() {
#define ECHO_PIN 11 Serial.println(" %");
delay(2000);
long readDistance() { Serial.print("Heat index: ");
float tempC = dht.readTemperature();
digitalWrite(TRIG_PIN, LOW); Serial.print(hic);
float hum = dht.readHumidity();
delayMicroseconds(2); Serial.println(" °F");
long dist = readDistance();
digitalWrite(TRIG_PIN, HIGH); Serial.print("Distance: ");
if(isnan(hum) || isnan(tempC)) {
delayMicroseconds(10); Serial.print(dist);
Serial.println("Failed toreadfrom DHT
digitalWrite(TRIG_PIN, LOW); sensor!"); Serial.println(" cm");

return;}
}
Calculates the distance based on the time and
Code Explanation speed of sound.

Include Libraries: Returns the calculated distance.

#include <DHT.h>: Include the DHT sensor library. setup() Function:

Define Constants: Initializes serial communication.

DHTTYPE: Define the type of DHT sensor (DHT11 or DHT22). Begins communication with the DHT sensor.

DHTPIN: Define the digital pin connected to the DHT sensor. loop() Function:

TRIG_PIN: Define the digital pin connected to the TRIG of the Waits for 2 seconds before taking new
ultrasonic sensor. measurements.

ECHO_PIN: Define the digital pin connected to the ECHO of the Reads temperature and humidity from the DHT
ultrasonic sensor. sensor.

Create DHT Object: Reads distance from the ultrasonic sensor.

DHT dht(DHTPIN, DHTTYPE);: Create a DHT object with the Checks for any errors in reading from the DHT
specified pin and type. sensor.
readDistance() Function: Calculates the heat index.
Sends a trigger pulse to the ultrasonic sensor.
Displays the temperature, humidity, heat index, and
distance on the serial monitor.
Measures the time taken for the echo to return.
Demo Steps
1. Step 1: Connect sensors to Arduino (as per
circuit diagram).
2. Step 2: Upload the code to Arduino.
3. Step 3: Open Serial Monitor.
4. Step4: Observe real-time data for
temperature, humidity, and distance.

Extensions
1. Multiple Sensors: Connect and read data from multiple DHT
or ultrasonic sensors.
2. Data Logging: Log data to an SD card for further analysis.
3. Real-time Display: Use LCD/OLED displays for real-time data.
4. Threshold Alerts: Set alerts (e.g., buzzer or LED) when data
crosses a set threshold.
PROJECT 4: CONTROLLING DEVICES WITH INFRARED: USING IR AS A SWITCH
WITH ARDUINO
HARDWARE REQUIREMENTS
OBJECTIVE
1. Arduino Board (e.g., Uno,
Nano)
The goal is to use an Infrared (IR) sensor to act as a
2. IR Sensor Module (or IR
touchless switch to control a device, such as an LED
receiver + IR LED pair)
or a relay. This can be extended to home automation 3. LED (to indicate switch
systems for appliances like lights, fans, etc. action)

4. Resistors (e.g., 220Ω for
LEDs)
5. Jumper wires
6. Breadboard
7. Power supply (5V USB or
external)
8. Relay module (optional for
controlling high-power
devices)
9. Device to control (e.g., a fan
or bulb via the relay)
WORKING PRINCIPLE

IR Sensor Basics:

An IR sensor detects infrared light emitted by an object. In this project, an IR


LED transmits IR light, and a photodiode receives the reflected light.

The intensity of the reflected light determines whether an object is detected


within the sensor's range.

Switch Mechanism:

● The IR sensor outputs a digital signal (HIGH or LOW).


● When the IR sensor detects an object (e.g., a hand), the signal changes
from LOW to HIGH (or vice versa).
● This signal triggers the Arduino to toggle the state of an output pin
connected to an LED or relay.
CIRCUIT DIAGRAM Connections:

IThe circuit includes:

1. IR Sensor Module:
○ VCC to Arduino 5V
○ GND to Arduino
GND
○ OUT to Arduino
Digital Pin (e.g.,
D2)
2. LED (connected to
Digital Pin D13 with a
220Ω resistor in series)
3. Optional Relay Module:
}
○ Signal pin to
another Arduino
digital pin
○ Power pins to VCC
and GND
sensorData = digitalRead(irPin);: Reads IR sensor's output.
CODE EXPLANATION
delay(500);: Debounces sensor input to prevent false toggles.

Variable Declarations First if block (sensorData == 0 && !ledState):

irPin: Digital pin for IR sensor's output. LED turns ON (digitalWrite(ledPin, HIGH)).

ledPin: Digital pin for the LED. ledState updated to true.

sensorData: Stores IR sensor readings (HIGH/LOW). Debug message: "Led is on."

ledState: Tracks LED state (ON/OFF). Second if block (sensorData == 0 && ledState):

setup() Function LED turns OFF (digitalWrite(ledPin, LOW)).

Serial.begin(9600): Initializes serial communication ledState updated to false.


for debugging.
Debug message: "Led is off."
pinMode(ledPin, OUTPUT): Configures LED pin as
output. Key Notes:State Management: ledState ensures smooth
toggling.Debounce Delay: Prevents unnecessary toggling from
pinMode(irPin, INPUT): Configures IR sensor pin as noise.
input.
Demo Steps
1. Setup the circuit and upload the code
to the Arduino.
2. Place your hand near the IR sensor; the
LED toggles on/off.
3. If using a relay, connect it to a
high-power appliance for switching.

Extensions
1. Home Automation
2. Gesture-Based Control
3. Power Optimization.
4. Integration with IoT
5. Security Systems:
6. Multi-device Control:
THANK YOU……………….

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy