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. PWM pins
B. Digital I/O pins
C. Analog Input pins
D. Power pins

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

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

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

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

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. Pulse Width Modulation (PWM)
B. Serial Communication
C. Analog Input
D. External Interrupts

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

basic principle of ultrasonic sensor Easy
A. Sound waves
B. Light waves
C. Microwaves
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 button and a switch
B. An LED and a photodiode
C. A transmitter and a receiver
D. A positive and a negative terminal

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

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

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

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

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

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

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

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

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

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

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. Both surfaces reflect IR light equally
C. Black surfaces absorb IR light, while white surfaces reflect it
D. White surfaces absorb IR light, while black surfaces reflect it

14 The LM35 is a popular type of which sensor?

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

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

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

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

Temperature Easy
A. The 5V power pin
B. An analog input pin (e.g., A0)
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 permanently shut down the board
B. To erase the entire memory
C. To restart the program currently loaded on 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 time of flight of the sound wave
B. The frequency of the sound wave
C. The amplitude 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. VIN
B. 3.3V
C. AREF
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. Its wavelength is outside the visible spectrum for humans
C. It is a type of ultraviolet light
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, 60);
B. analogWrite(pin, 204);
C. analogWrite(pin, 102);
D. analogWrite(pin, 153);

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. 60 cm
B. 30 cm
C. 15 cm
D. 7.5 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. 50°C
B. 10°C
C. 100°C
D. 20°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. if (digitalRead(7) == LOW) { digitalWrite(13, HIGH); }
B. digitalWrite(13, digitalRead(7));
C. if (analogRead(7) < 500) { 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 Arduino will not power on because power should be supplied via the VIN pin or USB.
B. The ATmega328P microcontroller will be damaged.
C. The on-board 3.3V voltage regulator will be damaged.
D. The Arduino will function normally as long as the current is sufficient.

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 fabric's temperature interferes with the speed of sound calculation.
B. The soft fabric absorbs a large portion of the sound wave, resulting in a weak or no echo.
C. The fabric changes the frequency of the ultrasonic pulse.
D. The ultrasonic sensor is only calibrated for solid materials.

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 increases, voltage decreases.
B. Resistance increases, voltage increases.
C. Resistance decreases, voltage decreases.
D. Resistance decreases, 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: LOW, Right: LOW
B. Left: LOW, Right: HIGH
C. Left: HIGH, Right: HIGH
D. Left: HIGH, Right: LOW

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

Arduino board (pin configuration and description) Medium
A. To provide the microcontroller's operating voltage (e.g., 5V or 3.3V) as a reference for shields.
B. To provide a reference voltage for analog-to-digital conversions.
C. To reset the microcontroller.
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. Damage to the I/O pin's internal circuitry.
C. The pin supplying the 100 mA without any issues.
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. Write code to ignore readings during the day.
B. Place a piece of white paper over the receiver.
C. Increase the distance between the IR transmitter and receiver.
D. Enclose the IR receiver in a small tube or shroud to block light from the sides.

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 increase the sensor's measurement range.
B. To reduce the effect of random electrical noise on the reading.
C. To calibrate the sensor against a known temperature.
D. To decrease the power consumption of the sensor.

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 constant HIGH signal for at least 1 second.
D. A 50% duty cycle PWM signal.

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. External interrupts
B. Digital inputs/outputs
C. Serial communication (TX/RX)
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 linearly with distance.
B. The voltage remains constant.
C. The voltage decreases non-linearly.
D. The voltage increases non-linearly.

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. DS18B20
C. LM35
D. An IR photodiode

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

basic principle of ultrasonic sensor Medium
A. No echo was detected within the timeout period.
B. The sensor is faulty.
C. The object is too close to the sensor (in the blind spot).
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 increase the transmission range.
B. To allow the signal to be seen by the human eye.
C. To distinguish the signal from ambient IR noise from sources like the sun or light bulbs.
D. To reduce the power consumption of the IR LED.

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 frequency decreases by a factor of 4, and the resolution remains 8-bit.
C. There is no impact on PWM, as millis() and PWM are controlled by independent hardware.
D. The PWM duty cycle range is reduced by a factor of 4.

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. Approximately 103.5 cm
B. Approximately 106.9 cm
C. Exactly 100 cm
D. Approximately 96.6 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. ~45.1 °C
B. ~31.8 °C
C. ~12.4 °C
D. ~25.0 °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 heats the sensor, changing its spectral response, and the solution is to add a heatsink.
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 contains a 38kHz component that mimics the signal, and the solution is to add a darker physical filter.
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 internal 1.1V reference should have been used instead for voltages below 5V.
B. The analogReference(EXTERNAL) function is incorrect; it should be analogReference(AREF).
C. A 0.1µF capacitor was not connected between the AREF pin and GND.
D. The external reference voltage is too low; it must be above 2.5V.

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. The sound is reflecting too quickly for the microcontroller to switch the trigger pin from output to input mode.
C. 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.
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 Service Routine (ISR) myISR will be executed multiple times in rapid succession for a single intended event.
B. The interrupt will trigger only once on the first high-to-low transition.
C. The FALLING mode has built-in hardware debouncing, so it will work correctly.
D. The interrupt will not trigger at all because contact bounce violates the required signal slew rate.

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. 0.215 °C / step
B. 0.1 °C / step
C. 1.0 °C / step
D. 0.488 °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 enter a saturated state due to thermal emission from the black surface.
B. The phototransistor's state will not change, as distance is the only factor affecting reflection.
C. 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.
D. The phototransistor will conduct more current because black surfaces absorb all wavelengths, including those that cause interference.

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 microcontroller's internal clock is unstable, causing errors in the pulseIn() time measurement.
B. The sound pulse is experiencing a Doppler shift from air currents in the corridor.
C. 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.
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. Essentially zero, as INPUT_PULLUP disables current flow.
B. Approximately 1 mA, limited by the LED's series resistor.
C. Approximately 40 mA, the absolute maximum pin current.
D. Between 150 µA and 250 µA, determined by the ATmega328P's internal pull-up resistor value.

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 sensitivity in exchange for lower power consumption.
B. Increased dark current (noise) in exchange for a wider detection angle.
C. Decreased response speed in exchange for higher sensitivity to lower light levels.
D. Increased response speed and linearity, but at the cost of higher dark current (noise).

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 sensor can only be powered if the data line is held HIGH by a 1kΩ pull-up resistor.
C. The temperature reading accuracy is reduced to ±2.0°C.
D. 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.

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

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 SDA and SCL lines will be stuck in a LOW state, and communication will fail completely.
B. The Arduino and the slave device may be damaged due to high current.
C. Communication will work, but at a much slower speed.
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 1100°C
C. -50°C to 170°C
D. 0°C to 220°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 material will absorb the sound and re-radiate it at a different frequency, confusing the receiver.
D. The sensor will report a negative distance value due to phase inversion of the reflected wave.

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 digital codes (like NEC or RC-5) are different, so the receivers ignore signals with the wrong code.
C. The IR LEDs for 38kHz and 56kHz emit at fundamentally different wavelengths of light.
D. The TSOP receivers contain a narrow band-pass filter centered on their specified frequency, which strongly attenuates signals at other frequencies.

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 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.
B. The PT100 requires an AC voltage source for operation, which the Arduino cannot provide.
C. The PT100's resistance is too high, exceeding the input impedance of the Arduino's ADC.
D. The PT100 has a negative temperature coefficient, which is incompatible with the 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 internal watchdog timer.
C. The 16 MHz crystal oscillator.
D. The Analog-to-Digital Converter (ADC).