Arduino Electronics, Sensors, Signal Processing & Motor Control

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/69

encourage image

There's no tags or description

Looks like no tags are added yet.

70 Terms

1
New cards

What is a short circuit, and why is it dangerous?

A low-resistance path that causes excessive current and can damage components.

2
New cards

What is the recommended maximum current for an Arduino Uno I/O pin?

20mA

3
New cards

What is the purpose of setup() in an Arduino sketch?

What is the purpose of loop() in an Arduino sketch?

Runs once at startup or reset to initialize settings, such as pin modes.

Runs repeatedly while the Arduino is powered on and executing the sketch.

4
New cards

What does digitalRead(2); do?

Reads the digital state of pin 2, returning HIGH or LOW.

5
New cards

What does the baud rate determine in Arduino serial communication?

The speed at which serial data is transmitted, typically measured in bits per second.

6
New cards

What is the main purpose of a resistor in an Arduino LED circuit?

To limit current and protect the LED and Arduino pin.

7
New cards

What is a potentiometer?

An adjustable resistor with three terminals that changes resistance when its knob is turned.

8
New cards

What does the continuity setting on a multimeter test?

Whether two points are electrically connected. A beep indicates continuity.

9
New cards

Why is a resistor connected in series with an LED?

To limit current and prevent damage to the LED.

10
New cards

What is the purpose of a pull-down resistor?

To keep a digital input LOW when the button is not pressed, preventing a floating input.

11
New cards

What is a floating digital input?

An input without a defined HIGH or LOW voltage, which can cause unpredictable readings.

12
New cards

What is a multimeter?

A device used to measure electrical quantities such as voltage, current, and resistance

13
New cards

What is an LED?

A Light Emitting Diode that produces light when current flows through it in the forward direction.

14
New cards

What is a push button?

A switch that opens or closes an electrical connection when pressed.

15
New cards

What is the difference between analog and digital inputs?

Analog inputs read varying voltages, while digital inputs read HIGH or LOW.

16
New cards

What does analogRead(A0) do?

Reads the analog voltage at pin A0 and returns a digital value from 0 to 1023.

17
New cards

Why does the Arduino Uno ADC return values from 0 to 1023?

Its 10-bit resolution provides \(2^{10}=1024\) possible values, numbered 0 through 1023.

18
New cards

What is a thermistor?

A temperature-sensitive resistor whose resistance changes with temperature.

19
New cards

What happens to the resistance of an NTC thermistor as temperature increases?

Its resistance decreases because NTC means Negative Temperature Coefficient.

20
New cards

Why is a voltage divider used with a thermistor?

To convert the thermistor's changing resistance into a measurable voltage.

21
New cards

What is the purpose of the Steinhart-Hart equation?

To convert a thermistor's resistance into temperature.

22
New cards

What does a DHT11 sensor measure?

Temperature and relative humidity, providing digital readings.

23
New cards

What determines the output voltage of a voltage divider?

The ratio of the two resistances. Changing either resistance changes the output voltage.

24
New cards

What does an MPU6050 sensor measure?

Acceleration (m/s²), angular velocity (rad/s), and temperature (°C).

25
New cards

What is the difference between an accelerometer and a gyroscope?

An accelerometer measures acceleration (m/s²), while a gyroscope measures angular velocity (rad/s).

26
New cards

What is I2C communication?

A protocol that allows devices to exchange data using two lines: SDA (data) and SCL (clock).

27
New cards

Why is atan2() preferred over atan() for calculating IMU orientation?

It determines the correct angle quadrant using both inputs and avoids division-by-zero issues.

28
New cards

How does a gyroscope estimate changes in orientation?

By integrating angular velocity over time to calculate the change in angle.

29
New cards

What is the purpose of a complementary filter?

To combine the accelerometer's long-term stability with the gyroscope's short-term accuracy for better orientation estimates.

30
New cards

What is an IMU (Inertial Measurement Unit)?

A sensor device that measures motion and rotation using accelerometers and gyroscopes.

31
New cards

What is an accelerometer?

A sensor that measures acceleration along one or more axes, typically in m/s².

32
New cards

What is a gyroscope?

A sensor that measures angular velocity (rotational speed), typically in rad/s.

33
New cards

What is a capacitor?

An electrical component that stores energy in an electric field.

34
New cards

What is an RC low-pass filter?

What is the cutoff frequency of a low-pass filter?

A circuit containing a resistor and capacitor that passes low frequencies while attenuating high frequencies.

The frequency where the output amplitude is approximately 70.7% of the input amplitude (−3 dB).

35
New cards

What is a moving average filter?

A filter that averages the most recent \(N\) samples to smooth a signal and reduce noise.

36
New cards

What is a median filter?

A filter that sorts recent samples and selects the middle value to reduce spikes and outliers.

37
New cards

Which filter is especially effective at removing sudden spikes or outliers?

A median filter, because it selects the middle value rather than averaging all readings.

38
New cards

What is the purpose of a Fast Fourier Transform (FFT)?

What does a large peak in an FFT frequency spectrum indicate?

To convert a signal from the time domain into the frequency domain, showing its frequency components.

The signal contains a strong component at that frequency.

39
New cards

What is the Nyquist frequency?

Half the sampling frequency (\(f_N=f_s/2\)). It represents the upper frequency limit for avoiding aliasing.

40
New cards

