You Need Arduino, Trust Me – Microcontrollers run the world!
Arduino is an open source platform that uses a software(computer program) together with hardware to implement certain instructions. Do you have interest in Arduino? I believe that after this brief insight, you will have an interest to try it out. The good news is that no specific technological knowledge whatsoever is required for newbies. Information about hundreds of arduino codes and projects are available in the internet for you to make use of. You can modify them to suit you whenever need be.
I have worked on a project and felt the need to share it with you. Once you have the materials needed, you can try it out wherever you are.
Below is the problem it solves:
Check if the temperature is within the preset limits, if not, light alarm( buzzer). Detect motion, if motion is sensed, light the buzzer and the fan. Use LEDs to differentiate buzzer beeps for temperature and motion detection. Use LCD to display ‘Presence of Motion’.
Apparatus required include:
2 breadboards, Temperature sensor(LM 35), Buzzer, Motion sensor, Fan, LCD, 2 LEDs( green and red), potentiometers, wires, resistors, Arduino Uno.
You are required to write an arduino computer program and make connections that use the program to solve the above problem. the following are some setup pictures and the implementation code I did.
The following pictures give the overall experimental setup.
Project Schematics by Proteus Professional
The following image shows the project schematics with the actual connection of the apparatus.
Type this code into your Arduino text editor and deploy it to the arduino Uno.
Name : TempSensorandMotionSensor.ino
Created : 5/11/2020 7:59:19 PM
Author : K.O Otiato
// include the library code:
// initialize the library by associating any needed LCD
interface pin with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
//Assigning the analog pins
const int tempSensor = A1;
//Assigning digital pins
const int buzzer = 7;
const int fan = 8;
const int motionLED = 10;
const int motionSensor = 6;
const int tempLED = 13;
//declare all other variables
int motionValue ;
// the setup function runs once when you press reset or power
// set up the LCD’s number of columns and rows:
// the loop function runs over and over again until power down
vout = analogRead(tempSensor);
motionValue = digitalRead(motionSensor);
tempValue = (vout * 500) / 1023; // Storing value in
} if (
motionValue != 0)
if ( motionValue != 0 && tempValue>20)
} lcd.setCursor(0, 0);
} else if (
motionValue == 0)
if (motionValue != 0 && tempValue>20)
} lcd.setCursor(0, 0);
delay(1000); //Delay of 1 second for ease of viewing
With these done you are ready to go. You have successfully implemented an arduino program!
This project can find wide usage in security systems and automatic temperature displays.