How to use LED seven segment display and calculate its resistors value

My Name is Ahmad Shamshiri and I am presenting this tutorial from Canada Hello, welcome to a video from Robojax.

in this video I'm going to explain the usage and calculation of resistor andpin configuration for the seven-segment LED display.

we have either one two ormaybe more digits of 7-segment display but there are one more characteristicand that is if they are common cathode or common anode depending on the type ofapplication you might use different type of 7-segment display.

thisis called 7-segment display because we have seven pieces of LED or we haveseven in LEDs here so one two three four five six seven seven segments and thereis also a decimal point so let me show you on the diagram so this is a diagramand the top piece is called A and so forth B C D E F and the middle one is Gso DP decimal point.

in this case we have LED arranged in this way and thispackage so ABCD and these are this side of diode is called anode and this iscalled cathode so the cathode in this case or common which means all of thecathodes of these eight LEDs are connected so we just need one wire buton this side we need separate wire for each to turn them on and individually.

Here one LED is for the decimal point this is also an and LED so so this is theother one this is called common anode so I know this common and then cathodewhich is the negative this would be connected to the negative they areseparately so we bring the positive here and the negative will be connected herethrough some means or maybe Arduino or some other circuit thatconnects it so this will be turned on each of those and it will displaything so for example for to display 1 this will be ON for two ABGE and D willbe ON and so forth.

so you know that let's look here so these are the pins soPin one two three four five and then six seven eight nine ten so if I put this onmy breadboard (see tutorial video on breadboard) I've already invert this open one startshere so one two three four five and then go here counterclockwise six seven eightnine ten so you counted that way and this is also the same but the differenceis this is common anode.

so this is common cathode and this is a commonanode and also we have two digit display the two digit display the number of pinsdoes not increase so what it does is we have one common anode or cathode in thiscase this is common Casaus for one digit and we have also another common for thisone so we have this 7 plus 1 is 8 and also we have 7 plus 1 is 8 so we haveonly 8 pins for all of those depending which common is activated this will beturned on or off so which I'm going to connect next.

this one is common cathodeso the cathode of this one is common as you can see on the screen so the cathodeis common which is the negative side we have all these common cathode so thenegative is common and the positive will be connected to different digits to turnthis on this is common as you can see on the screen so pin number 3 and 8 iscommon so this is as you can see I'm counting pin 1 2 3 twice from the edge 12 3 so this is common and this positive this is already 2 volts so I'mconnecting it to any of those so if I connect this to 1 as you can see herenumber 1 number one we'll turn on the E so thisside is E as you can see the E is ON So now if I connect this to thesecond one you can see the D will be on so two is D and also if I connect it tothe fourth one let's see so four is C and then here the decimal 8 iscommon so this these are connected to each other it is the middle the middlehere and the middle on this side so to pin on this side and to pin on that sideor the actual pin so the middle one is common and so forth.

so the last oneis here which is the the G so you can see G is number 10 so this is anotherone now let's look at the at the common anode so this is common anode so thistime for the common I'm gonna use this one so the red is now common and thenegative will move between the pins so you can see here now the digit E ison D is ON , C the decimal point, and this pin 6 again to just remind you thensix is B so that is B also I've created this layout here 1 2 3 4 5 6 7 8 9 10you can download it from my website www.

robojax.

com so the link is providedat the description.

Then I'm gonna tell you if your voltage is not properlyadjusted I'm gonna give you the explanation on how to calculate thatokay now let's look at a two digit common cathode LED 7-segment display .

sothis has a 10 pina so starts from 1 to 5 and then 10 the same way 1 to 10 buthere the common is for each digit each digit separate and then we have theother pens are common so let's have a look at there so when I when I insert thishere pay attention that we have empty spot so after the 2 spot the third onestarts and then 2 in at the end is empty so when I when I insert my pin I have to skip 1 2 and then starts from here at the end the two isalso skipped and here two also skept so now let's look at a diagram here sowe have two digits the same way side-by-side decimal pointABCDEFG so here the common cathode so this is a positive and a cathode andcathode is a negative.

so pin number 10 is a and B is 9 C is 1 D is 4 and soforth but if you want to turn the digit 1 so you have to connect the common to 8so this is digit 1 now let's turn it on so 1 5 here this is 6 so that escapedfrom the 2 that is 6 7 & 8 so now I'm connecting an 8 and 2 more pins left asyou can see here so now to turn the segment A as you can see on the diagram Ihave to connect it to the pin number 10 so that was 8 9 and then 10 10 is for A, 9is for B so if I connect 9 that's a B and the diagram C is in 1 so I havecome here at one that is a B C that is C as you can see on the diagram D howeveris at 4 so that one two three and then four that is D.

E is 3 sothat is E and then F as you can see on the diagram I created this diagrambecause I couldn't find it online F is at sexso five is here six should be here and then the same way by the way if I movethis common to the next one so the second digit F will be activated andthen G as you can see is at 5 so if I move this to 5.

5 is here so G isactivated now if I move this you can see on this diagram if I move this to 8and so this will b turned on okay so let's look at this.

this is it for thesingle digit that we have here it says the the forward current (IF) is twentymilli ampere and we have some other characteristic this is the model that Ihave VF here it says forward voltage is 2.

2 voltsand that's the current so we need these two important parameters and then we alsohave to know our main source of voltage this can be used at 3.

3 volts withArduino or 5 volts with a USB connector which Arduino has but fordifferent voltages you can do the same calculation.

so here is how it worksthe IF, I refers to current and F forward so forward current is 20milliampere which you can write it as 0.

02A ampere and then VF forwardvoltage this is a typical 2.

2 for this one so each LED is a diodeit's a light emitting diode and they are set with a resistor to limit the voltageor voltage divider as well it will work as a voltage divider so I put the valueshere so the and that passes through here is 0.

02impaired and the resistor is here and the LED's forward voltage is 2.

2Vvolts that's 2 point 2 the formula is this V input themain voltage that comes here either whatever you have 3 volts 5 volts Vinput minus VF divided by current so here is 5 volts let's say I'mconnecting 5 volts minus 2.

2 divided by 0.

02 amperethat's the current, so you need to put 140 ohm resistance on the path so here isfor this example so 3 is common cathode and then if I connect this so that's oneof the segment is on so if you want to use your resistor as you see on thediagram each diode H each LED needs it's all resistors so you need to put thesame number of this is eight seven segment plus the disabled point if youuse it otherwise 7 you need seven resistors so each will have its ownbecause this is common cathode you put your resistors in a node here and thisside and the voltage will come and goes to go through this resistor as shownhere so we will put the resistor here at anode.

now look at the circuitthat I have this is just an arbitrary resistor so I'm gonna put it here so the positive here comes to a resistor.

this line is all connected so the positive comes and fromhere I have to put a wire a jumper wire to connect these two.

of course I havenot done the calculation depending how big it is you see it's very dimnow it's preventing all the voltage to come here so the voltage drop appears asa current passes through so this will prevent the full voltage toappear here and it will absorb some of the voltage so that's why we call it voltagedividers.

okay that's it guys if you liked this video please thumb up 👍 andalso subscribe to my channel if you haven't done so far.

Leave a Reply