Unit 4 - Practice Quiz

ECE249 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What type of pins on an Arduino board are labeled A0, A1, A2, etc.?

Arduino board (pin configuration and description) Easy
A. Power pins
B. Analog Input pins
C. Digital I/O pins
D. PWM pins

2 Which component is considered the "brain" of the Arduino Uno board?

Arduino board (pin configuration and description) Easy
A. Crystal Oscillator
B. USB Port
C. Voltage Regulator
D. ATmega328P Microcontroller

3 What is the standard operating voltage for the I/O pins on an Arduino Uno?

Arduino board (pin configuration and description) Easy
A. 5V
B. 9V
C. 12V
D. 3.3V

4 What does the 'GND' pin on an Arduino board represent?

Arduino board (pin configuration and description) Easy
A. Ground
B. Global Network Device
C. General Input
D. Generated Voltage

5 Digital pins on an Arduino marked with a tilde (~) symbol, like ~3, ~5, and ~6, can perform what special function?

Arduino board (pin configuration and description) Easy
A. Serial Communication
B. External Interrupts
C. Analog Input
D. Pulse Width Modulation (PWM)

6 An ultrasonic sensor measures distance by using what type of waves?

basic principle of ultrasonic sensor Easy
A. Light waves
B. Microwaves
C. Sound waves
D. Radio waves

7 What are the two main components on the front of a typical HC-SR04 ultrasonic sensor?

basic principle of ultrasonic sensor Easy
A. A positive and a negative terminal
B. A button and a switch
C. An LED and a photodiode
D. A transmitter and a receiver

8 Which pin on an ultrasonic sensor is used to send out the sound pulse?

basic principle of ultrasonic sensor Easy
A. Trig (Trigger) pin
B. GND pin
C. VCC pin
D. Echo pin

9 The 'Echo' pin on an ultrasonic sensor is used for what purpose?

basic principle of ultrasonic sensor Easy
A. To supply power to the sensor
B. To listen for the reflected sound pulse
C. To send out the sound pulse
D. To ground the sensor

10 What does "IR" in "IR sensor" stand for?

IR sensor Easy
A. Instantaneous Response
B. Infrared
C. Inductive Reactance
D. Internal Resistance

11 An IR sensor module typically consists of an IR LED and what other component to detect reflections?

IR sensor Easy
A. A resistor
B. A capacitor
C. An inductor
D. A photodiode

12 A simple IR proximity sensor is most commonly used for which application?

IR sensor Easy
A. Detecting the presence of an object
B. Measuring temperature
C. Measuring humidity
D. Measuring distance accurately

13 How does an IR sensor used in a line-following robot distinguish between a black line and a white surface?

IR sensor Easy
A. The sensor measures the temperature difference
B. White surfaces absorb IR light, while black surfaces reflect it
C. Both surfaces reflect IR light equally
D. Black surfaces absorb IR light, while white surfaces reflect it

14 The LM35 is a popular type of which sensor?

Temperature Easy
A. Humidity sensor
B. Light sensor
C. Temperature sensor
D. Pressure sensor

15 The output of an LM35 temperature sensor is typically what kind of signal?

Temperature Easy
A. A digital signal (HIGH/LOW)
B. A serial data stream
C. An analog voltage proportional to temperature
D. A series of pulses (PWM)

16 To read data from an LM35 sensor with an Arduino, which type of pin should you connect its output to?

Temperature Easy
A. An analog input pin (e.g., A0)
B. The 5V power pin
C. The reset pin
D. A digital pin (e.g., D7)

17 What is the purpose of the reset button on an Arduino board?

Arduino board (pin configuration and description) Easy
A. To erase the entire memory
B. To restart the program currently loaded on the board
C. To permanently shut down the board
D. To increase the clock speed

18 The distance measured by an ultrasonic sensor is calculated based on the speed of sound and what other value?

