Result: Connecting a Relay to the Microcontroller (with Transistor, Resistor and Diode)
This is a test of the pressure switch circuit with the relay connected to the microcontroller via the transistor.
The pin of the microcontroller is connected to a transistor that will switch on the current that will fire the coil of the relay so the relay can switch on. The pin of the microcontroller has a resistor to the base lead of the transistor.
A protection diode is connected to the two leads of the relay coil to protect the transistor from a current spike from the relay coil. The diode is a signal diode 1N4001.
Comments and Additional Information
Have some code to share? Or additional information? Respond here:
You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.