Pages: [1] 2   Go Down
Author Topic: 74138 family choice?  (Read 2111 times)
0 Members and 1 Guest are viewing this topic.
Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd like to use two 74138 3:8 decoders (wired into a 4:16 decoder) to control 16 rows of LEDs via logic level P channel MOSFETs. Does it matter if I use a 74hc138, 74hct138, 74ac138, etc.? Would there be any benefit in redoing the circuit to use 74238s and N channel MOSFETs?

Thanks as always.
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I believe that '138 style encoders only have 1 pin true at a time, meaning you'll need to continually
scan the Leds, You might be better off using 8-bit latches instead.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27353
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd go with shift register like TPIC6B595, can take high voltage & high current, fewer control lines needed than using two 74138's also.
87 cents at avnet.com
Use them to pull cathodes low.
Or, use them to pull P-channel gates low with resistor to +12 or whatever your high side voltage is to turn the p-channel off as shown below.



* Common-Cathode-driver.png (36.9 KB, 2151x1085 - viewed 51 times.)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12443
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, quick family survey:

TTL or LS TTL (ie 74xx or 74LSxx) - ancient, fast, power hungry, only works at 5V, low noise margin.  Don't use if can be helped.
HC - ie 74HCxx - fast, works from 2V to 6V,  low power, good noise margin, good general choice.
HCT - ie 74HCTxx - fast, only works at 5V, low power, has TTL compatible threshold voltage (low noise margin), but will work with 3.3V inputs
AC - ie 74ACxx - fast, low power, tolerates higher voltage inputs than the power rail. 2..6V I think.
4000 CMOS  (ie CD4xxx) - very slow, 3V to 15V supply!,  low power, very low output drive (less than 1mA at 5V IIRC).

HC family is a good all-round choice, will work at 3V3 as well as 5V, good output drive, fast, low power, cheap...
Logged

