I'm still very much a newbie when it comes to electronics in general let alone Arduino and I'm struggling to understand some measurements I took on my latest tinkering.
I have a 2 digit 7 segment LED. It has 10 pins, two of which are for the common anodes and the rest are for the cathodes. I added the LED to a breadboard and connected each cathode through it's own 330R resistor to a digital pin. I hooked up the common anode pins to two other digital pins.
The sample sketch I had rapidly switches between illuminating segments in each digit with a delay of 2ms to give the illusion that both are powered at the same time.
Only yesterday I started reading about sinking and sourcing current as well as the current limitations of the digital pins and the max combined current. I was concerned that I was drawing too much current through the two pins connected to the anodes especially as I found plenty of examples where people have used transistors to power the LEDs rather than draw current from the digital pins.
Sorry for the long preamble and on to the question. This morning I measured the current on each of the Arduino pins supplying current to each common anode and found that it ranged up to a maximum of around 16-17mA for each pin with this highest value of course being found when displaying an 8 and all segments of that digit were lit. I was somewhat relieved as this is well below the recommended 20mA per pin, let alone the max of 40mA. I then measured current on one of the cathodes as it enters a digital pin (sinking the current) and found it varied up to a max of around 5.5mA. This is what is confusing me. If there are 8 cathodes (only using 7 as no decimal point used), why isn't the current at the cathode a proportion of the input current? E.g if all segments were lit and all segments showed current similar to the one cathode pin I measure, then surely that would be 5.5mA x 8 = 44mA spread across the 8 pins. So how is the input current on one of the anode pins only around 17mA but the potential output of all cathode pins is around 44mA? Is it because a digital mulimeter isn't fast enough to show the differences as it is rapidly turning on the corresponding segments in each display and is therefore showing a higher current, or could it be the way I'm measuring the current (interrupting the circuit and placing the multimeter probes in line, or is it the sinking of the current?
As I say, I'm new to electronics and I'm clearly not understanding one of the basic concepts so I may have asked a really stupid question!