basic principle of ultrasonic sensor Easy
A. The frequency of the sound wave
B. The amplitude of the sound wave
C. The time of flight of the sound wave
D. The color of the object

19 Which pin on the Arduino Uno provides a 3.3V power supply?

Arduino board (pin configuration and description) Easy
A. AREF
B. VIN
C. 3.3V
D. 5V

20 Why is the light from an IR sensor's LED invisible to the human eye?

IR sensor Easy
A. It is too dim to be seen
B. It is a type of ultraviolet light
C. Its wavelength is outside the visible spectrum for humans
D. It only turns on for a microsecond

21 On an Arduino Uno, which of the following analogWrite() function calls would generate a PWM signal with a duty cycle closest to 60%?

Arduino board (pin configuration and description) Medium
A. analogWrite(pin, 153);
B. analogWrite(pin, 204);
C. analogWrite(pin, 60);
D. analogWrite(pin, 102);

22 An HC-SR04 ultrasonic sensor measures a pulse duration of 882 microseconds on its ECHO pin. If the speed of sound in air is 340 m/s, what is the calculated distance to the object?

basic principle of ultrasonic sensor Medium
A. 30 cm
B. 60 cm
C. 7.5 cm
D. 15 cm

23 An Arduino is reading the output of an LM35 temperature sensor using a 10-bit ADC with a 5V reference voltage. If the ADC returns a digital value of 205, what is the approximate temperature in degrees Celsius?

Temperature sensor Medium
A. 20°C
B. 100°C
C. 10°C
D. 50°C

24 A digital IR proximity sensor is used for obstacle detection. The sensor outputs a LOW signal when an object is detected and a HIGH signal otherwise. If the sensor is connected to pin 7 of an Arduino, which code snippet correctly turns on an LED on pin 13 when an obstacle is detected?

IR sensor Medium
A. digitalWrite(13, digitalRead(7));
B. if (analogRead(7) < 500) { digitalWrite(13, HIGH); }
C. if (digitalRead(7) == LOW) { digitalWrite(13, HIGH); }
D. if (digitalRead(7) == HIGH) { digitalWrite(13, HIGH); }

25 If you connect an external power supply providing 3.3V to the 3.3V pin of an Arduino Uno to power it, what is the likely outcome?

Arduino board (pin configuration and description) Medium
A. The ATmega328P microcontroller will be damaged.
B. The on-board 3.3V voltage regulator will be damaged.
C. The Arduino will function normally as long as the current is sufficient.
D. The Arduino will not power on because power should be supplied via the VIN pin or USB.

26 Why does the accuracy of an ultrasonic sensor decrease significantly when measuring the distance to a soft, fabric-covered object compared to a hard, flat wall?

basic principle of ultrasonic sensor Medium
A. The ultrasonic sensor is only calibrated for solid materials.
B. The fabric's temperature interferes with the speed of sound calculation.
C. The fabric changes the frequency of the ultrasonic pulse.
D. The soft fabric absorbs a large portion of the sound wave, resulting in a weak or no echo.

27 You are using a NTC (Negative Temperature Coefficient) thermistor in a voltage divider circuit with a fixed resistor. As the surrounding temperature increases, what happens to the thermistor's resistance and the voltage across it?

Temperature sensor Medium
A. Resistance decreases, voltage decreases.
B. Resistance increases, voltage decreases.
C. Resistance decreases, voltage increases.
D. Resistance increases, voltage increases.

28 A line-following robot uses two IR sensors (left and right), which output HIGH on a white surface and LOW on a black line. If the robot veers off the line to the right (meaning the left sensor is on white and the right sensor is now on white), what sensor readings would the control logic look for to steer back left?

IR sensor Medium
A. Left: HIGH, Right: LOW
B. Left: LOW, Right: HIGH
C. Left: LOW, Right: LOW
D. Left: HIGH, Right: HIGH

29 What is the primary function of the IOREF pin on an Arduino Uno board?

