You are on page 1of 8

Systems and Industrial Engineering

University of Arizona

Lab 5
Pre-Lab
Group Number: Irfanil Huda Ani’matus
Ashibri Shob’rina

1. Lab 5 Pre-Lab Report


1.1 Overview and preparation
This fifth lab students will create a security system; students learn how to apply
security using a passcode and alarm on the proximity sensor and Liquid Crystal
Display. To make the circuit model, students will use TinkerCad. All students
need to prepare to do this lab is to read about the tutorial sensor: ping, Parallax
PING))) Distance Sensor Datasheet, and find out and learn from the sample
Liquid Crystal Library "Hello World." Besides that, students also try to do some
tasks to make circuit models related to what will be done during the lab later. So
that students, when doing the lab, are familiar with the methods and
components. Students also answer several questions about this to increase
students' knowledge and curiosity.

1.2 Pre-lab Problems


1. Task 1: Arduino Sensor Tutorial: Ping
In this task, students will create a circuit model for sensors: ping in TinkerCad.
Below is the display of task 1:
Figure 1: The display of task 1.

Figure 2: The name of the circuit model.

Figure 3: The circuit model of Arduino Sensor Tutorial: Ping.


Figure 4: The code window of task 1.
Figure 5: Full code of task 1.

Figure 6: The serial monitor of the output.

2. Task 2: Arduino Liquid Crystal Library Tutorial: Hello World


In this task, students will create a circuit model about the Arduino Liquid
Crystal Library Tutorial: Hello World using TinkerCad. As explained
earlier, students must look for examples from the Arduino Liquid Crystal
Library Tutorial: Hello World to learn how to work and how to make it.
Below is the display of task 2:
Figure 7: The display of task 2

Figure 8: The name of the circuit model of task 2.

Figure 9: The circuit model of task 2.


Figure 10: The code window of task 2.

Figure 11: The code of task 2.


Figure 12: The output of task 2.

3. Prelab Questions:
a. What is the approximate range of distance measurements for our
Parallax PING))) sensor?
Estimated distance measurement for parallax PING))) for non-contact
distances of around 2cm (0.8 inches) to 3 meters (3.3 yards). Because this
makes it easy to connect to microcontrollers such as the Propeller chip and
Arduino that only need an I / O pin.

b. What is the library you have to use for the LCD display?
The LiquidCrystal library is a library that we can use to control the LCD
screen with the Hitachi HD44780 driver. We can tell by the 16 pin
interface. The LCD will also show the time in seconds when Arduino is
reset. Like when outputting "Hello World!" on display.

c. Take a look at the pin initialization call for the LCD. What are the
parameters it takes and what does each one do
LCD has a parallel interface because the microcontroller manipulates
several interface pins to control the display at once. The following are the
parameters:
1. A register select (RS) pin that has fiction to controls wherein the
LCD's memory the user want to write the data. The user was able to
choose two options, either to hold what goes on the screen by using a
data register or instruction register, which is where the LCD's
controller looks for instructions on what to do next.
2. A Read / Write (R / W) pin that selects reading mode or writing mode
3. An Enable pin, which allows writing to the register
4. 8 data pins (D0 -D7), the states of these pins (high or low) are the bits
that you're writing to a register when you write, or the values you're
reading when you read.
5. Display Contrast pin (Vo) to set the desired contrast for LCD, power
supply pins (+5V and Gnd) to give the power to the LCD, and LED
Backlight (Bklt+ and BKlt-) pins to turn on and off the LED backlight,
respectively.

You might also like