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}\).
- Resistor voltage \(=5-2=3\,\mathrm{V}\).
- \(R=3/0.005=600\,\mathrm{\Omega}\).
- 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.
A flyback path limits turnoff voltage; the diode is reverse-biased while the coil is powered.
Worked example. Switch a DC valve coil.
- Verify supply voltage, coil current and startup.
- Select a driver with documented input drive, load and thermal ratings.
- 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}\).
- \(P_{\mathrm{load}}\approx12(0.30)=3.6\,\mathrm{W}\).
- \(P_{\mathrm{cond}}=(0.30)^2(0.10)=0.009\,\mathrm{W}=9\,\mathrm{mW}\).
- 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.
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}\).
- \(D=0.5/1=0.50\); \(f=1000\,\mathrm{Hz}\).
- \(\overline V=0.50(5)+0.50(0)=2.5\,\mathrm{V}\).
- 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.
- Begin with an approved LED or harmless dummy load. Predict and check digital OFF and ON before PWM.
- 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.
- 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.
- Record actual commands and the observed voltage or actuator response. Obtain load current only through an appropriate sensor interface or approved independent instrument.
- 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
| Command | Ideal settled mean for 0-5 V PWM | Observed response | Current if measured |
|---|---|---|---|
| 0% | 0 V | Record | Record |
| 25% | 1.25 V | Record | Record |
| 50% | 2.50 V | Record | Record |
| 75% | 3.75 V | Record | Record |
| 100% | 5.00 V | Record | Record |
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.
- Why does the switch dissipate much less power than the load in the stated example?
- How can a suppression choice affect a valve release time?
- What physical evidence would support a usable pump-command range?
π Nomenclature
| Symbol | Meaning | Example value |
|---|---|---|
| \(V_s\) | Load/LED supply | 12 V / 5 V |
| \(V_F\) | LED forward drop | 2 V |
| \(I\) | Operating current | 5 mA LED; 0.30 A coil |
| \(R\) | LED resistor | 620 \(\Omega\) |
| \(P_R\) | Resistor heat | 0.0145 W |
| \(R_{\mathrm{on}}\) | Switch on-resistance | 0.10 \(\Omega\) assumed |
| \(P_{\mathrm{load}}\) | Load power | 3.6 W |
| \(P_{\mathrm{cond}}\) | Conduction loss | 9 mW |
| \(D\) | Duty fraction | 0.50 (unitless) |
| \(t_{\mathrm{on}},T\) | On-time/period | 0.5; 1 ms |
| \(f\) | Switching frequency | 1000 Hz |
| \(V_H,V_L\) | High/low voltage | 5; 0 V |
| \(\overline V\) | Mean voltage | 2.5 V |
MOSFET on-resistance is a supplied assumption, not a rating inferred from a module photo.
π Resources and Source Materials
- APMonitor: related Electrical Engineering lesson
- MCU Studio operating and measurement instructions
- Process Control project requirements
- Lecture reference 1: apmonitor.com
- Lecture reference 2: www.vishay.com
- Lecture reference 3: www.ti.com
- Instructor guide: preparation and assessment notes
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.