I have been working on a 3x3x3 LED cube that I am trying to drive with the help of audio signals. So far, I have been able to program the string of 6 LEDs to act as a VU meter (inspired from What happened to the old ZXQ website? | ZXQ), directly being driven by audio input from A0.
Therefore, I was wondering whether I can make each LED in that string to act as a column of 3 (by putting LEDs in parallel) for the cube and get driven by 1 pin. Question is: since each LED requires 20mA for its operation, and the maximum current out of the pin is 40mA, I am short of current needed to drive the 3rd LED.
Can anyone suggest a transistor configuration that I can use to amplify the current and then drive the LED? I am getting inspired by the schematic in ths link :Arduino Playground - HomePage . However, I am skeptical as to whether the transistor here is working just as a switch or as a current amplifier.
Moreover, please see the attached pictures.
Any help will be appreciated. Complete newbie here. So bear with me!
I am skeptical as to whether the transistor here is working just as a switch or as a current amplifier.
I think you are misunderstanding what a switch and current amplifier are.
Current is sourced from the supply, it is switched by causing a smaller current to flow in the base of the transistor. The fact that it is a smaller current controlling a larger one means it is a current amplifier.
That second circuit will not work, you can't have LEDs in parallel and only one common resistor. This is because the currents will not be shared because the voltage drop on each diode will not be the same. http://www.thebox.myzen.co.uk/Tutorial/LEDs.html
Thanks for replying. I may have mis-phrased the question. The point I was trying to get at is, transistors can act as switches (in the sense that, when the base is driven, it allows a path for the current to flow from the collector to the emitter, thereby turning out the switch) and current/voltage amplifiers, right?
I know that the current is sourced from V_CC. But the configurations such as CE, CC, and CB of the transistor determines its behavior. What is confusing me here is, in the diagram, the transistor is configured in neither of these configurations, and it seems to be that the current from the pin driving the base makes it act like a switch.
About this statement:
:That second circuit will not work, you can't have LEDs in parallel and only one common resistor. This is because the currents will not be shared because the voltage drop on each diode will not be the same. :
If I have the same colored LED, why will it not have the same voltage drop?
Moreover, I am trying to get away from any type of common anode / common cathode LED cube design. Therefore, it is hard to utilize the tutorial you gave to my project.
If I have the same colored LED, why will it not have the same voltage drop?
No, each LED has it's own volt drop, it changes over its lifetime and also with temperature. So you need a series resistor for each LED.
it seems to be that the current from the pin driving the base makes it act like a switch.
Only if that current drives the transistor into what is known as the saturated region, otherwise it is a linear amplifier. Yes there are different configurations but these work by affecting the flow of current in the base. For example in a common emitter circuit the voltage on the emitter is tied to ground so the only thing controlling the base current is the base voltage. Where as in a common collector, or emitter follower the resistor is between the emitter and ground. Any current down the emitter raises the voltage on the emitter and backs off or reduces the voltage between the emitter and ground, thus choking off any base current and limiting it.
I see. I did check out the concept I had in mind out in the lab, and it turns out that ALL the leds did turn on exactly at the same voltage by the same amount (as far as visual perception of their brightness goes)
And yes, the transistors are either in their saturation / cut off regions when acting as digital switches
I am building a cube that cannot allow me to put a resistor next to each LED. Any idea how else I can get away with it?
I did check out the concept I had in mind out in the lab, and it turns out that ALL the leds did turn on exactly at the same voltage by the same amount (as far as visual perception of their brightness goes)
You did the tests wrong you can't connect LEDs in parallel.
Sorry no idea you seem to have painted yourself into a corner.
I can tell you without seeing the video. You are just trying it once and confusing functionality with design.
LEDs in parallel will not shair because the forward voltage of each LED is slightly diffrent. As the temperature changes and as the LEDs age they will change continuously. The current will not be shared and one LED will get more and so fail early, this causes more current down the others and they too will fail.