Arduino board (pin configuration and description) Medium
A. To reset the microcontroller.
B. To provide a reference voltage for analog-to-digital conversions.
C. To provide the microcontroller's operating voltage (e.g., 5V or 3.3V) as a reference for shields.
D. To supply a regulated 5V output for external components.

30 An ultrasonic sensor is being used in a narrow corridor. It frequently gives erroneous, shorter-than-actual distance readings. What is the most likely cause of this issue?

basic principle of ultrasonic sensor Medium
A. The air temperature is too low.
B. The sensor's transmitter is failing.
C. The sound pulse is reflecting off the side walls before the main object.
D. The power supply voltage is unstable.

31 Attempting to draw 100 mA of current directly from a single digital I/O pin of an ATmega328P (as on an Arduino Uno) will likely result in what?

Arduino board (pin configuration and description) Medium
A. The entire Arduino board shutting down.
B. The pin supplying the 100 mA without any issues.
C. Damage to the I/O pin's internal circuitry.
D. The Arduino's on-board fuse tripping.

32 Ambient sunlight is causing an IR receiver module (like a TSOP) to behave erratically. What is the most effective physical solution to mitigate this interference?

IR sensor Medium
A. Place a piece of white paper over the receiver.
B. Increase the distance between the IR transmitter and receiver.
C. Enclose the IR receiver in a small tube or shroud to block light from the sides.
D. Write code to ignore readings during the day.

33 When interfacing an analog temperature sensor with an Arduino, the readings fluctuate slightly even when the temperature is stable. What is the purpose of taking multiple readings and averaging them in the code?

Temperature sensor Medium
A. To reduce the effect of random electrical noise on the reading.
B. To calibrate the sensor against a known temperature.
C. To decrease the power consumption of the sensor.
D. To increase the sensor's measurement range.

34 To initiate a distance measurement with an HC-SR04 ultrasonic sensor, what specific signal must be sent to its 'Trig' (Trigger) pin?

basic principle of ultrasonic sensor Medium
A. A constant LOW signal.
B. A HIGH pulse for at least 10 microseconds.
C. A 50% duty cycle PWM signal.
D. A constant HIGH signal for at least 1 second.

35 On an Arduino Uno, pins A0 through A5 can be used as analog inputs. What other primary function can they serve?

Arduino board (pin configuration and description) Medium
A. Serial communication (TX/RX)
B. External interrupts
C. Digital inputs/outputs
D. PWM outputs

36 An analog IR sensor is used to measure the distance to a non-reflective object. How does the sensor's output voltage typically change as the object moves closer to the sensor?

IR sensor Medium
A. The voltage increases non-linearly.
B. The voltage decreases non-linearly.
C. The voltage remains constant.
D. The voltage increases linearly with distance.

37 A project requires measuring a temperature range from -40°C to +125°C with a digital output. Which of the following sensors is most suitable for this task?

Temperature sensor Medium
A. A standard NTC thermistor
B. LM35
C. An IR photodiode
D. DS18B20

38 If an ultrasonic sensor returns its maximum possible pulse duration, what does this most likely signify?

basic principle of ultrasonic sensor Medium
A. The sensor is faulty.
B. The object is too close to the sensor (in the blind spot).
C. No echo was detected within the timeout period.
D. The object is at the sensor's maximum detectable range.

39 Why are IR transmitter-receiver pairs often modulated at a specific frequency (e.g., 38 kHz)?

IR sensor Medium
A. To allow the signal to be seen by the human eye.
B. To increase the transmission range.
C. To reduce the power consumption of the IR LED.
D. To distinguish the signal from ambient IR noise from sources like the sun or light bulbs.

40 What is the main advantage of using a sensor like the DHT11, which provides a digital signal, over an analog sensor like the LM35?

