-
Notifications
You must be signed in to change notification settings - Fork 0
1: Principles of Operation
In the LED Matrix board, the display elements are arranged in 8 rows and 16 columns to form an 8x16 matrix.
A single LED can be identified by its row and column number.
For analysis we will look at this simplified circuit of a 2x2 matrix design from this post.
(Note that the components shown are slightly different than the ones on the 8x16 board).
The column selection of [D1,D3], [D2,D4] is controlled by the Q1 and Q2 PNP bipolar junction transistors,
and the row selection of [D1,D2], [D3,D4] is controlled by the Q3 and Q4 NPN bipolar junction transistors.
For switching the "high side" voltage of the circuit, we want to "turn on" a PNP transistor so that the channel from emitter to collector opens; this requires that the voltage on the base be lower than that on the emitter (i.e. the base-emitter junction is in "forward bias") and that the voltage on the base be higher than that on the collector (i.e. the base-collector junction is in "reverse bias").
Since you also need to account for the internal emitter to base PN junction voltage drop of approximately 0.7 V, if the emitter is at 5.0V, the base needs to be at 4.3 V or less. In addition, the collector needs to be at a lower voltage relative to the base in order for current to flow from the emitter to collector. At a low enough voltage, the transistor will reach saturation and the emitter to collector voltage drop should be around 0.3 V. If the base voltage is higher than 4.3 V, then the transistor will be "off" and no current will flow from the emitter to the collector.
If we want to turn on Q1, we need to limit the current draw at the control pin using the R1 resistor. When grounding the control pin, the 100 ohm resistor shown will limit the current flow to ( 4.3 V - 0 V ) / 100 ohm = 0.043 amps.
(Because an Arduino Uno's GPIO pin can only sink 40 mA, a larger current limiting resistor would be needed for that application.)
For switching the "low side" voltage of the circuit, we want to "turn on" an NPN transistor so that the channel from to collector to emitter opens; this requires that the voltage on the base be higher than that on the emitter (i.e. the base-emitter junction is in "reverse bias") and that the voltage on the base be lower than that on the collector (i.e. the base-collector junction is in "forward bias").
Since you also need to account for the internal emitter to base PN junction voltage drop of approximately 0.7 V, if the emitter is at 0 V, the base needs to be at 0.7 V or more. In addition, the collector needs to be at a higher voltage relative to the base in order for current to flow from the collector to emitter. At a high enough voltage, the transistor will reach saturation and the collector to emitter voltage drop should be around 0.3 V. If the base voltage is lower than 0.7 V, then the transistor will be "off" and no current will flow from the collector to the emitter.
If we want to turn on Q3, we need to limit the current draw at the control pin using the R3 resistor. When driving the control pin to 5.0 V, the 1 kohm resistor shown will limit the current flow to ( 5.0 V - 0.7 V ) / 1000 ohm = 0.0043 amps.
(Since an Arduino Uno's GPIO pin can source up to 40 mA, the current limiting resistor is properly sized for this application.)
In the circuit below on the LED matrix board, instead of a 9 V battery we have the anode of the LED connected to the collector of a PNP transistor and the bottom of the resistor connected to the collector of an NPN transistor.
When both transistors are on and in saturation mode, the PNP's collector will be at 4.7 V and the NPN's collector will be at 0.3 V. This puts the LED in forward bias, with the current through it limited by the resistor.
For a 5mm red LED, there will typically be a 2.0 V forward drop from anode to cathode when turned on, but we do not want to exceed 20 mA of current through the device.
(see the datasheet of the actual LED used to determine the actual Vf and Imax values).
This means we want to have a voltage drop across the resistor of ( 4.7 V - 2.0 V - 0.3 V ) = 2.4 V.
To limit the current to the maximum of 20 mA, then the resistor needs to be at least ( 2.4 V / 0.020 mA ) = 120 ohms.
The actual maximum current allowed will be limited by the 5.0 V power supply for the board and heat dissipation of the board.
If all 128 LEDs are turned on at full brightness, they will need ( 128 * 0.020 Amps ) = 2.56 Amps, which produces 12.8 Watts.
This does not take into account the additional power used by the high and low side transistor circuit switches.