![]() ![]() This means that when the GPIO is on, we have 3.3 - 0.7 = 2.6V at the resistor. The tension between the base and the emitter (Vbe) is considered constant and Vbe = 0,7V. We approximate B = 100.Īs our fan is rated as 200mA, we need at least 2mA through the base of the transistor. Ic is the current that flows through the collector the emitter, Ib is the current that flows through the base to the emitter, and B (beta) is a value depending on each transistor. The current that will be allowed to flow from the collector (C) to the emitter (E) is: By doing this, we have a switch that will connect or disconnect the ground wire from the fan to the ground of the raspberry pi.Ī NPN BJT transistor conducts depending on the current that flows in its gate. In order to control the fan, we need to use a transistor that will be used in open collector configuration. Fan's ground must be connected to the Collector, and Rpi's ground must be connected to Emitter. Check your transistor doc for Emitter, Base and Collector pins. Diode's cathode must be connected to the +5V (red) wire, and anode must be connected to the GND (black) wire. Resistor can be plug in either way, but be careful about transistor's and diode's direction. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |