Maker Pro
Maker Pro

lighting a 7 segment LED

Status
Not open for further replies.

foTONICS

Sep 30, 2011
332
Joined
Sep 30, 2011
Messages
332
KBNZ, at the risk of hijacking the topic

hi-jack away, I've gotten my answer


Thanks everyone for all the help and insight. I've applied the corrections, given each segment it's own resistor and the display couldn't be brighter (even when the "8" is lit).
 

dncky

Nov 10, 2013
15
Joined
Nov 10, 2013
Messages
15
You don't need a separate MOSFET for each strand. Each "strand" of five LEDs in series needs its own current limiting resistor in series with the five LEDs, as you said. Then each segment can be made into a two-terminal unit by connecting the four strands in parallel. This makes each "segment" similar to a single LED, like you would find in a standard seven-segment display, but with the following differences:

1. No other series resistors are needed, and none should be used, because each segment includes its own current limiting and is simply voltage-driven.

2. The total current consumption of each segment is equal to the current per strand multiplied by the number of strands, so you will need to use MOSFETs (or transistors, but MOSFETs are easier to drive) for the segment lines, unless you are running the LEDs at very low current. (If you have more than one digit, multiplexed, you will also need a MOSFET for each digit enable line.)

3. Each segment needs a total voltage equal to five times the LED forward voltage plus an allowance for voltage drop across the series resistor. I use a rule of thumb that the voltage across the series resistor should be at least 15~20% of the total voltage. Generally, 20% is about right, unless you're using poor-quality LEDs whose forward voltage is more variable; in that case, 25~30% is better.

So say you want to run the LEDs at 20 mA and each strand has five LEDs, each of which drops 2.4V at 20 mA. The total LED voltage is 12V, and 12V should be about 80% of the total strand (and segment) voltage, so the total segment voltage should be 15V, which leaves 3V (20% of 15V) across the limiting resistor in each strand.

Assuming no significant voltage drop in the driving MOSFET(s), you will need a supply voltage of +15V. (Recalculate that value depending on the actual forward voltage of the LEDs; you can fine tune the display to a convenient power supply voltage such as 24V by increasing the voltage drop across the series resistors.)

If you have a single digit, it's simplest to common the anodes of the segments and connect them to the high positive supply, and switch the cathodes to 0V using N-channel MOSFETs with their sources connected to 0V and their gates driven by the microcontroller (or other logic circuitry).

If you are going to be multiplexing several digits, it's simplest to wire the displays as common anode, and switch the high positive supply to the digit anodes using a level shifter for each digit; a simple level shifter is a small N-channel MOSFET driven by an active high digit enable signal, with grounded source, whose drain pulls low the gate of a larger P-channel MOSFET with its source tied to the high positive supply; when this happens, the MOSFET feeds the high positive supply out its drain and to the common anode of its digit. The P-channel MOSFET needs a gate-source resistor and possibly gate overvoltage protection. The cathodes would be driven by N-channel "segment enable" MOSFETs as usual.

If you can give me more information I will draw up a diagram. You need to tell me:
a. What is the operating current of each LED?
b. What is the forward voltage of each LED at that current? Give minimum, typical and maximum figures.
c. How many digits do you want?
d. Do you want them multiplexed?
e. What high positive power supply voltage do you plan to use?
f. What voltage is the logic circuitry running at?
g. Do you want to use through-hole or surface-mounted components?

Thorough, thanks. I bought a couple of these

http://www.ebay.com/itm/18119947329...eName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

I think the listing says 2.1 drop. I believe 20mA is standard so that's what I think Ill do.

I have 2 digits so 14 segments. No multiplexing, Ill have enough pins I believe. Im going to spring for a 12v supply and Ill have a 5V rail for the circuitry.

All Ive got to figure out is how Im going to hook up the N channel mostfet
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
Thorough, thanks. I bought a couple of these

http://www.ebay.com/itm/18119947329...eName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

I think the listing says 2.1 drop. I believe 20mA is standard so that's what I think Ill do.

I have 2 digits so 14 segments. No multiplexing, Ill have enough pins I believe. Im going to spring for a 12v supply and Ill have a 5V rail for the circuitry.

All Ive got to figure out is how Im going to hook up the N channel mostfet


The Vf drop depends on the colour. Normally 2.1V should be yellow or green. Red is around 1.7V and blue and white 3V +. 20mA for Ultra Bright could be more than enough, depending on what you want to do.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
The Vf drop depends on the colour. Normally 2.1V should be yellow or green. Red is around 1.7V and blue and white 3V +. 20mA for Ultra Bright could be more than enough, depending on what you want to do.

Have a look at Digikey's LED range sometime, sorted by colour. There's actually quite a lot of variation in forward voltage for a given colour, even within the "indicator" category.

I have 2 digits so 14 segments. No multiplexing, Ill have enough pins I believe. Im going to spring for a 12v supply and Ill have a 5V rail for the circuitry. All Ive got to figure out is how Im going to hook up the N channel mostfet
It's very straightforward.
If you have a single digit, it's simplest to common the anodes of the segments and connect them to the high positive supply, and switch the cathodes to 0V using N-channel MOSFETs with their sources connected to 0V and their gates driven by the microcontroller (or other logic circuitry).
So:
+12V to anode of segment.
Cathode of segment to drain of N-channel MOSFET.
Source of MOSFET to 0V rail (common ground of +5V and +12V rails).
Gate of MOSFET driven from microcontroller I/O pin.
Pulldown resistor from gate to source of MOSFET (to prevent floating MOSFET gate during reset etc) - 10k or 100k is fine.
It's also common to insert a low-value resistor between the microcontroller output and the MOSFET gate - something like 47 ohms - because of the MOSFET's gate-source capacitance, but this is probably not important with a small MOSFET that's not being switched constantly.

When firmware drives the pin high, the MOSFET conducts and illuminates the segment.

Traditional MOSFETs BS170 and 2N7000 will work. 2N7000 is slightly better; it has a guaranteed RDSon of about five ohms at Vgs=4.5V.

A much better option is the Zetex / Diodes Inc ZVN4206: http://www.digikey.com/product-detail/en/ZVN4206AV/ZVN4206AV-ND/190158
This has a guaranteed RDSon of 1.5 ohms at Vgs=5V and 500 mA drain current.

An even gruntier alternative is Vishay Siliconix IRLD110: http://www.digikey.com/product-detail/en/IRLD110PBF/IRLD110PBF-ND/812489 which is packaged in a 4-pin 0.3" DIP (optocoupler style).

There are other MOSFETs that have better specifications, including several (NTD4906N, NTD4963N and NTD4815N) from ON Semiconductor, but they have much higher gate capacitance and are a bit out-of-place, even though they are cheap.

All the devices I've suggested here are through-hole (wire leaded). Most are TO-92 or E-line.
 

dncky

Nov 10, 2013
15
Joined
Nov 10, 2013
Messages
15
Have a look at Digikey's LED range sometime, sorted by colour. There's actually quite a lot of variation in forward voltage for a given colour, even within the "indicator" category.


It's very straightforward.

So:
+12V to anode of segment.
Cathode of segment to drain of N-channel MOSFET.
Source of MOSFET to 0V rail (common ground of +5V and +12V rails).
Gate of MOSFET driven from microcontroller I/O pin.
Pulldown resistor from gate to source of MOSFET (to prevent floating MOSFET gate during reset etc) - 10k or 100k is fine.
It's also common to insert a low-value resistor between the microcontroller output and the MOSFET gate - something like 47 ohms - because of the MOSFET's gate-source capacitance, but this is probably not important with a small MOSFET that's not being switched constantly.

When firmware drives the pin high, the MOSFET conducts and illuminates the segment.

Traditional MOSFETs BS170 and 2N7000 will work. 2N7000 is slightly better; it has a guaranteed RDSon of about five ohms at Vgs=4.5V.

A much better option is the Zetex / Diodes Inc ZVN4206: http://www.digikey.com/product-detail/en/ZVN4206AV/ZVN4206AV-ND/190158
This has a guaranteed RDSon of 1.5 ohms at Vgs=5V and 500 mA drain current.

An even gruntier alternative is Vishay Siliconix IRLD110: http://www.digikey.com/product-detail/en/IRLD110PBF/IRLD110PBF-ND/812489 which is packaged in a 4-pin 0.3" DIP (optocoupler style).

There are other MOSFETs that have better specifications, including several (NTD4906N, NTD4963N and NTD4815N) from ON Semiconductor, but they have much higher gate capacitance and are a bit out-of-place, even though they are cheap.

All the devices I've suggested here are through-hole (wire leaded). Most are TO-92 or E-line.

Awesome. Parts on the way. Ready to experiment
 

dncky

Nov 10, 2013
15
Joined
Nov 10, 2013
Messages
15
Got it. Everything works fine. Mosfet works perfectly. Now the only thing I worry about is the segments visibility in daylight. So excited. Will test tomorrow!
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
You can use optical filters to increase the contrast of the displays. This will also help in daylight viewing.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,880
Joined
Jun 21, 2012
Messages
4,880
@Mark2019: No, first is learning how to read and observing this thread was started on November 11, 2013.

@KrisBlueNZ sadly passed away in 2015. We miss him, but this thread is DEAD. It should have been closed by a moderator after November 27, 2013 when @ligo.george made the last relevant post, #28.

I guess the new owners just can't be bothered right now with cleaning things up and taking out the trash. There are a lot of abandoned and/or dead threads that continue to pop up in the forum listings. You need to look at the posting dates before deciding to bump one those threads, something I also sometimes fail to do...:oops:
 

Mark2019

Jul 7, 2019
14
Joined
Jul 7, 2019
Messages
14
I'm sorry to here that KrisBlueNZ

I guess this sounds about correct at present with an awful lot of these sites

I am looking for sites that do really want to change this entire process and reverse some of the quality Equally responses as well with a far more interested approach over all and with some more meaning full team on a joint profit sharing basis that would enhance peoples lives but trying to find people like this at present is very hard job

Hence I came across this site and saw the adverts requesting for persons to write articles for them

As yet no real answers or negotiations which is a little disappointing having left messages to the advert to two different moderators thus far

Thank you for being kind enough to let me know anyway

Once again my condolences to your team

Lets hope this will be somewhat more successful than some sites have been thus far

Have a good weekend and wish you all well
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Generally speaking, threads are not closed unless there is some reason to do so.

We have had people come back to their original thread after several years (not often, but it happens)
 
Status
Not open for further replies.
Top