Electronics and IoT Practical Exercises
14 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the formula used to calculate Vout in the given IoT practical exercise?

Vout = Vin * R2 / (R1 + R2)

In the provided Arduino code, each step represents approximately __ volts or 0.00488 volts.

5/1024

What does the map() function in Arduino help us do?

  • Read sensor values
  • Set LED brightness
  • Initialize serial communication
  • Convert a value from one range to another (correct)
  • What does the 'analogWrite()' function do in Arduino?

    <p>Adjusts LED brightness based on sensor value</p> Signup and view all the answers

    What is an IR sensor also known as?

    <p>Infrared sensor</p> Signup and view all the answers

    Which components does an IR sensor typically consist of?

    <p>IR transmitter</p> Signup and view all the answers

    IR Emitter emits visible light.

    <p>False</p> Signup and view all the answers

    The distance threshold of the IR sensor can be set by adjusting the ____________ on the board.

    <p>potentiometer / trimpot</p> Signup and view all the answers

    Match the following pins connections for the IR sensor to Arduino UNO:

    <p>Vcc = Vin / 5V GND = GND OUT = pin 9 +ve end of LED = pin 13, and –ve to GND</p> Signup and view all the answers

    What does PIR stand for?

    <p>Passive Infrared</p> Signup and view all the answers

    What voltage is the input voltage for typical applications of a PIR sensor?

    <p>+5V</p> Signup and view all the answers

    What technology does the Ultrasonic Sensor HC-SR04 use to determine distance?

    <p>Sonar</p> Signup and view all the answers

    The Echo pin of the Ultrasonic sensor is used to initiate the ultrasonic pulse.

    <p>False</p> Signup and view all the answers

    The Trigger pin of the Ultrasonic Sensor is used to initiate the ____________ pulse.

    <p>ultrasonic</p> Signup and view all the answers

    Study Notes

    IoT Practical Exercises

    • Resistor/Resistor configuration: Vin is the input voltage, Vout is the output voltage, and Vout = Vin * R2 / (R1 + R2)

    Resistor/Resistor Code

    • analogInput is set to 1, vout is set to 0.0, vin is set to 0.0, and res is set to 0.0
    • R1 is set to 1500.0 (1K) and R2 is set to 1000.0 (1.5K)
    • vin is calculated as (value * 0.5) / 1024.0 and res is calculated as R2 / (R1 + R2)
    • vout is calculated as vin * res

    Smoke Sensor Code

    • sensorPin is set to A0 (MQ2 sensor analog pin) and ledPin is set to 6 (LED pin)
    • sensorValue is read using analogRead(sensorPin)
    • outputValue is calculated using map(sensorValue, 0, 1023, 0, 255)
    • map() function is used to convert a value from one range to another
    • analogWrite(ledPin, outputValue) is used to adjust LED brightness based on sensor value

    Map() Function

    • map() function is used to convert a value from one range to another
    • Example: if sensor reading is 0, LED brightness is 0, and if sensor reading is 1023, LED brightness is 255

    IR Sensor

    • IR sensor detects infrared radiation in its surroundings, which is not visible to the human eye but can be felt as heat
    • Consists of an IR transmitter and receiver; the transmitter emits IR radiation, and the receiver detects any reflected or emitted radiation
    • Can detect objects between 2cm and 30cm within the view of the IR LED and Photoresistor
    • Has three pins: two power pins (VCC and GND) and a sense/data pin
    • Can be connected to an Arduino board, with the OUT pin connected to pin 9 and the LED connected to pin 13

    PIR/Motion Sensor

    • Passive Infrared sensor detects motion based on changes in infrared light in the environment
    • Ideal for detecting human movement in or out of the sensor range
    • Has three pins: VCC, GND, and OUT; VCC requires +5V for typical applications
    • OUT pin provides a digital pulse high (3.3V) when triggered (motion detected) and digital low (0V) when idle (no motion detected)
    • Can be connected to an Arduino board, with the OUT pin connected to digital input pin 2 and the LED connected to pin 13

    Ultrasonic Sensor HC-SR04

    • Uses sonar to determine the distance to an object, measuring the distance by emitting ultrasonic sound waves and receiving the waves that bounce back
    • Measures distances from 2cm to 400cm
    • Has four pins: VCC, GND, Trig (Trigger), and Echo
    • Trig pin initiates the ultrasonic pulse, and the Echo pin detects the ultrasonic waves reflected back from an object
    • Can be connected to an Arduino board, with the Trig pin connected to pin 9, the Echo pin connected to pin 10, and the LED connected to pin 13

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    This quiz covers practical exercises related to IoT and electronics, focusing on resistor circuits and voltage calculations. It includes programming exercises in C++ for Arduino.

    More Like This

    Resistor Circuits Analysis Quiz
    5 questions
    Electrical Circuits Quiz
    1 questions

    Electrical Circuits Quiz

    BeauteousJackalope713 avatar
    BeauteousJackalope713
    Use Quizgecko on...
    Browser
    Browser