ECE - 542L Exam 4 Course Outcome:: Rubrics

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

ECE – 542L

EXAM 4
Course Outcome:
Implement microcontroller based system using different levels of implementation.

Objective:
To be able to create a monitoring system using a microcontroller that will display the
acquired data in LCD from sensors.

Statement of the Problem:


In the mall or any other establishment utilized by the public, it is important to know the number of
person entering the establishment and also the current temperature of the surroundings so that air
conditioners can adjust to the number of people present. In order for us to be aware of the
temperature and number of people, you are to design a system that will allow the temperature to
be monitored in an LCD display and give another option to count the persons who enters the
building.

Rubrics:
Functionality (50%)
- 50 if 100% functional base on what is required in the problem.
- 40 if 90% functional base on what is required in the problem.
- 30 if 80% functional base on what is required in the problem.
- 20 if 70% functional base on what is required in the problem.
- 10 if 60% and below functional base on what is required in the problem.
Schematic Diagram and Code (35%)
- 35 if all the needed components in the schematic are simplified which result to
a smaller but functional circuit as well as the code.
- 25 if the schematic is somehow simplified resulting to a larger circuit compared
to the simplified as well as the code.
- 15 if the schematic is not simplified at all as well as the code.
Complete Document (15%)
- 15 if the documents are complete.
- 10 if the documents are 70% complete.
- 5 if the submitted documents are less than 70% complete.

Conceptual Framework:

INPUT PROCESS OUTPUT

-LM35 -Arduino UNO -LM016L


-LDR Sensor (LCD Display)
-Button
Circuit Diagram:

Source Code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,16,2);
const int bp0 = 0;
const int bp1 = 2;
const int sPin3 = 3;

int bState0 = LOW;


int bState1 = LOW;

int y=0;
int i=0;

float temp;
void setup() {
int x=0;
Serial.begin(9600);
analogReference(INTERNAL);
lcd.init();
lcd.backlight();
lcd.noBlink();
lcd.setCursor(0,0);
lcd.print("-MenuSelection-");
lcd.setCursor(0,1);
lcd.print(" by:Alcoriza");
//Selector
delay(2000);
lcd.clear();
lcd.setCursor(0,0);
lcd.blink();
lcd.print("1Temp Display");
lcd.setCursor(0,1);
lcd.print("2Counter Display");
//Navigator
pinMode(bp0, INPUT_PULLUP);
pinMode(bp1, INPUT_PULLUP);
pinMode(sPin3, INPUT_PULLUP);
//Blinking
lcd.setCursor(0,0);
lcd.noBlink();
delay(150);
lcd.blink();
delay(150);
}
void loop() {
bState0 = digitalRead(bp0);
bState1 = digitalRead(bp1);
Serial.println(bState0);
Serial.println(bState1);
delay(150);
if (bState1 == HIGH)
{
if(y==0){
tempread();
}
else if(y==1){
sense();
}
}
if (bState0 == LOW)
{
if (y==0)
{
lcd.setCursor(0,1);
delay(200);
y=1;
}
else if (y==1)
{
lcd.setCursor(0,0);
delay(200);
y=0;
}
}
}
void tempread(){
lcd.clear();
lcd.setCursor(0,0);
lcd.noBlink();
do{
//Temp
temp = analogRead(A1);
temp=temp*1100/(1024*10);
bState1 == LOW;
lcd.setCursor(0,0);
lcd.print(" -Temperature- ");
lcd.setCursor(5,1);
lcd.print(round(temp));
lcd.println("'C ");
delay(100);
//back
bState1 = digitalRead(bp1);
Serial.println(bState1);
delay(100);
if (bState1 == HIGH)
{

break;
delay(200);
}
}while(1);
goback();
}
void sense(){
int x=0;
lcd.clear();
lcd.setCursor(0,1);
lcd.print("-#of Passersby-");
lcd.noBlink();
lcd.setCursor(6,0);
lcd.print(i);

do{
int sPstate3= digitalRead(sPin3);
Serial.println(sPstate3);
delay(10);
if (sPstate3==LOW & x==0)
{
i++;
lcd.setCursor(6,0);
lcd.print(i);
delay(10);
x=1;
}
if(sPstate3==HIGH & x==1)
{
delay(10);
x=0;
}
bState1 == LOW;
//////back
bState1 = digitalRead(bp1);
Serial.println(bState1);
delay(100);
if (bState1 == HIGH)
{

break;
delay(200);
}

}while(1);
goback();
}

void goback(){
lcd.clear();
bState0 = LOW;
bState1 = LOW;
delay(50);
y=0;

lcd.setCursor(0,0);
lcd.print("1Temp Display");
lcd.setCursor(0,1);
lcd.print("2Counter Display");

lcd.setCursor(0,0);
lcd.noBlink();
delay(150);
lcd.blink();
delay(150);

loop();

Materials and Costs:


Materials Quantity Cost
Arduino UNO 1 200
LCD-I2C 16x2 1 270
LM35 Sensor 1 100
Connecting Wires 10 50
LDR 1 15
Resistors 5 15
Tact Switch 2 20
Total 670
Results and Discussion:
Figure 1 is a sample output of the device when the user chooses to display the first option
which is the temperature display. Utilizing the LM35 Temperature sensor, the arduino can calculate
the temperature of the surroundings and use the LCD to display the value in Celsius.

Fig 1 Temperature Display


Figure 2 is a sample output of the device when the user chooses the second option which is
the Counter display that identifies the number of people who has passed by. By using a simple LDR
sensor, the arduino can determine and calculate the number of people who gets close enough to
the sensor and displays this value on the LCD.

Fig 2 Counter Display

Conclusions:
Utilizing an ArduinoUno microcontroller for this Menu selection, Temperature
display and Counter display optimizes the usefulness of this microcontroller. This kind
system may even be used in real-time applications especially for some malls and other
similar establishments like restaurants and such. This type of system is very convenient and
useful to our society.
The UNIVERSITY of MINDANAO
College of Engineering Education

ECE 542L
Microprocessor System

EXAM 4

Menu Selection

Alcoriza, Adrien Raye P.


Student Name
(LN, FN MI)

214 Subject Code ECE542L


Laboratory Rm No.

Engr. Stephen Paul Alagao


Subject Teacher

October 18, 2019


Date Submitted

Score

You might also like