Project 2: Design and Test a Protected Switched-Load Module
Build a reusable module that lets a 3.3 V logic pin switch and dim a 12 V load: a logic-level MOSFET with gate resistor and pull-down, a flyback diode, a shunt for current measurement, PWM dimming checked with a multimeter and scope, a thermal check, a soldered perfboard version, and a hidden-fault troubleshooting exercise.
The scenario
Greenline Display Studio installs LED strip lighting and small pumps in shop windows. Their controller boards use 3.3 V logic, but the loads are 12 V. They want a standard switched-load module that any board can use: a logic pin turns the load on and off, PWM dims it, a shunt lets them measure the current, and the module survives a mistake such as an unplugged or inductive load. You are asked to design, build, test and document a prototype.
Requirements:
- Switch: a logic-level N-channel MOSFET on the low side of the load, with a gate resistor (about 100 Ω) and a 10 kΩ gate pull-down.
- Protection: a flyback diode across any inductive load (pump or relay), and a fuse or current limit on the 12 V input.
- Common ground between the logic side and the load supply.
- Measurement: a shunt resistor (for example 0.1 Ω, 1 W) in series with the ground return so that load current can be read as a voltage; the load current must be well inside the MOSFET’s rating (at least a factor of 2 margin).
- PWM: a PWM signal at about 1 kHz from a microcontroller or a function generator. Test at 10, 50 and 90 percent duty and compare the average load voltage with the prediction (V_supply × duty).
- Thermal: calculate the MOSFET’s conduction loss (I² × R_DS(on)) and measure its temperature rise by hand or with a thermometer.
- Build it on perfboard with clean soldering, a connector for the load and for logic, and labels.
- Troubleshoot: a classmate or you (using a second copy) introduces one hidden fault; find it using the method from the lesson, and document the order of checks.
What you need
- A logic-level N-channel MOSFET (for example IRLZ44N, or an SMD part on a breakout), a 12 V supply with a current limit, a load (LED strip, 12 V lamp or small relay), a Schottky or 1N4007 diode, resistors, a 0.1 Ω shunt, a perfboard, a soldering iron, solder, multimeter, and a scope if possible.
- A microcontroller board or a function generator to supply PWM.
- The MOSFET’s datasheet, with R_DS(on) at V_GS of 3.3 V (or 4.5 V) highlighted.
Work with 12 V or less and a current limit on the supply. Wear safety glasses when soldering.
Phase 1: design
Record these in your notebook:
| Item | Calculation | Result |
|---|---|---|
| Load current | V_supply / R_load, or the measured value of the real load | |
| MOSFET margin | Rated I_D versus load current; target at least 2 times | |
| Conduction loss | I² × R_DS(on) at your V_GS | |
| Shunt voltage and loss | V = I × R_shunt and P = I² × R_shunt | |
| Expected average at 10, 50 and 90 percent duty | V_supply × duty | |
| Gate drive | V_GS at 3.3 V against the datasheet’s R_DS(on) curve |
Check that R_DS(on) is specified at your gate voltage. If it is only given at 10 V, choose another part.
Phase 2: breadboard the module
- Build the circuit on a breadboard: load from +12 V to the MOSFET drain, source through the shunt to ground, gate through 100 Ω from the logic pin, 10 kΩ gate to ground, flyback diode across the load (cathode to +12 V).
- Test with DC: drive the gate from 3.3 V by hand, measure V_DS when on (should be tiny), the load current and the shunt voltage, and calculate R_DS(on) = V_DS / I.
- Test PWM at 1 kHz with duty 10, 50 and 90 percent. Measure the average load voltage with a multimeter and the waveform with a scope (gate and drain). Compute the error against V_supply × duty.
- Inductive load test: if you have a small relay or motor, compare the drain waveform with and without the flyback diode. Only do this on a low-voltage supply, with the scope probe set to x10, and stop if anything gets hot.
- After running the load for ten minutes, check the MOSFET temperature.
Phase 3: build and solder
- Plan the perfboard layout on paper first, keeping the high-current path short and wide, and the gate wiring away from the load wiring.
- Solder the parts with clean, shiny joints. Add connectors for 12 V in, load out, and logic (gate and ground).
- Inspect under good light, check for bridges, and measure resistance between the supply and ground before applying power (it should not be a short).
- Power up with the current limit low and repeat the PWM tests on the soldered board.
Phase 4: hidden fault and documentation
- Have a partner (or yourself, from a spare copy) introduce one fault: a reversed diode, a missing ground, a cold joint, a wrong gate resistor.
- Find it by following the method: look, check for shorts with the power off, apply limited power, check rails, check each stage. Record the order of your checks and how long it took.
- Write up the final schematic, parts list, test results and the fault-finding record.
Acceptance test
| # | Check | Evidence |
|---|---|---|
| 1 | Logic-level MOSFET with R_DS(on) specified at your gate voltage | Datasheet excerpt |
| 2 | Flyback diode across the load | Schematic and photo |
| 3 | Gate pull-down fitted | Schematic |
| 4 | Common ground between logic and supply | Schematic and test |
| 5 | MOSFET rated at least twice the load current | Calculation |
| 6 | Conduction loss 500 mW or less | Calculation and temperature check |
| 7 | PWM tested at a duty cycle between 10 and 90 percent | Scope screenshot or notes |
| 8 | Average output within 5 percent of prediction | Table of expected and measured |
| 9 | Soldered perfboard version | Photo |
| 10 | Hidden fault found with a recorded method | Fault-finding record |
| 11 | Documentation | Your documents |
Hands-on lab: encode the acceptance test
Stretch goals
- Add a current-sense amplifier (an op-amp measuring the shunt voltage) so a microcontroller ADC reads the load current.
- Add overcurrent shutdown: a comparator that turns the gate off if the shunt voltage passes a limit.
- Make a P-channel high-side version and compare the wiring and the gate drive.
- Measure the efficiency of the module at 50 percent duty and explain the losses.
Your deliverable
A module datasheet and test report: the schematic, calculation table, photos of the perfboard, expected-versus-measured PWM table, the thermal result, the fault-finding record, the acceptance table with evidence, and three risks (for example inrush current of lamps, switching noise, a connector wired the wrong way) with how you would reduce each.
At 50 percent PWM the average voltage on the load reads 6.3 V from a 12 V supply, 5 percent above the predicted 6 V. Is that a problem?
The 5 percent difference is at the limit of the acceptance test, so look for causes: the MOSFET’s R_DS(on) and the shunt drop reduce the on-voltage (which would lower it), while the duty cycle of your PWM source may be a little more than 50 percent, or the meter may be inaccurate on pulsed signals. Check the actual duty on the scope and the supply voltage under load before deciding.
Can You Explain It?
Close the lesson and answer these without looking back. The goal isn't the wording — it's whether you've formed a usable mental model.
- Explain why each protective part (gate resistor, pull-down, flyback diode, fuse) is in the module.
- Show how you predicted and measured the average voltage at three duty cycles.
- Describe the order of checks you used to find the hidden fault.
🧪 Want to practise this on your own computer? See how to set up your lab →