Temperature sensor Medium
A. Digital sensors consume significantly less power.
B. Digital sensors are always more accurate than analog sensors.
C. Digital sensors can measure a wider range of temperatures.
D. Digital sensors are less susceptible to electrical noise during transmission to the microcontroller.

41 On an Arduino Uno (ATmega328P), PWM pins 5 and 6 are controlled by Timer/Counter0. If you change the Timer0 prescaler from 64 to 256 to slow down the millis() function, what is the direct impact on the PWM signal on pins 5 and 6?

Arduino board (pin configuration and description) Hard
A. The PWM frequency increases by a factor of 4.
B. The PWM duty cycle range is reduced by a factor of 4.
C. The PWM frequency decreases by a factor of 4, and the resolution remains 8-bit.
D. There is no impact on PWM, as millis() and PWM are controlled by independent hardware.

42 An HC-SR04 ultrasonic sensor is used in an environment where the ambient temperature is 40°C. The Arduino code calculates distance using the standard formula: distance = duration * 0.0343 / 2. If an object is exactly 100 cm away, what will the approximate measured distance be? (Speed of sound in air is m/s, where T is in Celsius).

basic principle of ultrasonic sensor Hard
A. Exactly 100 cm
B. Approximately 103.5 cm
C. Approximately 96.6 cm
D. Approximately 106.9 cm

43 An NTC thermistor with and a -coefficient of 3950K is used in a voltage divider with a 10k fixed resistor connected to a 5V supply. The Arduino's 10-bit ADC, with a 5V reference, reads a value of 682 from the divider's midpoint. What is the approximate temperature measured by the thermistor?

Temperature Hard
A. ~31.8 °C
B. ~45.1 °C
C. ~25.0 °C
D. ~12.4 °C

44 A project uses a TSOP38238 IR receiver module to detect signals from a remote. The project fails in bright sunlight. What is the most likely technical reason for this failure, and what is the most effective countermeasure?

IR sensor Hard
A. Sunlight contains a 38kHz component that mimics the signal, and the solution is to add a darker physical filter.
B. Sunlight's DC infrared component saturates the receiver's AGC (Automatic Gain Control), and the solution is to place the sensor in a shaded tube or behind an IR-pass/visible-light-block filter.
C. Sunlight heats the sensor, changing its spectral response, and the solution is to add a heatsink.
D. Sunlight's IR component saturates the photodiode, and the solution is to use a PWM-based decoding library.

45 You are using an Arduino Uno's 10-bit ADC to measure a sensor with an output range of 0V to 1.5V. To maximize measurement resolution, you connect a precise 1.5V source to the AREF pin and call analogReference(EXTERNAL). However, your readings are noisy and unstable. What is the most likely cause of this issue based on Arduino hardware recommendations?

Arduino board (pin configuration and description) Hard
A. The analogReference(EXTERNAL) function is incorrect; it should be analogReference(AREF).
B. The external reference voltage is too low; it must be above 2.5V.
C. The internal 1.1V reference should have been used instead for voltages below 5V.
D. A 0.1µF capacitor was not connected between the AREF pin and GND.

46 An ultrasonic sensor is used to measure the distance to a flat, hard surface. The sensor is rated for a 2cm to 400cm range. When the surface is moved to 1.5cm from the sensor, the distance reading jumps to a large, unstable value instead of reading 1.5cm or 2cm. Why does this occur?

basic principle of ultrasonic sensor Hard
A. The intensity of the returned echo at very close range is high enough to permanently damage the receiver circuit.
B. This is the sensor's 'dead zone', where the transducer is still 'ringing' from the transmitted pulse when the echo arrives, making the receiver unable to distinguish the echo.
C. The sound is reflecting too quickly for the microcontroller to switch the trigger pin from output to input mode.
D. The speed of sound changes significantly at distances less than 2cm due to air compression effects.

47 You need to trigger an interrupt on an Arduino Uno precisely when a digital signal goes from high to low. You configure the interrupt using attachInterrupt(digitalPinToInterrupt(2), myISR, FALLING);. The signal source is known to have significant contact bounce. What will be the most likely behavior of the microcontroller?

Arduino board (pin configuration and description) Hard
A. The interrupt will not trigger at all because contact bounce violates the required signal slew rate.
B. The FALLING mode has built-in hardware debouncing, so it will work correctly.
C. The Interrupt Service Routine (ISR) myISR will be executed multiple times in rapid succession for a single intended event.
D. The interrupt will trigger only once on the first high-to-low transition.

48 You are measuring temperature with a TMP36 sensor (10mV/°C with a 500mV offset at 0°C) connected to an Arduino's 10-bit ADC with the default 5V reference. The code reads the ADC value, converts it to millivolts, and then applies the formula (mV - 500) / 10. What is the approximate temperature resolution of this system?

Temperature Hard
A. 1.0 °C / step
B. 0.488 °C / step
C. 0.215 °C / step
D. 0.1 °C / step

49 An IR proximity sensor consists of an IR LED and a phototransistor. The sensor is designed to detect a white object at 5cm. If the white object is replaced with a matte black object at the same distance, what will happen to the phototransistor's state and why?

IR sensor Hard
A. The phototransistor will conduct more current because black surfaces absorb all wavelengths, including those that cause interference.
B. The phototransistor will enter a saturated state due to thermal emission from the black surface.
C. The phototransistor's state will not change, as distance is the only factor affecting reflection.
D. The phototransistor will conduct less current (or turn off) because the matte black surface absorbs most of the IR light, reflecting very little back to the sensor.

50 You are using an ultrasonic sensor in a narrow corridor. When measuring the distance to the end wall (5 meters away), the sensor intermittently reports a much shorter distance of around 1.5 meters. What is the most plausible explanation for this erroneous reading?

basic principle of ultrasonic sensor Hard
A. The sound pulse is experiencing a Doppler shift from air currents in the corridor.
B. The sensor is receiving a 'ghost' echo caused by the sound pulse bouncing off a side wall first, then the end wall, and then back.
C. The microcontroller's internal clock is unstable, causing errors in the pulseIn() time measurement.
D. The sensor is receiving a direct, shorter-path reflection from one of the side walls (a specular reflection) instead of the intended target.

51 On an Arduino Uno, if you set pin 13 (which has an onboard LED and resistor) to INPUT_PULLUP, and then physically connect this pin to GND, what is the approximate current that will flow from the VCC pin through the internal pull-up resistor?

Arduino board (pin configuration and description) Hard
A. Approximately 1 mA, limited by the LED's series resistor.
B. Essentially zero, as INPUT_PULLUP disables current flow.
C. Between 150 µA and 250 µA, determined by the ATmega328P's internal pull-up resistor value.
D. Approximately 40 mA, the absolute maximum pin current.

52 A photodiode is used in a photoconductive (reverse-biased) circuit to detect IR pulses. What is the primary trade-off of increasing the reverse-bias voltage applied to the photodiode?

IR sensor Hard
A. Decreased response speed in exchange for higher sensitivity to lower light levels.
B. Increased response speed and linearity, but at the cost of higher dark current (noise).
C. Decreased sensitivity in exchange for lower power consumption.
D. Increased dark current (noise) in exchange for a wider detection angle.

53 When using a DS18B20 digital temperature sensor, a parasitic power mode is available. What is a key limitation of operating the sensor in this mode, especially in a network with many sensors on the same bus?

Temperature Hard
A. Parasitic power mode limits the bus to a maximum of two DS18B20 sensors.
B. The temperature reading accuracy is reduced to ±2.0°C.
C. During temperature conversions, the data line cannot be used for communication, and a strong pull-up (e.g., via a MOSFET) is needed to supply sufficient current.
D. The sensor can only be powered if the data line is held HIGH by a 1kΩ pull-up resistor.

54 The pulseIn() function on a standard Arduino is used to measure the echo duration from an ultrasonic sensor. If the microcontroller is simultaneously handling a high-priority, time-consuming interrupt (e.g., for serial communication), how might this affect the distance measurement?

basic principle of ultrasonic sensor Hard
A. The pulseIn() function might miss the start or end of the echo pulse, resulting in a timeout or a randomly incorrect (often shorter) duration.
B. The measurement will be more accurate as interrupts provide more precise timing.
C. There will be no effect, as pulseIn() and interrupts use different hardware timers.
D. The pulseIn() function may be delayed, causing it to report a longer duration and thus a larger distance than the actual value.

55 The I2C bus on an Arduino Uno (pins A4/SDA and A5/SCL) requires pull-up resistors. If these resistors are omitted, but the master and a single slave device are connected, what is the most likely outcome?

Arduino board (pin configuration and description) Hard
A. The Arduino and the slave device may be damaged due to high current.
B. Communication will work, but at a much slower speed.
C. The SDA and SCL lines will be stuck in a LOW state, and communication will fail completely.
D. Communication will work intermittently, with frequent data corruption.

56 A system uses a K-type thermocouple connected to an AD8495 precision amplifier, which outputs a voltage of 5mV/°C. This output is fed into an Arduino's 10-bit ADC using the internal 1.1V reference. What is the effective measurement range of this setup before the ADC saturates?

Temperature Hard
A. 0°C to 1023°C
B. 0°C to 220°C
C. -50°C to 170°C
D. 0°C to 1100°C

57 When measuring the distance to a soft, sound-absorbing surface like heavy foam or fabric with an HC-SR04, what is the most likely failure mode?

basic principle of ultrasonic sensor Hard
A. The reflected echo will be too weak for the receiver to detect above its noise threshold, likely resulting in a timeout (0 distance).
B. The sensor will report a much longer distance because the sound penetrates the material before reflecting.
C. The sensor will report a negative distance value due to phase inversion of the reflected wave.
D. The material will absorb the sound and re-radiate it at a different frequency, confusing the receiver.

58 You are building a system with two independent IR remote-controlled devices in the same room. Device A uses a 38kHz modulated signal, and Device B uses a 56kHz modulated signal. Why can these two devices operate simultaneously without interfering with each other?

IR sensor Hard
A. The different modulation frequencies are like different 'colors' of IR light that the receivers can distinguish.
B. The TSOP receivers contain a narrow band-pass filter centered on their specified frequency, which strongly attenuates signals at other frequencies.
C. The IR LEDs for 38kHz and 56kHz emit at fundamentally different wavelengths of light.
D. The digital codes (like NEC or RC-5) are different, so the receivers ignore signals with the wrong code.

59 A platinum resistance thermometer (PT100) is known for its high accuracy and linearity. Why is it not typically connected directly to an Arduino's ADC pin in a simple voltage divider like a thermistor?

Temperature Hard
A. The PT100 requires an AC voltage source for operation, which the Arduino cannot provide.
B. The change in resistance of a PT100 per degree Celsius is extremely small, requiring a precision amplifier circuit (like a Wheatstone bridge and instrumentation amplifier) to produce a measurable voltage change.
C. The PT100 has a negative temperature coefficient, which is incompatible with the ADC.
D. The PT100's resistance is too high, exceeding the input impedance of the Arduino's ADC.

60 An Arduino Uno is programmed to enter SLEEP_MODE_PWR_DOWN. All peripherals are disabled, except for an external interrupt on pin 2 configured to wake the device. What is the primary source of power consumption for the ATmega328P microcontroller in this state?

Arduino board (pin configuration and description) Hard
A. Leakage currents within the CMOS transistors of the microcontroller.
B. The Analog-to-Digital Converter (ADC).
C. The internal watchdog timer.
D. The 16 MHz crystal oscillator.