ARDUINOVA
ARDUINOVA
● 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).
WORKING PRINCIPLE
Code Explanation
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
Buzzer:
CIRCUIT DIAGRAM
LEDs:
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
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:
● Ultrasonic Sensor:
C
return;}
}
Calculates the distance based on the time and
Code Explanation speed of sound.
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.
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:
Switch Mechanism:
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.
irPin: Digital pin for IR sensor's output. LED turns ON (digitalWrite(ledPin, HIGH)).
ledState: Tracks LED state (ON/OFF). Second if block (sensorData == 0 && ledState):
Extensions
1. Home Automation
2. Gesture-Based Control
3. Power Optimization.
4. Integration with IoT
5. Security Systems:
6. Multi-device Control:
THANK YOU……………….