Need help understanding and connecting UL2803A

Here is the datasheet of the UL2803A I am using: http://www.toshiba.com/taec/components2/Datasheet_Sync//393/22738.pdf

How do I hook it up so that I can sink 20 mA of current through a single led with a current limiting resistor? I currently have a digital pin connected to the base, and resistor + red led + 5 V to the collector. How would you calculate which resistor to use? Am I doing it incorrectly?

I think the gain is hfe = 1000. If that is so do I need a base current of 0.020 mA? If that is also so, then in the datasheet graph, it says it will typically draw 1.3 mA of current at the base if Vin = 5V? Does that I mean I need a current limiting resistor at the base as well, but the datasheet shows a 2.7k already there?

Also will the darlington pairs operate in the active or staturated mode? Should VC2 > VBE (1.4V) to work in active mode?

Sorry I'm so confused!

Thanks, s4n4te

bump

You will not need another base resistor and in round figures the data sheet says the collector emitter saturation voltage is about 1V, so a quick bit of ohms law will tell you the resistor needed in series with the led to obtain the required current. R = (5-1) - led voltage / 0.02

Having said that, leds always seem too bright to me so I would ignore it and try a 1k resistor first and see how things look ;D

I mad a complete hash of that last post before editing it, so if it is still wrong please slap me & correct it.

First of all: Suppose we want a nominal value of 20 mA through the LED, and suppose the "typical" LED characteristics are 2.0 volts across the LED at that current.

This is a very light load for the '2803, and the actual Vcesat will probably be on the order of 0.5-0.6 Volts.

So, the for 5 volts to the output circuitry, the voltage across your resistor will be something on the order of (5.0 - Vled - Vcesat) = (5.0 - 2.0 - 0.6) = 2.4 Volts

Then the resistance value would be (2.4 V) / (20 mA) = 120 Ohms

This is a nominal value based on "typical" characteristics of the '2803 for that particular diode.

Now, human eye response is quite non-linear, and a variation of plus or minus 10% (or even 20%) in the current of an individual LED may not be strikingly obvious, so using typical values is almost certainly OK.

Now the for an input voltage of 5 V, the input current for 20 mA output current is going to be something on the order of 1.5 mA according to the characteristic curves. This can be (cheerfully) supplied by your ATmega with no base resistor required.

The hfe is a dynamic current gain, operating in the linear region, and says that a change in input current causes the output to change by 1000 times as much. What that means for us, since we are not biasing the device to operation in the linear region, is that it won't stay in the linear region for very long as input current goes from zero to 1.5 mA. That's what saturation is all about.

This assumes, of course that you are applying enough voltage to the collector to make it operate saturated.

So: you have to apply a voltage that is at least 2.0 volts above Vcesat (the 2.0 volts is for the LED), and, maybe a little more to take into account worst-case conditions. Apply 5 Volts, and Bob's your uncle.

If you use a single transistor (2N2222, 2N3906, etc.) instead of the darlington pair, Vcesat for 20 mA collector current will be (typically) 0.2 volts - 0.3 volts, so you could easily use 3.3 Volts on the output circuit. With a plain old transistor, you would need a base resistor.

Regards,

Dave

leds always seem too bright to me

I agree. With old-style red or green LEDs 10 mA was about all I ever needed, and I usually seemed to end up with 6 or 7 mA. Newer high-efficiency ones look "about right" with something like 2 or 3 mA (for "normal" panel indicators, that is; not necessarily for large displays).

Starting out with 1K and working your way down sounds reasonable to me. (I usually start with 470 Ohms, but that's just me. I'm funny that way.)

Regards,

Dave

So the UL2803 doesn't operate in active mode?

I don't really understand this... I would assume that 1 - 8 would go to digital pins, 9 to ground, 10 to 5 volts, and 11 - 18 to the cathodes of your leds. I have 15 of these chips, but I have never tried them yet... :P

@s3n4te

So the UL2803 doesn't operate in active mode?

From your description (and my calculations), here are the conditions that exist for whichever of the '2803 drivers we are using:

1: We are driving the input to one of the '2803 bases high (+5 V) or low (0 V);

2: There is no feedback from that '2803 output (collector) to '2803 input (base).

3: The voltage applied to the output circuitry is high enough to try to make the collector go above the saturation voltage.

4: Nothing in the output circuitry has enough voltage drop to keep the collector voltage above the saturation voltage.

Under these conditions, the '2803 driver will not be operating in its linear range except for the (short, transitory) time that its output is changing from low to high or from high to low.

Regards,

Dave

@Jeremy1998

...don't really understand...

Well, whether you understand or not, your description of the connections is correct. (Personally, I often wish that I could say that I understand everything that I know, but...)

[edit]I just realized that your connection list was incomplete. It's correct as far as it goes.

But...

For each LED, the cathode goes to one of the driver output pins. The anode of each LED goes to a resistor (I showed how to calculate the value). The other end of each such resistor goes to +5Volts[/edit]

Here's a recommendation: Try one Arduino output to one section of the '2803 with an LED and resistor connected to that output and the other resistor to +5V.. Connect +5 and GND to the pins you saed. Make absolutely sure it works the way you expect. Then hook up the rest of them as you need. Just do a simple sketch that executes setMode(whatever, OUTPUT) and make a loop that changes the state of the LED every second (using digitalWrite()).

Then go on to bigger and better things with shift registers, oodles of '2803 and LED connections, etc.

Regards,

Dave

My book says that Vce sat should be around 0.2 V, but on the datasheet it says around 1 V. Is this because of the turn on voltage doubling to 1.4 V?

As in VCE = VBE - VBC = 1.4 - 0.3 = 1.1?

Oh, I understand the chip and wiring... I don't understand the active low and all that crap... I understand 8 transistors in a little plastic case with a common emitter and a source voltage pin(for what ever voltage you are powering your load with)...

@Jeremy1998

My book says...

What book? What kind of device?

For a single low-power silicon transistor, Vcesat might be expected to be something on the order of a couple of hundred millivolts.

However...

Each of the eight drivers in this package is built with a two transistors connected as a Darlington pair. Much higher current gain than a single, but higher Vcesat.

Maybe your book has something on that later on. Or, maybe, another book...

I mean, they could write a book about everything that I don't know.

Oh, wait---they already have. Lots of them!

Regards,

Dave

Ok, I get it now. Thanks a lot everyone especially davekw7x!

My book says

The rule in electronics is that the data sheet always has the last word over a text book.

Just a point on those devices, you can't have them switching their maximum current all at the same time due to power dissipation issues. http://www.thebox.myzen.co.uk/Tutorial/Power_Examples.html