[SOLVED] Controlling high voltage using two transistors

Status
Not open for further replies.

gaubar

Newbie level 4
Joined
Jul 2, 2013
Messages
6
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Visit site
Activity points
65
I want to control a led matrix consisting of "pixels" with 9 leds each. These "pixels" will have to be driven by a 24volt line. I need a circuit that can be controlled from a microcontroller.

My thought was that i could use two transistors on each side of the pixels to control it. One transistor is for the row, the other for the column. So to turn on one pixel, you would have to turn on the column and row transistor of that pixel.

So I want to send 24 volt through the anode of the pixel from one transistor, and ground it through the other transistor. How can I do this? The transistor would be turned on and off by shift registers, but thats not my problem, it could just as well be controlled directly from the microcontroller.

Here is where ive gotten so far:


The pixel would get 24 volt when the top transistor is switched off, and it would get zero when the transistor is switched on. Also no current will flow until the bottom transistor is switched on. So to turn the led on, the top transistor has to be switched off, and the bottom one on. My problem is when I switch the top transistor on, all the current will have to go through the resistor on the top (R2). This will cause it to break. How can i avoid this? Is there another way to do this?
 

Look through INSTRUCTABLES - there are many such projects. You may learn about better techniques.

Nobody can truly comment as you did not give the Vd nor maximum current for the LEDS. Vd can vary from say 1V6 to 3V6 or more.
 

Vd is around 2V, and maximum current is 0.02A. This was not really my problem though.

When the top transistor is off, there will be "24V - voltage drop accross the top resistor" at the point where the "pixel" is connected. There all the LED will light up when the bottom transistor is turned on.
When the top transistor is on(5V input from microcontroller), there will be 0V where the "pixel" is connected - and the voltage has to drop accross the resistor - the resistor can not handle this i assume, so therefore this will not work. Any ideas?

If you know any good INSTRUCTABLE, please point me in the direction! I have been looking for a long time. But I need 24!V across the "pixels".
Most of the instructables ive seen have been using shiftregisters directly to source(also wrongly, because there will be to much current drawn from them), and just one transistor to sink the current.
 

when Ti is off total Vd is 18V across the LEDs, and difference across R2 is about 5V3, so current is about 18mA, so power is about 100mW - use 1/4 W resistor

but when T1 is on, R2 has to handle about 1W5, so it should be a 3W
 
Last edited:

Yes it has to be 3W or something. And it would waste a lot of energy as well. When all leds are off, it would go close to 2A through the circuit (when having 24 coulmns). Not sure if that is really a good design.

But thanks anyway. I might have to do this in a completely different way...

EDIT:
Could I use transistor T1 to limit the current through resistor R1 by not turning it completely "on"? And if I get the point where the "pixel" is connected below (Vd * 9 = 2*9 = 18V), say to 16V, the leds will not turn on?

- - - Updated - - -

Would it be possible to use a PNP transistor or maybe N or P channel MOSFET in series with the positive side of the leds? ie having no ground connecting on the top at all.

What I am aiming for is a relay function using transistors(maybe MOSFET?).
 
Last edited:

I suppose you could make T1 a PNP, connect the top of LED string to the collector, emitter to R2
 

Making T1 a pnp wont work, because then I need to control it with 0V and 24V, and this cannot be done from the microcontroller directly. However, placing the original NPN transistor in between the microcontroller and the PNP transistor, I got it working.

Here is the working cicuit, tested on 9 LEDs in series:


Now when switching on 5V to T1, it will ground the base of T3, causing T3 to turn "on" and allowing current to flow, creating ~24V across the leds.
When switching off T1 (0V), it will elevate the base of T3 to 24V, causing T3 to turn "off" and no current will flow, making the leds turn off

I havent look that much at the resistor values, but to get it working(for the circuit im planning to make) I need to allow 0.12A through T3.
 
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
Here is the working cicuit, tested on 9 LEDs in series
Yes, that's how everyone does similar things.

Next you should design a mux scheme. You'll usually one column and multiple (constant current driven) rows or vice versa. The driver supplying multiple "pixels" at a time will ususally need higher current rating, e.g. several Also the pixel current possibly needs to be increased to maximum rated LED peak current with higher mux ratios.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…