Lecture 4: Semiconductors and Actuator Interfaces

Previous lecture | Lecture index | Next lecture

Slides PDF | Equation sheet | Activity sheets | Quiz PDF | Quiz Solutions PDF

Connect a controller command to a separately powered actuator through a suitable driver. Calculate LED current limiting, switch conduction loss, and PWM averages, then check command response.

Start Here

How can a small output pin control a pump or valve that needs more current?

Review the command and load power paths from Lecture 1. A driver turns a small command into the switching action of a separate load circuit.

🎯 Learning Objectives

  • Explain the functions of diodes, LEDs, and transistors.
  • Calculate a series resistor and distinguish load power from switch heating.
  • Review input drive, load ratings, suppression, and measured PWM response.

Continuing project: Keep the same process, controlled variable, manipulated variable, and disturbance throughout the sequence. Retain circuit sketches, raw data, assumptions, and the design decision from each activity.

⚑ Concepts, Equations, and Worked Examples

Devices and Driver Evidence

Diodes conduct primarily in one direction and can provide rectification or a specified suppression path. LEDs emit light when forward current flows and need current limiting. Transistors can switch load current under a compatible control signal. The supplied L298N and IRF520 module images illustrate interfaces; appearance and a headline current label do not establish suitability.

Verify the actual driver circuit, control-input levels, specified on-state drive, load voltage and current, startup demand, switching conditions, and thermal requirements. MOSFET gate-threshold voltage describes onset under a stated small-current test. Use on-resistance specified at the available gate drive and temperature to estimate conduction loss.

An inductive coil stores magnetic energy. At turnoff its current needs the specified suppression path. A flyback diode for a DC coil is reverse-biased during normal energization, with its cathode toward the positive supply. A simple diode may slow release; use the load and driver documentation for the required turnoff behavior.

1 / LED current limiting

Subtract the LED forward drop from the supply. $$R=\frac{V_s-V_F}{I},\qquad P_R=I^2R.$$

Worked example. \(V_s=5\,\mathrm{V}\), \(V_F=2\,\mathrm{V}\), target \(I=5\,\mathrm{mA}\).

  1. Resistor voltage \(=5-2=3\,\mathrm{V}\).
  2. \(R=3/0.005=600\,\mathrm{\Omega}\).
  3. With \(620\,\mathrm{\Omega}\): \(I=3/620=4.84\,\mathrm{mA}\) and \(P_R\approx0.0145\,\mathrm{W}\). Verify polarity and ratings.

2 / Protected inductive switching

Trace the coil current separately from the command

A small controller output can tell a switch to conduct. The external supply furnishes the current the coil needs. Find the diode’s cathode at the positive supply. During normal energization this diode is reverse-biased. At turnoff the coil current needs a temporary path, which the diode can provide in this teaching circuit. Use the actual driver and coil documentation for a real connection.

The command goes to the switch. When the switch conducts, supply current flows through the coil and switch back to the load return. The flyback diode spans the coil.

The command goes to the switch. When the switch conducts, supply current flows through the coil and switch back to the load return. The flyback diode spans the coil.

A flyback path limits turnoff voltage; the diode is reverse-biased while the coil is powered.

Worked example. Switch a DC valve coil.

  1. Verify supply voltage, coil current and startup.
  2. Select a driver with documented input drive, load and thermal ratings.
  3. Provide the specified suppression and return path; check release time and turnoff stress.

Engineering point: Functional schematic; follow the actual device pinout.

3 / Load power versus switch heating

Use on-resistance at the actual gate drive and temperature. $$P_{\mathrm{load}}\approx V_sI,\quad P_{\mathrm{cond}}=I^2R_{\mathrm{on}}.$$

Worked example. \(12\,\mathrm{V}\) coil, \(0.30\,\mathrm{A}\); assumed \(R_{\mathrm{on}}=0.10\,\mathrm{\Omega}\).

  1. \(P_{\mathrm{load}}\approx12(0.30)=3.6\,\mathrm{W}\).
  2. \(P_{\mathrm{cond}}=(0.30)^2(0.10)=0.009\,\mathrm{W}=9\,\mathrm{mW}\).
  3. Check additional switching/clamp losses, voltage transients and temperature. A module's headline current rating is insufficient.

4 / PWM duty and physical response

Read PWM as time spent on

Pulse-width modulation (PWM) repeats a fast on/off command. One period is the time between successive starts of the pulse. Duty is on-time divided by that period. A meter or filter may show a smoothed average, while the pin still switches between two levels. A pump can have a minimum command at which it starts. Measure flow, speed, or current under the intended conditions to learn what the command actually does.

The example pin switches between 0 and 5 V. It is high for 0.5 ms each 1 ms period, giving an ideal mean of 2.5 V.

The example pin switches between 0 and 5 V. It is high for 0.5 ms each 1 ms period, giving an ideal mean of 2.5 V.

Duty is the fraction of each period spent HIGH. $$D=\frac{t_{\mathrm{on}}}{T},\quad f=\frac1T,\quad \overline V=DV_H+(1-D)V_L.$$

Worked example. An ideal \(0\)-\(5\,\mathrm{V}\) output has \(T=1\,\mathrm{ms}\) and \(t_{\mathrm{on}}=0.5\,\mathrm{ms}\).

  1. \(D=0.5/1=0.50\); \(f=1000\,\mathrm{Hz}\).
  2. \(\overline V=0.50(5)+0.50(0)=2.5\,\mathrm{V}\).
  3. Measure current, speed or flow at several duties; \(50\%\) duty alone does not imply \(50\%\) speed.

Engineering point: The unfiltered pin still switches between 0 and 5 V. An RC-smoothed mean has ripple and lag.

πŸ§ͺ Experiment: Protected Driver Checkout (15 min)

Open Microcontroller I/O Studio. Use the simulator or the prepared educational circuit specified below. Preserve project-controller firmware and record board, firmware, input range, signal reference, settings, and actual sample interval.

Before you begin. Start with the harmless indicator. Say what should happen at 0% and 100% duty before you try any intermediate setting.

Supplied photo of an L298N driver module. Find the exact terminal functions and ratings in the documentation for the module you use.

Supplied photo of an L298N driver module. Find the exact terminal functions and ratings in the documentation for the module you use.

  1. Begin with an approved LED or harmless dummy load. Predict and check digital OFF and ON before PWM.
  2. On the simulated Uno, use D13 for the indicator and D9 with the A2 averaged RC output for PWM response. Test 0%, 25%, 50%, 75%, and 100% duty and let each response settle.
  3. On the physical station, verify the external supply, polarity, actual input drive, signal reference, driver ratings, and specified inductive protection before energizing. Remove power before rewiring.
  4. Record actual commands and the observed voltage or actuator response. Obtain load current only through an appropriate sensor interface or approved independent instrument.
  5. Compare response with the ideal mean-voltage model. The simulator checks commands and averaged response; it does not verify physical flyback behavior or driver heating.

Record and Interpret

CommandIdeal settled mean for 0-5 V PWMObserved responseCurrent if measured
0%0 VRecordRecord
25%1.25 VRecordRecord
50%2.50 VRecordRecord
75%3.75 VRecordRecord
100%5.00 VRecordRecord

The unfiltered pin still switches between its electrical levels. For an ideal resistor driven by unfiltered 0-to-\(V_H\) PWM, average power is \(D V_H^2/R\); using the squared mean voltage gives a different result. Pump speed, current, and delivered flow require their own measurements.

Data origin: Identify physical measurement, simulator output, supplied synthetic data, or calculated model for every record. Preserve the prediction before collecting the result.

Data and Analysis Downloads

πŸ›  Project Checkpoint

Add the protected-driver schematic, signal and power return paths, actual rating evidence, command-response table, usable command limits, and one diagnosed or corrected issue to EE 3. Record which quantities remain assumptions. Continue EE 3 with relay, valve, and interlock tests in Lecture 8.

Check Your Understanding

A pin switches between 0 V and 5 V and is high for a quarter of each period. What is its mean?

It spends 25% of its time at 5 V, so its ideal mean is 1.25 V. Check the actual response separately for a connected actuator.

πŸ“ Quiz (10-15 min)

After you try each question, select Worked solution below it to see the steps. Use the Quiz Solutions PDF above to review the full answer key.

12 points total; 4 points per question. Show work and units. Round numerical results to 3 significant figures. For multiple choice, select one answer and explain briefly.

Question 1: LED current-limiting resistor

A 12 V supply drives an LED modeled with a fixed 2.0 V drop. Find ideal series resistance for 10 mA and the resistor power at that current.

