In this chapter, we learned how to switch things on and off. We commenced by briefly reviewing a typical relay driver circuit, before learning how to measure the current requirements of a DC motor, LED, and relay using a multimeter. Next, we discussed the properties of an optocoupler and learned at low to use it as a digital switch. Then, we discussed MOSFETs and discovered how to use them as a switch and for motor speed control using PWM.
The information, circuits, and exercises you have learned in this chapter will help you to make informed decisions and make the necessary calculations and measurements to select suitable components and create circuits that can be used to switch devices on and off and other loads that demand more current and higher voltages that can be sourced safely from a Raspberry Pi pin.
Our approach to this chapter was to incrementally explore and build a relay driver circuit, which provides you with a practical example of how and why switching...