Intro to Mechatronics Final Exam

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/49

flashcard set

Earn XP

Description and Tags

Some conceptual questions from the lectures and homewworks

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

50 Terms

1
New cards

Convert 2151 to hexadecimal

Divid by 16 repeatable: → 0×867

2
New cards

Convert 2151 to binary

Divide by 2 repeatedly → 0b100001100111

3
New cards

Why are hexadecimal numbers commonly used in embedded systems?

They compactly represent binary data and are easier to read than long binary strings

4
New cards

When comparing microcontrollers, what features should you consider?

Clock speed, memory, peripherals, power consumption, and instruction set

5
New cards

What is the largest decimal number a 16-bit binary number can represent?

2^16 - 1 = 65,535

6
New cards

Why should you avoid sleep_ms() in real-time systems?

Because it halts the CPU entirely-use timers/interrupts to multitask (e.g., reading sensors while blinking)

7
New cards

What is a voltage divider, and why is it used with microcontrollers?

A circuit that scales down voltage using two resisters. It lets microcontrollers safely read high voltages without potentially damaging components.

8
New cards

What does adc_read() return, and what does it represent?

It returns a number, representing the input voltage’s proportion to the reference voltage

9
New cards

What is PWM, and why is it used for motor control?

Pulse Width Modulation-It mimics analog voltage by pulsing signals. Motors respond to average pulse width (duty cycle).

10
New cards

What is the DIV register in PWM?

Divides the clock speed to set the timer’s base speed.

11
New cards

What is the TOP register in PWM?

Sets the maximum count value, defining the PWM period.

12
New cards

How does the CC register control PWM pulse width?

(Compare Capture) Sets when the purpose turns off during each TOP cycle, changing the duty cycle.

13
New cards

Why would you choose a higher DIV value for PWM?

To slow down the timer, allowing longer pulses (also reduces resolution).

14
New cards

What is ADC resolution?

The smallest voltage change an ADC can detect (e.g., 3.3V/4095 ~= 0.8mV for 12-bit).

15
New cards

Why use a voltage divider instead of connecting a sensor directly to a microcontroller?

To avoid damaging the MCU’s ADC with voltages higher than its reference.

16
New cards

What is the trade-off between PWM frequency and resolution?

Higher frequency (faster pulses) = Smoother motor control, but lower resolution (coarser speed steps).

17
New cards

How is PWM like a light dimmer switch?

Both rapidly turn power on/off - the longer “on” time per cycle, the brighter the light (or faster the motor).

18
New cards

What is I²C, and why is it used in mechatronics?

A 2-wire serial protocol for connecting microcontrollers to sensors/ ICs (SCL clock + SDA data).

19
New cards

What is SCL in I²C?

Clock signal, controls timing.

20
New cards

What is SDA in I²C?

Bidirectional data line (transmits addresses/commands).

21
New cards

Why does SDA go high for a cycle after each byte in I²C?

its the ACK/NACK (Acknoledge) bit, High = NACK (No acknowledgment), Low=ACK.

22
New cards

What is I²C write and read command?

Write: Microcontrollers sends data to a device

Read: Microcontroller requests data from a device.

23
New cards

What does the DAC do for the MCP4725, and why is it useful?

Converts digital numbers (from the I²C) to analog voltages (e.g., for motor control/audio).

24
New cards

How does a DAC’s resolution (e.g., 12-bit) affect its output?

A higher resolution = smoother voltage steps (e.g., 12-bit = 4096 steps between 0V-5V).

25
New cards

How is I²C like a classroom Q&A session?

Teacher (MCU): Controls “clock” (SCL) and asks questions (SDA)

Student (Devices): Respond only when their “address” is called.

26
New cards

What is UART, and why is it used in mechatronics?

A simple serial protocol for device-to-device communication (e.g., MCU to sensors) using TX (transmit) and RX (receive) wires.

27
New cards

What does “8N1” mean in UART?

8: 8 data bits per packet

N: No parity bit (error checking)

1: 1 stop bit (marks end of packet).

28
New cards

How do you identify the start/end of a UART packet?

Start bit: Always low (0)

End Bit: Always high (1)

29
New cards

What is the baud rate, and why does it matter?

It is the speed of communication (bits per second). Mismatched baud rates cause garbage data.

30
New cards

What is a parity bit, and how does “even parity” work?

It is an extra bit for error detection. Even parity = parity bit ensures total 1 s in data + parity is even.

31
New cards

How can you tell if a UART packet is corrupted?

If the parity bit doesn’t match the expected parity.

32
New cards

What is a common cause of UART corruption?

Electrical noise, incorrect baud rate, or loose connections.

33
New cards

How is UART like a walkie-talkie conversation?

TX/RX: Like “over” and “copy” (devices take turns speaking).

Baud rates: how fast you talk, too fast = misunderstood words.

34
New cards

When would you use UART vs I²C?

UART: Simple, long-distance

I²C: Faster, multi-device but shorter distance.

35
New cards

What is PID control, and why is it used in mechatronics?

It is a feedback loop system (Proportional, Integral, Derivative) to maintain precise control.

36
New cards

What does each PID term do>

P (Proportional): Reacts to current error

I (Integral): Fixes small, persistent errors (e.g., steady-state drift)

D (Derivative): Predicts future error (damps oscillation).

37
New cards

How does increases K,p affect a system?

Faster response but can cause overshoot/oscillations.

38
New cards

What happens if K,i is too high?

Eliminates steady-state error but may cause “windup” (slow recovery).

39
New cards

Why is K,d useful?

Reduces overshoot by “slowing down” the system near the target.

40
New cards

Why should you avoid extreme PID values?

High gains can destabilize the system (e.g., motor vibrates uncontrollably).

41
New cards

What is a band pass filter, and why is it used in audio applications?

It is a circuit that allows frequencies within a specific range to pass while blocking others. Used to isolate voice/signals in audio processing.

42
New cards

What are the key parameters of a band pass filter?

Center frequency (f,0): Midpoint of the pass and

Bandwidth (BW): Range of the passed frequencies.

43
New cards

What is the trade-off between filter sharpness and signal strength?

Sharper filters (narrow bandwidth) attenuate desired signals more; wider bands allow noise.

44
New cards

What is the difference between N-type and P-type semiconductors?

N-type: Doped with 5-valance atoms, has free electrons

P-type: Doped with 3-valance atoms, has holes (electron vacancies).

45
New cards

What is a depletion region in a diode?

The zone where free electronics and holes recombine, creating a barrier that prevents current flow unless forward biased.

46
New cards

What are the three regions of a BJT, and how are they doped?

Emitter (N-type): Supplies electrons

Base (P-type): Thin, controls electron flow

Collector (N-type): Controls electrons.

47
New cards

How is a diode like a one-way valve?

Allows current in one direction but blocks the reverse.

48
New cards

What are the three core components of any mechatronics system, and how do they interact?

Sensors → Collect Data

Microcontrollers → Process data + make decisions

Actuators → Execute actions.

49
New cards

When would you use UART vs I²C vs PWM?

UART → Simple, long distance. Trade-off: No built in error checking

I²C → Multi-device, moderate speed. Trade-off: Needs pull-up resistors

PWM: Analog-like control. Trade-off: Frequency vs. resolution balance.

50
New cards

Why is feedback essential in mechatronics, and how does PID implement it?

Been back lets a system self-correct;

P (Present Error) → How bad is it now?

I (Past Error) → What’s the long-term drift?

D (Future Error) → How fast is it changing?