0% found this document useful (0 votes)
7 views

Arduino-Buzzer-With-LDR-and-LED

This document provides a tutorial on creating an Arduino project that uses a Light Dependent Resistor (LDR) to activate a buzzer and an LED. It includes a list of required hardware, step-by-step instructions for assembly and wiring, as well as the necessary code for operation. The project aims to demonstrate how light can trigger an alarm system using Arduino components.

Uploaded by

Kim Dela Cruz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Arduino-Buzzer-With-LDR-and-LED

This document provides a tutorial on creating an Arduino project that uses a Light Dependent Resistor (LDR) to activate a buzzer and an LED. It includes a list of required hardware, step-by-step instructions for assembly and wiring, as well as the necessary code for operation. The project aims to demonstrate how light can trigger an alarm system using Arduino components.

Uploaded by

Kim Dela Cruz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

technology workshop craft home food play outside costumes

Arduino - Buzzer with LDR and LED


by MertArduino on November 15, 2016

Table of Contents

Arduino - Buzzer with LDR and LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: Arduino - Buzzer with LDR and LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: Hardware Required . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2: Buzzer - LED - LDR attach to board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 3: Arduino Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 4: Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 5: If it helps, please subscribe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

http://www.instructables.com/id/Arduino-Buzzer-With-LDR-and-LED/
Author:MertArduino Arduino Projects
I've just started a youtube channel, hoping to help people, share some of my knowledge and learn myself. My next Youtube (and Instructables) tutorials will
deal with different methods of controlling electronics (Smartphone-Bluetooth control, remote control and much more) and specifically robots. There will also
be videos about home automation (controlling every day appliances with your smartphone or computer using arduino). so make sure you are a subscriber so
you won't miss them, and I will see you next time. Bye ! Please Subscribe for more and Support

Intro: Arduino - Buzzer with LDR and LED


In this project; we will see using LDR to activate a buzzer and an LED. When light shines on LDR; the buzzer will give alarm and the LED will flash.

Step 1: Hardware Required


Arduino Uno
Buzzer
LED
LDR (photoresistor)
220 and 10k ohm resistor
Wires
Breadboard

Step 2: Buzzer - LED - LDR attach to board


1. Buzzer attach to board (the buzzer long leg (+) and short leg (-))
2. LED attach to board (the LED long leg (+) and short leg (-))
3. 220 resistor attach to board from LED long leg (+)
4. LDR attach to board
5. 10k resistor attach to board from LDR one leg

http://www.instructables.com/id/Arduino-Buzzer-With-LDR-and-LED/
http://www.instructables.com/id/Arduino-Buzzer-With-LDR-and-LED/
Step 3: Arduino Connection
1. The wire connect to ground, then the same wire attach to board.
2. The wire connect to buzzer short leg, then the same wire attach to GND on the board.
3. The wire attach to LED short leg, then the same wire connect to GND on the board.
4. The wire connect to 10k resistor empty leg, then the same wire connect to GND on the board.
5. The wire connect to +5V, then the same wire attach to LDR empty leg.
6. The wire connect to digital 12, then attach to buzzer long leg.
7. The wire connect to digital 13, then attach to 220 resistor empty leg.
8. The wire connect to A0, then attach to LDR's - resistor's same column.

http://www.instructables.com/id/Arduino-Buzzer-With-LDR-and-LED/
http://www.instructables.com/id/Arduino-Buzzer-With-LDR-and-LED/
Step 4: Code
const int ledPin = 13;

const int buzzerPin = 12;

const int ldrPin = A0;

void setup () {

Serial.begin(9600);

pinMode(ledPin, OUTPUT);

pinMode(buzzerPin, OUTPUT);

pinMode(ldrPin, INPUT);

void loop() {

int ldrStatus = analogRead(ldrPin);

if (ldrStatus >= 400) {

tone(buzzerPin, 100);

http://www.instructables.com/id/Arduino-Buzzer-With-LDR-and-LED/
digitalWrite(ledPin, HIGH);

delay(100);

noTone(buzzerPin);

digitalWrite(ledPin, LOW);

delay(100);

Serial.println("----------- ALARM ACTIVATED -----------");

else {

noTone(buzzerPin);

digitalWrite(ledPin, LOW);

Serial.println("ALARM DEACTIVATED");

Step 5: If it helps, please subscribe


First of all, I would like to thank you for reading this guide ! I hope it helps you.

If you want to support me, you can subscribe my channel and watch my videos.

Mert Arduino Tutorial & Projects

http://www.instructables.com/id/Arduino-Buzzer-With-LDR-and-LED/
Related Instructables

Experiment 2
Arduino play Fire detection How to use a Experiment with Grab Alarm Buzzer Alarm
(micro)music using Arduino Buzzer (or piezo Buzzer by Using arduino + Using LDR And
without shield and flame speaker) - pcduino LDR + piezo Arduino by
by ninuxi sensor by Arduino Tutorial buzzer by abhirooprobotics
TechPonder by ShrobonB
codebender_cc

Advertisements

Comments

http://www.instructables.com/id/Arduino-Buzzer-With-LDR-and-LED/

You might also like