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

Arduino Projects

The document outlines various Arduino projects, including a toll gate system, motion sensor control for electric bulbs, a clap switch, ultrasonic distance measurement, dancing lights, and a weather station using DHT11 sensor. Each project lists required materials, circuit diagrams, and Arduino code snippets for implementation. These projects demonstrate practical applications of Arduino in automation and measurement tasks.

Uploaded by

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

Arduino Projects

The document outlines various Arduino projects, including a toll gate system, motion sensor control for electric bulbs, a clap switch, ultrasonic distance measurement, dancing lights, and a weather station using DHT11 sensor. Each project lists required materials, circuit diagrams, and Arduino code snippets for implementation. These projects demonstrate practical applications of Arduino in automation and measurement tasks.

Uploaded by

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

1) Toll gate using ARDUINO

Materials
Required:-

1. Arduino UNO
2. Jumper Wires
3. Servo Motor
4. UltrasonicSensor
5. Breadboard

Circuit Diagram:
Arduino Code:
2)Motion Sensor Control Electric
Bulb | Home Automation

Required Components :
1. Arduino Uno
2. PIR Sensor
3. Relay
4. Electric Bulb
5. Connecting Cable
6. Male to Male Jumper Wires
Arduino Code:
//Tech Trends Shameer
//Control Electric Bulb using PIR Sensor

int pirsensor = 0;

void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT); //Connect the Signal Pin of relay to Pin 13
pinMode(4, OUTPUT); //Connect the Positive Pin of Buzzer to Pin 4
pinMode(2, INPUT); //Connect the Output pin of PIR Sensor to Pin 2

}
void loop() {
int pirsensor = digitalRead(2);
Serial.println(pirsensor);
if (pirsensor == 1)
{
digitalWrite(13, HIGH);
digitalWrite(4, HIGH);
}
else
{
digitalWrite(13,LOW);
digitalWrite(4, LOW);
}
delay(10);
}
3)Simple Arduino Clap Switch with
LED and Relay

Components Required for Arduino


Clap Switch
1. Arduino Uno
2. LM393 Sound Sensor Module
3. 5V Relay Module
4. Breadboard
5. Jumper wires kit
6. USB cable type A/B
Circuit Schematics

/***** www.arduinopoint.com *****/


/***** Arduino Clap Switch *****/
int SoundSensor=2; // LM393 Sound Sensor Digital Pin D0 connected to pin 2
int LED=3; // LED connected to pin 3
boolean LEDStatus=false;
void setup() {
pinMode(SoundSensor,INPUT);
pinMode(LED,OUTPUT);
Serial.begin(9600); //initialize serial
}
void loop() {
int SensorData=digitalRead(SoundSensor);
Serial.println(SensorData);//print the value
if(SensorData==1){

if(LEDStatus==false){
LEDStatus=true;
digitalWrite(LED,HIGH);
}
else if(LEDStatus==true){
LEDStatus=false;
digitalWrite(LED,LOW);
}}}
4) Ultrasonic distance measurement
using Arduino | Arduino project

Materials Required Distance Measurement


Sensor
1. Arduino UNO:
2. Jumper Wires:
3. Breadboard:
4. LCD Display With I2C Module:
5. Ultrasonic Sensor:
Circuit Diagram Ultrasonic Distance
Measurement

#include <Wire.h>
lcd.setCursor(9,0);
#include <LiquidCrystal_I2C.h>
lcd.print(" ");
LiquidCrystal_I2C lcd(0x27, 16, 2); lcd.setCursor(9,0);
#define trigPin A0 //Sensor Trig pin connected to Arduino pin A0 lcd.print( distance); //Print measured
#define echoPin A1 //Sensor Echo pin connected to Arduino pin distance
A1 lcd.print(" cm"); //Print your units.
long distanceInch; lcd.setCursor(9,1); //
lcd.print(" "); //Print blanks to
void setup()
{
clear the row
pinMode(trigPin, OUTPUT); lcd.setCursor(9,1);
pinMode(echoPin, INPUT); lcd.print(distanceInch);
lcd.init(); lcd.print(" inch"); //Print your units.
lcd.backlight();
lcd.clear(); delay(200); //pause to let things settle
lcd.setCursor(0,0);
}
lcd.print("Simple Circuits");
delay(2000);
lcd.clear();
lcd.setCursor(0,0); //Set LCD cursor to upper left corner, column
0, row 0
lcd.print("Distance:");//Print Message on First Row
lcd.setCursor(0,1);
lcd.print("Distance:");
}

void loop()
{
long duration, distance;
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;
distanceInch = duration*0.0133/2;
5)Dancing lights || LED chaser
circuit with 32 cool effects ||
Arduino Project
Components used & purchase links
1. Arduino Uno Board :
2. 9V battery with connector :
3. Rocker Switch
4. Red, Green & Blue LED Lights
5. 220 ohm resistor
6. Male to male jumper wires

Codes:
6).Arduino Weather Station || dht11
Temperature & Humidity sensor

Components : -
Arduino uno –

DHT11 Temperature & Humidity sensor –

16*2 LCD Display –

i2c LCD Display module-


Codes:
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line
display
byte degree_symbol[8] =
{
0b00111,
0b00101,
0b00111,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000
};
int gate=11;
volatile unsigned long duration=0;
unsigned char i[5];
unsigned int j[40];
unsigned char value=0;
unsigned answer=0;
int z=0;
int b=1;
void setup()
{
lcd.init(); // initialize the lcd
lcd.init();
lcd.backlight();
lcd.print("Temp = ");
lcd.setCursor(0,1);
lcd.print("Humidity = ");
lcd.createChar(1, degree_symbol);
lcd.setCursor(9,0);
lcd.write(1);
lcd.print("C");
lcd.setCursor(13,1);
lcd.print("%");
}

void loop()
{

delay(1000);
while(1)
{
delay(1000);
pinMode(gate,OUTPUT);
digitalWrite(gate,LOW);
delay(20);
digitalWrite(gate,HIGH);
pinMode(gate,INPUT_PULLUP);//by default it will become high due to internal pull up
// delayMicroseconds(40);

duration=pulseIn(gate, LOW);
if(duration <= 84 && duration >= 72)
{
while(1)
{
duration=pulseIn(gate, HIGH);

if(duration <= 26 && duration >= 20){


value=0;}

else if(duration <= 74 && duration >= 65){


value=1;}

else if(z==40){
break;}

i[z/8]|=value<<(7- (z%8));
j[z]=value;
z++;
}
}
answer=i[0]+i[1]+i[2]+i[3];

if(answer==i[4] && answer!=0)


{
lcd.setCursor(7,0);
lcd.print(i[2]);
lcd.setCursor(11,1);
lcd.print(i[0]);
}

z=0;
i[0]=i[1]=i[2]=i[3]=i[4]=0;
}
}

You might also like