Try It Yourself / Design a Load Switching Circuit

Try It Yourself / Design a Load Switching Circuit

animation
electronics

Try It Yourself

After the quizzes, turn the rules back into a circuit. This relay exercise checks whether you can choose the part, size the resistor, and place the diode without copying blindly.

Challenge: Design a Load Switching Circuit

Objective: Select proper transistor, calculate component values, and draw complete circuit for microcontroller-controlled relay.

Specification:

  • Relay coil: 5V, 50mA nominal, 100Ω coil resistance
  • Microcontroller: Arduino Uno (5V GPIO; check the operating drive limits, not just the absolute maximum)
  • Requirement: Simple, low-cost circuit

Steps:

  1. Choose transistor type: BJT vs MOSFET? (50mA suggests a small BJT may be suitable)
  2. Calculate current: check the 50mA coil and turn-off transient against the selected part
  3. Calculate base resistor for BJT OR gate resistor for MOSFET
  4. Add flyback diode protection (inductive load!)
  5. Draw complete circuit with all component values

Solution:

Item Selection Reason
Transistor Candidate NPN BJT Select an exact manufacturer part and check its saturation, current, pinout, and thermal limits at 50mA
Base resistor About 560Ω from a 5V Arduino pin to the selected BJT base, after checking the pin’s source-current rating Gives about 7.7mA base current for the 50mA coil, a forced gain near 6.5; 4.7kΩ provides only 0.91mA and does not guarantee saturation
Flyback diode 1N4007 across relay coil Cathode/stripe to +5V, anode to transistor collector

Wiring map:

Arduino / Component Node Connects To
Arduino Pin 9 About 560Ω resistor, then selected BJT base
BJT collector Relay coil negative side
Relay coil positive side +5V supply
BJT emitter GND
1N4007 diode Across the relay coil, stripe/cathode to +5V

Expected Observation: Relay clicks ON when GPIO HIGH, OFF when LOW; the nominal base current is about 7.7mA with 560Ω. A MOSFET alternative needs a guaranteed on-resistance at the actual gate voltage and a suitable pull-down and driver.

Back to the chapter