I have bought two 7 Segment Common Anode digits. I have connected them (a to a, and so on) so I am ready for some multiplexing. I have connected the seven wires (don't care about dp) to inputs 2-8, and the two remaining wires (one for each digit) to inputs 9-10. I also use some resistors at about 400 ohm.
This actually works. I have tried counting from 0 to 99 and all is well. But I am concerned that it is drawing to much current? Everyone keeps talking about using transistors. Any suggestions? Could I fry something? I am also going to use 8x8 led matrix with the same Arduino (luckily this has MAX7219, so not so many pins are needed).
I use an Arduino Uno, by the way. Would this be any different with a Nano?
Uno and Nano are pretty much the same in this respect.
"Some" 400R series resistors? How many, 2 or 7? The correct answer is 7.
Well, assuming the Forward Voltage of the led segments is around 2V (most red leds), then the resistors will drop the other 3V from the 5V provided by the Arduino output (I am simplifying a little here). Applying Ohm's law I = V / R, the current passing through each led/resistor is 3/400 = 7.5mA. When you are displaying the figure "8", 7 segments will be on, so this is 7 * 7.5 = 52.5mA flowing into the common anodes from Arduino pins 9 & 10.
So, yes, you are slowly frying your Arduino. The maximum current an output can source or sink is 40mA. But even that is too much long term and you should probably stick to 20~25mA for long term use.
Transistors would help this. Because your digits are common anode, you should use pnp bjt such as bc327 or p-channel fet. For pnp, put a ~4K7 resistor between the base and the Arduino output.