You are on page 1of 28

ENG 003

Introduction to Engineering Design


Studio 2
PROFESSOR VIVIAN VUONG, MILO THE CAT, JOSH
SIEGEL, AND RONNIE THE TURTLE
Attendance!
Agenda
Intro to
 Breadboards
 Circuit Diagram
 Analog
 Serial communication and LCD screens
CATME and Engineering Design Experience Survey!
Studio HW #2
Section Code
A01 XCR-DX6-H4W
A02 UCW-ERP-VDY
A03 ZUF-RW7-BCV
A04 X95-1MS-M61
A05 7B7-87R-YCE
A06 9MA-DPN-GTD
A07 9S6-3EE-U2F
A08 MBB-9N4-DNM
Let’s add a Breadboard
Solderless Breadboard
Conductive Strips
ravine

If the legs of the LED are


on different conductive
strips – electricity will
flow through the LED.

rows 1 to 30: “a” to “e” & “f” to “j” are conductive strips, similar to a piece of wire.
the 4 outer rails “+” and “-” are also conductive strips.

https://learn.sparkfun.com/tutorials/how-to-use-a-breadboard
These two are electrically the
same! But one is much neater.
Looking at the Circuit Diagram is Advantageous!
Looking at the Circuit Diagram is Advantageous!
Studio 2 Task 1
 In TinkerCAD use an Arduino Uno,
Breadboard, 3 LEDs (1 green, 2 red)
and 220Ω Resistors, a Push Button
and 10kΩ Resistor.
Red
Create a code that:
 when button is pressed, turn “off” Gr
the green LED and blink the two red Red
LEDs. You can choose the blinking
pattern.
 When button open/not pressed, the
(green) LED is “on” and the two (red)
LEDS are “off”.
Goal Today
Today we will learn more Arduino Uno using Tinkercad
Circuits:
▪ What is an analog sensor?
▪ How to wire the TMP36 Temperature Sensor
- using a Breadboard
▪ How to create code to Test the sensor
▪ How to Read output using the Serial Monitor
▪ How to wire and use the LCD screen
Review from Studio 1

Digital versus Analog


Digital has two states “high” and “low” like a blinking LED
▪ Digital sensors use discrete (discontinuous) values to
represent information for input.

Analog has continuous states like “Temperature” “Pressure”


▪ An 'Analog Signal' is one that can assume any value in a range.

https://msdn.microsoft.com/en-us/library/dd126856.aspx
http://izalhidayat.student.telkomuniversity.ac.id/files/2015/08/a.jpg
Analog Input and Output pins
Temperature Sensor
TMP36 is a low voltage, precision
centigrade temperature sensor.

Provides a voltage output that is


linearly proportional to the Celsius
temperature.
Vs
5V Flat face forward connect:
• right leg to GND
Vout GND
A0 • left leg to 5V
• read the voltage on the Vout pin

http://www.learningaboutelectronics.com/Articles/LM34-
https://www.sparkfun.com/products/10988 temperature-sensor-circuit.php
How do we wire the TMP36?

The direction of the TMP


Sensor is important.
If connected incorrectly, it will
get very HOT.
How to Convert Analog Signal
into Temperature
01 Read in 10-bit sensor data

02 Convert 10-bit sensor data to voltage

Voltage = (10-bit sensor value/total bits) * input voltage

210 = 1024
03 Convert voltage into temperature using equation from spec sheet
How do we know what the
Arduino is reading??

Serial Monitor
Serial Monitor

baud rate
How to Use the Serial Monitor
01 Initialize the serial monitor in void setup ()
// 9600 is the baud rate

02 Tell the serial monitor what you want to display in void loop()

//using println makes new line


Studio 2
– Task 2

Test it
out!
LCD Display Using I2C
Communication Protocol
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
GND 0
VCC
SDA
SCL 1
Include LCD I2C Library

Identify LCD address

Initialize LCD (# of characters,


# of lines)

Initial message

Place your cursor (column, row)

Tell the LCD what you


want it to display
Turn on the backlight
CATME!
 CATME is a free service that is used around the world at colleges and
universities for various things.
We use it in this class as a team-maker
It will ask you questions that you need to answer, those questions will
help us make your teams for next week!
The survey should have been sent to your UCD email
Engineering Design Experience
Survey
Please do this survey!

https://ucdavis.co1.qualtrics.com/jfe/form/SV_8i8nptLBitOIM1U

Your responses will not be shared, they are for internal use only!
Studio 2 HW!
 Studio 2 HW Challenge 1
 Use the TMP36 and LCD screen to
display the temperature every 5
seconds, in Celsius and Fahrenheit in
the format of ->

 Studio 2 HW Challenge 2
 Use the TMP36 and LCD screen to
display the following:
 “It’s too hot!!” if it’s hotter than 35
deg C
 “It’s too cold!” if it’s colder than 10
deg C
 “It’s great!!!!” otherwise
The End

You might also like