Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

I want to design some circuit which is drive 4 of led-diodes with npn, pnp, diode.

Status
Not open for further replies.

kywous

Newbie level 5
Joined
Dec 23, 2010
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,352
I want to design some circuit which is drive 4 of led-diodes with npn, pnp, diode.

In my project our cpu has used most of its ports except only 2 ports.
And we have to control 4 LED with 2 ports
I want it operates separately in 4 conditions such as (High, Low),(H,H),(H,L),(L,H),(L,L)

I have some several Tr(npn, pnp) and resisters

How I solve this problem?
Help me.
 

I assume you mean 2 pins, i think this will work but i'm not sure,
you can connect 2 leds in each pin, one with the cathode to the pin and the other with the anode to the pin
and the other sides through one resistor for each led to the positive (anode) and gnd (cathode).
Using this configuration one led will be one when the output is 0 and the other when the output is 1,
and i think that you could turn off both leds if you change the pin direction to input.
This would work with an mcu that can supply about 10ma for the leds directly (like an AVR).
I don't know what you mean by cpu so you have to check the output of your device,
can it provide (0/5v) or is it open collector/drain?

Alex
 

it has to turn on only 1 LED separately.
ex) on off off off
off on off off
off off on off
off off off on
 
Last edited:

That's what my circuit does if your outputs can provide the current.
When you change the pin to input both leds will turn off.

4led.jpg

Alex
 

it has to turn on only 1 LED separately.
ex) on on on off
off on on on on
on on on on on
....

Do you want to be able to turn on all of them at the same time with individual control for each one?
I don't think you can do it with transistors.
 

TI msp430G2231 thank you
 

The datasheet of your device says that you can source and sink the 10mA,
there is a small voltage drop, about 2.6v output voltage with a 3v power supply.
It also says that the total output current should be less than 48mA for all outputs combined or the voltage drop increases.
The typical max pin current is 6ma to have 3v out after that you get a voltage drop.
check page 19 and 20 https://www.ti.com/lit/gpn/msp430g2231

Alex

---------- Post added at 02:11 ---------- Previous post was at 01:43 ----------

To conclude what i said above, the typical output is 6mA sink or source with a voltage drop of 0.3v (+0.3v instead of 0 and 2.7v instead of 3v) with 3v power supply.
This voltage drop will increase if the total current of all pins is above 48mA.
The graph of the output current VS output voltage shows that you can sink or source more current but with an additional voltage drop.
I assume that if you go over the 48mA limit then the voltage drops in all the pins (not just the ones pulling current) but since you are going to light only one led this shouldn't be a problem.
I don't know how much current you use in the other pins or if you have more leds.

Alex
 
Last edited:
  • Like
Reactions: kywous

    kywous

    Points: 2
    Helpful Answer Positive Rating
thank you~
 
Last edited:

Yes i'm trying that, you can use a push-pull npn/pnp with the emitters connected and to the 2 leds as in my previous connection but i don't know if you will be able to turn them off when you configure the pin as input.

4led_transistor.jpg

this configuration pulls a low current from the base and maybe the chip will provide that even in input mode and the led will not turn off completely.
In this configuration the base current is limited because the load is connected to the emitter, the base resistor in not needed but maybe it will help to turn off the leds and also i don;t like to connect directly transistors to mcu.

Alex
 
Last edited:
  • Like
Reactions: kywous

    kywous

    Points: 2
    Helpful Answer Positive Rating


What about this circuit?
Except current problem because it is fixable
And in ADS how I test LEDs?

Help me.
 

I don't know ADS, sorry.
I'm trying your design.

Alex
 

It doesn't work in my simulation, only your D4 (D8 in mine) light with signal PB (lower signal)
The other 3 leds are always off.

led4-2.jpg

Alex
 

then i have to find other ways
thank you so much~
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top