$$V_R=12-2.0=10.0\,\mathrm{V},\qquad R=10.0/0.010=1000\,\Omega=1.00\,\mathrm{k\Omega}$$ $$P_R=10.0(0.010)=0.100\,\mathrm{W}$$

Use the resistor’s drop rather than the complete supply voltage.

Question 2: Load power and switch loss

A coil has 24 V across it and draws 0.25 A. Its series switch has 0.20 \(\Omega\) on-resistance at the stated drive. Find coil power and switch conduction loss. Neglect switching transients.

$$P_{\mathrm{coil}}=24(0.25)=6.00\,\mathrm{W}$$ $$P_{\mathrm{switch}}=(0.25)^2(0.20)=0.0125\,\mathrm{W}=12.5\,\mathrm{mW}$$

These powers occur in different components. The given 24 V is across the coil.

Question 3: PWM command versus response

An ideal command switches between 0 and 5.0 V at 40% duty. Find mean voltage. Does 40% duty guarantee 40% maximum pump speed? Explain.

$$\overline V=0.40(5.0)+0.60(0)=2.00\,\mathrm{V}$$

No. Duty specifies switching time. Speed also depends on driver, motor, load, and operating conditions and needs its own measurement.

βœ… Exit Ticket

A 3.3 V supply and 2.0 V LED need 4.0 mA. Find ideal resistance. A 0.50 A load uses a 0.20 \(\Omega\) switch. Find conduction loss. Why is threshold voltage insufficient?

$$R=\frac{3.3-2.0}{0.004}=325\,\Omega,\qquad P_{\mathrm{cond}}=(0.50)^2(0.20)=0.050\,\mathrm{W}$$

An available 330 \(\Omega\) resistor gives about 3.94 mA under the fixed-drop model. Threshold is not a guaranteed fully enhanced operating condition.

πŸ’¬ Discussion Questions

Commit to an answer before comparing with a colleague or AI assistant.

  1. Why does the switch dissipate much less power than the load in the stated example?
  2. How can a suppression choice affect a valve release time?
  3. What physical evidence would support a usable pump-command range?

πŸ“ Nomenclature

SymbolMeaningExample value
\(V_s\)Load/LED supply12 V / 5 V
\(V_F\)LED forward drop2 V
\(I\)Operating current5 mA LED; 0.30 A coil
\(R\)LED resistor620 \(\Omega\)
\(P_R\)Resistor heat0.0145 W
\(R_{\mathrm{on}}\)Switch on-resistance0.10 \(\Omega\) assumed
\(P_{\mathrm{load}}\)Load power3.6 W
\(P_{\mathrm{cond}}\)Conduction loss9 mW
\(D\)Duty fraction0.50 (unitless)
\(t_{\mathrm{on}},T\)On-time/period0.5; 1 ms
\(f\)Switching frequency1000 Hz
\(V_H,V_L\)High/low voltage5; 0 V
\(\overline V\)Mean voltage2.5 V

MOSFET on-resistance is a supplied assumption, not a rating inferred from a module photo.

πŸ“š Resources and Source Materials

This page combines the supplied lecture PowerPoint and speaker notes, one-page equation sheet, quiz and solution key, student workbook, instructor guide, and applicable model data. The 50-minute lecture includes the 15-minute activity. Scheduling positions in the teaching plan do not change posted course due dates.

Previous lecture | Lecture index | Next lecture

Course on GitHub

Python

Access

Communicate

Electrical

EE Lectures

Series

Data Engineering

Applications

Object Detection πŸ‘οΈ
Text OCR πŸ‘οΈ
Pose Estimation πŸ‘οΈ
Electromagnetic Relay βš™οΈ
Servo Control SG90 βš™οΈ
Solid State Relay βš™οΈ
Fired Heater Control ⏱️
RAG Similarity Search πŸ—£οΈ
Generative AI πŸ—£οΈ
RAG LLM Integration πŸ—£οΈ
Biomechanics πŸ“ˆ
Air Pressure πŸ“
CO2 Sensors πŸ“
Humidity πŸ“
Light Intensity πŸ“
Location GPS πŸ“
Temperature πŸ“
πŸ‘οΈ=Computer Vision
βš™οΈ=Actuators
⏱️=Time Series
πŸ—£οΈ=Language
πŸ”Š=Audio
πŸ“ˆ=Regression
πŸ“Š=Classification
πŸ“=Sensors

Related Courses

Admin