You are on page 1of 7

Online Assignment-2

Department: Electronics and Communication Engineering


School: SECE Student Name : Harish nayak
Course Code: ECE110
Course Title: Practical Electronics Reg. Number : 12112873
Time duration: N.A. Max. Marks: 50
Roll Number: RE2101A137
Section: E2101 Marks Obtained:

Instructions:

1. You all have to prepare the project report which includes: (i). Complete circuit diagram, (ii). Complete program,
(iii). Working procedure of the project, and (iv). Learning outcome., for all five topics mentioned above.
2. Then upload your answer sheet in UMS by 18th December, 2021 (Saturday). Also mail your answer sheet at
ravi.14909@gmail.com
3. Copying the assignment from others is strictly prohibited . Though two students got a same set of project topics
to solve, the way of explanation could be different from one to another.
4. This regard “I will be comparing the answer sheets of all the students one another and also with the content
available in the internet too, before awarding marks”. So be careful and spend some of your time wisely on this
activity so as to gain the knowledge.
5. “Example of an answer sheet” is mentioned below, for your reference:

Q1. Line following Robot using Arduino. [10Marks]


Sol.
(i.a)CIRCIT DIAGRAM :
(ii)PROGRAM :

int mot1=9;
int mot2=6;
int mot3=5;
int mot4=3;

int left=13;
int right=12;

int Left=0;
int Right=0;

void LEFT (void);


void RIGHT (void);
void STOP (void);

void setup()
{
pinMode(mot1,OUTPUT);
pinMode(mot2,OUTPUT);
pinMode(mot3,OUTPUT);
pinMode(mot4,OUTPUT);

pinMode(left,INPUT);
pinMode(right,INPUT);

digitalWrite(left,HIGH);
digitalWrite(right,HIGH);

void loop()
{

analogWrite(mot1,255);
analogWrite(mot2,0);
analogWrite(mot3,255);
analogWrite(mot4,0);

while(1)
{
Left=digitalRead(left);
Right=digitalRead(right);

if((Left==0 && Right==1)==1)


LEFT();
else if((Right==0 && Left==1)==1)
RIGHT();
}
}

void LEFT (void)


{
analogWrite(mot3,0);
analogWrite(mot4,30);

while(Left==0)
{
Left=digitalRead(left);
Right=digitalRead(right);
if(Right==0)
{
int lprev=Left;
int rprev=Right;
STOP();
while(((lprev==Left)&&(rprev==Right))==1)
{
Left=digitalRead(left);
Right=digitalRead(right);
}
}
analogWrite(mot1,255);
analogWrite(mot2,0);
}
analogWrite(mot3,255);
analogWrite(mot4,0);
}

void RIGHT (void)


{
analogWrite(mot1,0);
analogWrite(mot2,30);

while(Right==0)
{
Left=digitalRead(left);
Right=digitalRead(right);
if(Left==0)
{
int lprev=Left;
int rprev=Right;
STOP();
while(((lprev==Left)&&(rprev==Right))==1)
{
Left=digitalRead(left);
Right=digitalRead(right);
}
}
analogWrite(mot3,255);
analogWrite(mot4,0);
}
analogWrite(mot1,255);
analogWrite(mot2,0);
}
void STOP (void)
{
analogWrite(mot1,0);
analogWrite(mot2,0);
analogWrite(mot3,0);
analogWrite(mot4,0);

}
(i.b)CIRCUIT RUN DIAGRAM :

(iii)WORKING PROCEDURE :

I created an Arduino-based Line Follower Robot in this project. The project's operation is
straightforward and identify the black line on the surface and travel along it.
To detect the line, I need sensors, as shown in the above run diagram. I employed two IR
Sensors, which are made up of an IR LED and a Photodiode, for line detection logic. They are
arranged in a reflecting manner, side by side, such that the light generated by the IR LED is
detected by the Photo diode whenever they come into contact with a reflective surface.
the light-colored surface has a high reflectivity, the infrared light emitted by the IR LED will be
reflected.
When the robot moves forward, both the sensors wait for the line to be detected. For example,
if the IR Sensor 1 in the above image detects the black line, it means that there is a right curve
(or turn) ahead.
Arduino UNO detects this change and sends signal to motor driver accordingly. In order to turn
right, the motor on the right side of the robot is slowed down, while the motor on the left side is
run at normal speed.
Similarly, if the IR Sensor 2 detects the black line first, the robot must turn left because there is a
left bend ahead. The motor on the left side of the robot is slowed (or stopped altogether or
twisted in the other direction) to allow the robot to turn left, while the motor on the right side is
run at normal speed.
The Arduino UNO continuously examines the data from both sensors and controls the robot in
accordance with the line that they detect.
(iv)LEARNING OUTCOME :

Q2. Home security alarm system using Arduino. ° [10Marks]


Sol.
Q3. Digital Thermometer using Arduino. [10Marks]
Sol.
(i.a)CIRCIT DIAGRAM :
(ii)PROGRAM :
#include <LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
int tempin = A0; // the output pin of LM35
int temp;
int cel;
int tempmin = 30;
int tempmax = 35;
int kel;
void setup() {
pinMode(tempin, INPUT);
Serial.begin(9600);
lcd.begin(16,2);
}

void loop() {
temp = analogRead(tempin);
cel = temp * 0.48828125;
kel= cel+ 273.15;
Serial.print(cel);
Serial.println();
lcd.print("celsius: ");
lcd.print(cel); // display the temperature(celcius)
lcd.print("C ");
lcd.setCursor(0, 1);// move cursor to next line
lcd.print("kelvin: ");
lcd.print(kel); // display the temperature(kelvin)
lcd.print("k ");
delay(200);
lcd.clear();

(i.b)CIRCUIT RUN DIAGRAM :


(iii)WORKING PROCEDURE :

I created an Arduino based digital thermometer in this project . the project’s operation is to
know the temperature and identify Celsius and Kelvin values . To identify the Celsius and Kelvin
value I need some LM35 and 16 * 2 crystal lattice display as shown in the above run diagram.
LM35 is a temperature measuring device having an analog output voltage proportion to the
temperature . It is a small and cheap IC which can be used to measure temperature anywhere
between -55°C to -150 °C
The working of the project start with the LM35 sensor that sense the change in temperature of
the surroundings and users that temperature difference to produce a voltage signal which is
possessed by the arduino to give a digital output displaying in 16*2 display the temperature of
the given surrounding .
Hence the arduino UNO continuously examines the data from LM35 sensor and indentifies the
temperature .

(iv)LEARNING OUTCOME :

Q4. Smart dustbin using Arduino. [10Marks]


Sol.
Q5. Automatic water level indicator and controller using Arduino. [10Marks]
Sol.

You might also like