What is aliasing?

When a signal is sampled too slowly, causing high frequencies to appear as incorrect lower frequencies.

41
New cards

What is a Butterworth filter and how does it work?

What happens when you increase the order of a Butterworth low-pass filter?

A filter that uses mathematical equations and previous signal values to reduce unwanted frequencies while keeping the desired signal smooth.

The cutoff becomes sharper, so frequencies above the cutoff are attenuated more rapidly.

42
New cards

How does a pedometer detect steps using threshold crossing?

It counts a step when filtered acceleration rises above a threshold, then waits for the signal to fall below it before counting another.

43
New cards

What is an LCD (Liquid Crystal Display)?

What does lcd.setCursor(0, 1) do?

An electronic screen that displays information such as text and numbers.

Moves the LCD cursor to the first column of the second row. LCD positions start at 0.

44
New cards

Why do we filter acceleration measurements before detecting steps?

To reduce noise and prevent false step detections.

45
New cards

What is an MB-V2 breadboard power module?

A module that supplies external electrical power to breadboard components, including motors that require more current than the Arduino can provide.

46
New cards

What is a servo motor?

A motor that moves to and holds a commanded angular position using internal feedback.

47
New cards

What is a DC motor?

A motor that converts DC electrical energy into continuous rotational motion when powered, unlike a positional servo that holds a commanded angle.

48
New cards

What is an L293D motor driver?

A motor driver chip that lets the Arduino control a DC motor's speed and direction using an external power supply.

49
New cards

What is Pulse Width Modulation (PWM)?

: A method of controlling average power by rapidly switching a signal ON and OFF and adjusting its duty cycle.

50
New cards

What is a quadrature encoder?

Why does a quadrature encoder use two signals (A and B)?

A sensor that produces two signals offset by 90° to measure rotational position, speed, and direction.

The signals are offset by 90°, allowing the Arduino to determine rotational direction by checking which signal leads.

51
New cards

Why use interrupts instead of polling for a quadrature encoder?

Interrupts respond to encoder signal changes as they occur, reducing missed counts compared with repeatedly checking the signal.

52
New cards

Why should you avoid Serial.print() inside an ISR?

Serial printing is slow and can interfere with interrupt timing, potentially causing missed encoder counts.

53
New cards

What is encoder resolution?

The number of counts or pulses per revolution. Higher resolution allows more precise rotational position measurements.

54
New cards

What is closed-loop control?

A system that repeatedly measures its output and adjusts its command using feedback to reduce the error between desired and measured values.

55
New cards

What is bang-bang control?

A closed-loop controller that switches between fixed motor commands based on whether the measured position is above or below the target.

56
New cards

What does the proportional (P) term do in PID control?

What does the integral (I) term do in PID control?

What does the derivative (D) term do in PID control?

Produces a corrective command proportional to the current error. Larger errors produce larger corrections.

Accumulates error over time to help eliminate steady-state error.

Responds to how quickly the error changes, providing damping that helps reduce overshoot and oscillation.

57
New cards

What is critical damping?

The condition where a system returns to equilibrium as quickly as possible without oscillating.

58
New cards

What is K_p (proportional gain), and what happens when you increase it?

K_p determines how strongly the controller responds to the current error. Increasing K_p makes corrections stronger and the response faster, but may increase overshoot and oscillation.

59
New cards

What is settling time in a motor's step response?

What is rise time in a motor's step response?

The time required for the motor to enter and remain within an acceptable range around its target.

The time required for the motor to move from 10% to 90% of its commanded step.

60
New cards

What is steady-state error?

The difference between the desired and measured position after the system has settled. The integral (I) term can help eliminate it.

61
New cards

What is phase lag in motor control?

What is amplitude ratio in motor control?

The delay between the target's motion and the motor's actual response. It can be calculated using

phi = 360*f*deltat

The measured movement amplitude divided by the commanded amplitude. A ratio below 1 means the motor moves through a smaller range than commanded.

62
New cards

Why add an integral (I) term to a PD controller?

To accumulate error over time and help eliminate steady-state error, especially when a constant opposing load is present.

63
New cards

What is K_d (derivative gain), and what happens when you increase it?

K_d controls how strongly the controller responds to changing error. Increasing K_d generally adds damping and reduces overshoot, but too much can slow the response.

64
New cards

What is K_i (integral gain), and what happens when you increase it?

K_i controls how strongly the controller responds to accumulated error. Increasing K_i helps eliminate steady-state error faster, but too much can cause overshoot and oscillation.

65
New cards

What is a finite state machine (FSM)?

What are the three components of an FSM transition label?

A programming structure that operates in one state at a time and transitions between states when defined conditions are met.

Event: Triggers the transition.

Guard: Condition that must be satisfied.

Action: Operation performed during the transition.

66
New cards

What is a guard in an FSM?

An optional condition that must be true for a state transition to occur.

67
New cards

Why is a dead zone used for joystick inputs?

To prevent noise and small fluctuations near the center from falsely registering as movement.

68
New cards

How does a button configured with INPUT_PULLUP behave?

Reads LOW when pressed and HIGH when released.

69
New cards

Why is an enum useful in an FSM?

It represents possible states using named constants, making code easier to read and organize.

70
New cards

How does an ultrasonic rangefinder measure distance?

By measuring the round-trip travel time of a sound pulse and using the speed of sound.