SENSORS LAB REVIEWER EXPERIMENT 3: SERIAL MONITORING
EXPERIMENT 2: ANALOG AND DIGITAL SIGNALS • Serial Monitor – a separate pop-up window that
Parts of an Arduino UNO board acts as a separate terminal that communicates
by receiving and sending Serial Data.
• Displays values read by the pins
• A debugging tool
• Serial.begin(9600) –Tells the Arduino to get
ready to exchange messages with the Serial
Monitor at a data rate of 9600 bits(0s and 1s)
per second. Bps- bits per sec.
• baud rate - speed of data transfer; ex. 9600
• digitalReadSerial()- sends digital reading to
serial monitor
• analogOutSerial()- send analog reading to serial
monitor
• Range for sensor: 0-1023
• Digital signal vs. analog signal
• Range for output: 0-255
• A normal Arduino Uno board has 14 digital pins
• Command codes/ syntax for writing in the serial
and 6 analog pins
monitor:
• void setup() – codes under this block are
• Serial.print()
executed once
• Serial.println()
• void loop() – codes under this block are
• Serial.write()
executed more than once
• Serial monitoring can be done both on analog
• const int – holder of constant variables/
and digital signals
variables that won’t change their pin numbers
EXPERIMENT 4: ULTRASONIC SENSORS
all throughout the code
Operation formula:
• int – holder of integer variables (whole nos.)
distance = (velocity of sound ∗time)/2
• AnalogRead()- reads the input (HIGH or LOW) in
Minimum Range: The HC-SR04 can detect distances as
an analog pin
close as 2 cm (approximately 0.8 inches) from the
• the voltage reading of the pin is read from
sensor
0-1023
Maximum Range: The maximum effective range is 400
• 0 volts = 0; 5 volts = 1023
cm (approximately 13 feet) under optimal conditions
• values in between 0-1023 are determined
by ratio and proportion
Limitations:
• ex. a reading of 56 is equal to 0.26 volts -vaccum environments
• cw movement of potentiometer decreases -underwater applications
voltage -soft or absorbent materials
• ccw mvmt of potentiometer increases -small objects
voltage -angled surfaces
• DigitalRead()- reads the input(HIGH or LOW) in -unstable temperature environments
a digital pin -high humidity or fog
• PinMode()- sets a pin as an output (send
data)/input (receive data)
• e.g. pinMode(LED_BUILTIN, OUTPUT)
• DigitalWrite()- writes a high or low value to a
digital pin
• delay (1000) – one second delay; 1 sec =
1000ms
EXPERIMENT 1: ARDUINO SENSOR COMPONENTS
EXPERIMENT 5: TEMPERATURE SENSORS Sensors vs. Transducers in an Arduino kit
Temperature sensor used:l TMP36 or DHT11/DHT22 Transducers
• Active Buzzer: Generates sound when an electrical signal
is applied.
At what temperature are Celcius and Fahrenheit
equal in the serial monitor?
-40 C and -40 F
• Passive Buzzer: Produces sound when an external AC
What are the terminal pins of a 3-pin Temperature signal is applied.
Sensor (TMP 36)? How will it be connected to a
microcontroller? The terminal pins of the TMP 36
power, Vout, and GND. Power terminal pin must be
connected to the input voltage, Vout to one of the • SG90 Servo: Rotates to a specific angle based on PWM
analog pins, and GND to GND of the signal input.
microcontroller.
The formula used in the experiment is fahrenheit
= ((celsius * 9) / 5 + 32).
• 5V Stepper Motor: Rotates in precise steps, used for
precise positioning.
• 5V Relay: Acts as an electrically controlled switch, used to
control high-power devices.
• 1602 Display: Displays alphanumeric characters and
symbols.
OPERATION OF INFRARED THERMOMETERS
• 7-Segment Display: Displays single-digit numbers and
some letters.
• 4-Digit 7-Segment Display: Displays four-digit numerical • Joystick: Detects movement along X and Y axes, used for
values. directional input.
• Water Sensor: Detects the presence of water or moisture.
• 8x8 LED Matrix: Displays characters, symbols, or
animations using a grid of LEDs.
• RGB LED: Emits different colors of light based on the • Big Sound Sensor: Detects sound levels, usually used for
combination of red, green, and blue signals. noise detection.
Sensors
• DHT11: Measures temperature and humidity. • RFID Module: Reads data from RFID tags for identification
and access control.
• LM35: Measures temperature in degrees Celsius.
Components (Not Transducers or Sensors)
• UNO R3: Microcontroller board used to control and
interface with other components.
• 4x4 Keypad: Provides a matrix of buttons for user input.
• Motor Drivers: Controls the speed and direction of DC
• CDS (Photoresistor): Detects ambient light levels. motors.
• Clock Module: Keeps track of the current time, even
when the microcontroller is powered off.
• Remote Control: Sends IR signals to control other devices
wirelessly.
• 74HC595: Expands GPIO pins by using a shift register,
• Flame Sensor: Detects the presence of a flame or fire. useful for controlling multiple LEDs or displays.
• B10K Variable Resistor (Potentiometer): Adjusts
resistance in a circuit, often used for controlling
brightness or volume.
• Jumper Cap: Shorts two pins together, often used for
configuration settings.
• SW-520D: Detects tilt or vibration. • Key Switch: Acts as an on/off switch when pressed.
• F-M Dupont Wire: Used for connecting components to
each other or to a breadboard.
• 2.54mm Pin Header: Used as connectors for jumper wires
on a breadboard or PCB.
• IR Receiver: Receives infrared signals, often from a • 830 Breadboard: Used for prototyping circuits without
remote control. soldering.
• USB Cable: Provides power and data communication to
the microcontroller.
• 9V Battery Holder: Holds a 9V battery to power your
circuit.
• Jumper Wires: Used to make connections between
components.
• LED Red, Green, Blue: Emits light when current passes
through.
• Resistors and Resistance Card: Limits current flow and
divides voltage in circuits.