April 2018
Beginner
552 pages
13h 58m
English
Relays are able to handle much more highly powered motors, since they are mechanical switches controlled by an electromagnetic coil that physically moves the contacts together. However, they require a reasonable amount of current to be turned on – usually more than 3.3V. To switch even small relays, we need around 60 mA at 5V (more than is available from the GPIO), so we will still need to use some additional components to switch it.
We can use the Darlington array (as used previously) or a small transistor (any small transistor, such as the 2N2222, will be fine) to provide the current and voltage required to switch it. The following circuit will allow us to do that: