I'm trying to interface a 2.3 inch common anode 7 segment display with an Arduino Uno. I looked up the datasheet for the model and found it needs a forward voltage of 7.4v for segments a-g and 3.6v for the Dp pin (max 10v for both). As expected, the 7 segment does not work when interfaced directly with the board. I used a 9v dry cell battery instead, to check if the segments were working and yes, they all glowed perfectly bright red. Now, my doubt is, if I plonk on an IC which bumps up the voltage to ~9v the grounds of each diode inside is fed back to the arduino, so indirectly, there will be a 9v input to the board. How do I overcome this? Or, am I wrong in my assumption about the 9v supply?
Note: 7 segment pins:
Pin 1: NC
2: e
3: d
4: c
5: Vcc (+7.4v, max 10v)
6: g
7: f
8: decimal dot
9: a
10: b
Think about it. A common anode means that you connect this to 9V and the cathodes to your driver chip. e.g. ULN2003 via current limiting resistors.
The Arduino drives the base of the Darlington transistor.
Yes, there are many alternative chips, but the ULN2003 can drive relays, solenoids, leds, ...
Or you could use individual NPN transistors with individual base resistors.
Direct connection of the Arduino pins to the cathodes is not wise (tm).
The ULN2003/ 2803 is essentially obsolete technology. Yes, it will work to drive a 9 V display since that requires relatively little current.
Darlington transistors necessarily have a saturation voltage of 1V at absolute minimum, which is one Watt per Amp. But of course, if you use them to switch any significant current (over 100 mA or so, say,) the saturation voltage is of course, higher and the power dissipation correspondingly higher. This might not be a concern if only one output is active, but for seven or eight outputs, it becomes significant.
While FET arrays by themselves are not common (I am not aware of any), the TPIC6x595 series mentioned comprise in a single package, a shift register and latch together with logic-level power FETs and "kickback" suppression diodes. This means they have a low "On" resistance and correspondingly low power dissipation, far superior to a Darlington, and the shift register is an extremely practical way to make the most of Arduino outputs (three pins can control quite a number of TPIC6x595s in a chain).
Made some progress in spite of my otherwise busy schedule.
Now I decided not to opt for a ULN2003 to drive my C/A 7 segment. I decided to opt for a shift register, SN74HC595 to be precise. But even this component gives out a 5v output from whatever output pin (Qa - Qg in this case) is selected using the arduino. Since 5v is insufficient for the 7 segment, I've come up with a new circuit, where the common anode shall be given a 9v external supply, each cathode shall be connected to the collector terminals of individual BC548 transistors, and the pins Qa - Qg shall be connected to the bases of their respective transistors. Thus my theory is that, setting say, Qa pin high will make the transistor connected to segment A conducting, thus providing a path from Vcc to ground through A and lighting it up. I need to be confirmed if this arrangement will work before rigging up the circuit. Refer the attached image of the circuit.
Edit: I don't intend to make the grounds of the 328PU and the 7 segment common.
I found the shift register approach advantageous because only one output from the arduino is needed to control one full 7 segment display. This gives room for controlling a plethora of other I/O that I have in mind.
For >5V common anode 7-segment displays, use TPIC6B595 or TPIC6C595 to sink current from the cathode/segments.
Control just like 74HC595, but 100/150mA sink current, and up to 50V outputs.