[ I won't respond to messages, use the forum please ]

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

While I agree with the above statements, none of them actually answer the OP's original question.

To answer that...

The HC, HCT, etc refer to the internal workings of the chip and how they are constructed.  You don't need to know those as such, only the knock-on effect.

Which is the differences in what is known as the "Static Discipline".  This is the set of voltage levels used for input and output logic values.  You can get these from the data sheet for the device.  Unless you have specific logic level requirements that are out of the ordinary, then you don't need to worry overmuch about them.

In general, the Arduino itself is very close to HC (High-voltage CMOS [i.e., 5v]).  The HCT is a "TTL" version of the HC, which has fixed voltage levels for the input logic HIGH (among other things) that make it useful for use in mixed voltage circuits (as level shifters, etc).  LS is Low-powered shottky.  Read the data sheets for the differences.

But yes, specific LED driving buffer chips would be far better.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks everybody for your comments. @MarkT that was a great table of info; @CrossRoads thanks for the TPIC6B595 idea, I just ordered some to evaluate.

I apologize for not being clear enough. The project is really a 24x16 LED matrix. 3 TLC5916s control the column cathodes and a 4:16 decoder made from 2 74AC138s connected to 16 P-channel logic level MOSFETs control the row anodes. I drive the LEDs @ 100 mA each to compensate for them only being on 1/16th of the time (the spec sheet says it's OK to drive them up to 120 mA if the pulse is < 0.1ms; I'm updating @ 50 KHz so no problem there).

When I run the entire circuit at 5V everything works but the LEDs aren't spectacularly bright. When I run the LEDs at 12V they're bright enough, but I get ghosting on the rows.

When I originally posted yesterday I though the problem was the 74AC138s not switching the MOSFETs off fast enough, but after a night of research now I think it may be capacitance decay in the MOSFETs (not sure if I'm using the correct term). Currently their gates are connected directly to the pins of the '138s and other posts here etc. suggest I need a pull up/down resistor to fix the ghosting.

Since I'm using a P-channel MOSFET this would mean I'd have to use a pullup to 12V? Wouldn't that voltage propagate backwards and hurt the 74AC138?

Alternatively, I could redesign using 74HC238s (non-inverting version of the 74138) and use N-channel logic level MOSFETs with a pulldown resistor to ground, would that be a better way to go?
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27353
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

TPIC6B595 can be used with pullup  to 12V (or 50V even) to turn off MOSFET and can sink large currents low to turn on the MOSFET.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Which P-channel mosfets are you using - in particular, are they meant for 5V gate drive, and do they have a low enough Rds(on) at 1.6A drain current? 50KHz is a high multiplexing frequency and depending on the mosfet, they might be a little slow turning on and off when driven from a 74AC138.

The TLC5916s need about 1V on the output pins to function correctly, leaving 4V for the LED and mosfet. Do you know what the voltage drop of the LED is @ 100mA?
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Which P-channel mosfets are you using - in particular, are they meant for 5V gate drive, and do they have a low enough Rds(on) at 1.6A drain current? 50KHz is a high multiplexing frequency and depending on the mosfet, they might be a little slow turning on and off when driven from a 74AC138.

I'm using these:

http://www.digikey.com/product-detail/en/IRLML2246TRPBF/IRLML2246TRPBFCT-ND/2639576

I think drain current would be 2.4A (24 LEDs @ 100 mA ea), if I'm reading the spec sheet right Figure 13 says Rds(on) for 2.4A would be about 100 m Ohm?

Quote
The TLC5916s need about 1V on the output pins to function correctly, leaving 4V for the LED and mosfet. Do you know what the voltage drop of the LED is @ 100mA?

Here's the spec sheet for the LEDs:

http://www.us.kingbright.com/images/catalog/SPEC/APT3216SYCK.pdf

The charts don't show anything above 50mA in but by extrapolating I think would be 2.5 - 3 V?
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Offline Offline
Edison Member
*
Karma: 33
Posts: 1468
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is also the '154 series of 4 line to 16 line decoders.
Logged

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

TPIC6B595 can be used with pullup  to 12V (or 50V even) to turn off MOSFET and can sink large currents low to turn on the MOSFET.

Do you mean replace the 74AC138s with TPIC6B595s, keep the existing MOSFETs, and add a pullup resistor (10K?) from drain to gate on each MOSFET?

There is also the '154 series of 4 line to 16 line decoders.

Thanks for that chip, if it turns out I'm just using the wrong MOSFETs I may redesign to use it & simplify the circuit.
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12443
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Which P-channel mosfets are you using - in particular, are they meant for 5V gate drive, and do they have a low enough Rds(on) at 1.6A drain current? 50KHz is a high multiplexing frequency and depending on the mosfet, they might be a little slow turning on and off when driven from a 74AC138.

I'm using these:

http://www.digikey.com/product-detail/en/IRLML2246TRPBF/IRLML2246TRPBFCT-ND/2639576

I think drain current would be 2.4A (24 LEDs @ 100 mA ea), if I'm reading the spec sheet right Figure 13 says Rds(on) for 2.4A would be about 100 m Ohm?


No, they have Rds(on) of 54 milliohms at 5V gate drive, so will dissipate about 300mW max.  Use 150 ohm gate resistors and they should switch in about 300ns, should be fast enough.
Logged

[ I won't respond to messages, use the forum please ]

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Use 150 ohm gate resistors

Do you mean a resistor between the output pin of the 74AC138 and the gate pin of the MOSFET?
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12443
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, logic outputs are best protected from current spikes caused by trying to try and drive a capacitance of more than a couple of hundred pF.
power MOSFET gates are very capacitive.
Logged

[ I won't respond to messages, use the forum please ]

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27353
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Do you mean replace the 74AC138s with TPIC6B595s, keep the existing MOSFETs, and add a pullup resistor (10K?) from drain to gate on each MOSFET?
That's exactly what I mean.
Quote
I'm updating @ 50 KHz so no problem there
So you need to send 2 bytes to the shift register every 20uS? You have 320 clocck cycles to get an update out.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1] 2   Go Up
Jump to: