# Interfacing 2.3 inch common anode 7 segment display with arduino uno

**URL:** <https://forum.arduino.cc/t/interfacing-2-3-inch-common-anode-7-segment-display-with-arduino-uno/350148>\
**Category:** Displays\
**Created:** [December 2, 2015, 4:31am UTC](https://forum.arduino.cc/t/interfacing-2-3-inch-common-anode-7-segment-display-with-arduino-uno/350148 "2015-12-02T04:31:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdityaNB](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@AdityaNB](https://forum.arduino.cc/u/AdityaNB)\
**Post date:** [December 2, 2015, 4:31am UTC](https://forum.arduino.cc/t/interfacing-2-3-inch-common-anode-7-segment-display-with-arduino-uno/350148/1 "2015-12-02T04:31:22Z")

</div>

Hey guys,

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

---

<div class="post-metadata">

**Author:** ![david\_prentice](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@david\_prentice](https://forum.arduino.cc/u/david_prentice)\
**Post date:** [December 2, 2015, 7:01am UTC](https://forum.arduino.cc/t/interfacing-2-3-inch-common-anode-7-segment-display-with-arduino-uno/350148/2 "2015-12-02T07:01:32Z")

</div>

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).

David.

---

<div class="post-metadata">

**Author:** ![CrossRoads](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/crossroads/32/214033_2.png) [@CrossRoads](https://forum.arduino.cc/u/CrossRoads)\
**Post date:** [December 2, 2015, 7:05am UTC](https://forum.arduino.cc/t/interfacing-2-3-inch-common-anode-7-segment-display-with-arduino-uno/350148/3 "2015-12-02T07:05:59Z")

</div>

Use a high voltage, high current capable shift register, TPIC6B595 or TPIC6C595.  
Control just like a 74CH595:

```cpp
digitalWrite (latchPin, LOW);
shiftOut (dataPin, clockPin, MSBFIRST, yourData);
digitalWrite (latchPin, LOW);

```

or use SPI.transfer  
yourData for a discrete variable, or from an array, dataArray[x] if part of a loop, or ...

---

<div class="post-metadata">

**Author:** ![CrossRoads](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/crossroads/32/214033_2.png) [@CrossRoads](https://forum.arduino.cc/u/CrossRoads)\
**Post date:** [December 2, 2015, 7:07am UTC](https://forum.arduino.cc/t/interfacing-2-3-inch-common-anode-7-segment-display-with-arduino-uno/350148/4 "2015-12-02T07:07:05Z")

</div>

Don't forget current limit resistors  
(Vs - Vf of LED)/20mA = resistor  
where Vs is your 9V or whatever

---

<div class="post-metadata">

**Author:** ![AdityaNB](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@AdityaNB](https://forum.arduino.cc/u/AdityaNB)\
**Post date:** [December 2, 2015, 3:55pm UTC](https://forum.arduino.cc/t/interfacing-2-3-inch-common-anode-7-segment-display-with-arduino-uno/350148/5 "2015-12-02T15:55:59Z")

</div>

Thanks guys! Will try out the ULN2003.

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [December 3, 2015, 10:58am UTC](https://forum.arduino.cc/t/interfacing-2-3-inch-common-anode-7-segment-display-with-arduino-uno/350148/6 "2015-12-03T10:58:01Z")

</div>

I have to keep saying this!

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).

---

<div class="post-metadata">

**Author:** ![AdityaNB](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@AdityaNB](https://forum.arduino.cc/u/AdityaNB)\
**Post date:** [December 13, 2015, 6:33am UTC](https://forum.arduino.cc/t/interfacing-2-3-inch-common-anode-7-segment-display-with-arduino-uno/350148/7 "2015-12-13T06:33:45Z")

</div>

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.

 ![WP_20151213_12_06_03_Pro.jpg](https://europe1.discourse-cdn.com/arduino/original/3X/5/8/5812b74112980510cb54c8dd7c6ecdad29fd81e4.jpg)

---

<div class="post-metadata">

**Author:** ![CrossRoads](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/crossroads/32/214033_2.png) [@CrossRoads](https://forum.arduino.cc/u/CrossRoads)\
**Post date:** [December 13, 2015, 6:39am UTC](https://forum.arduino.cc/t/interfacing-2-3-inch-common-anode-7-segment-display-with-arduino-uno/350148/8 "2015-12-13T06:39:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [December 13, 2015, 9:47am UTC](https://forum.arduino.cc/t/interfacing-2-3-inch-common-anode-7-segment-display-with-arduino-uno/350148/9 "2015-12-13T09:47:13Z")

</div>

![WP_20151213_12_06_03_Pro.jpg](https://europe1.discourse-cdn.com/arduino/original/3X/5/8/5812b74112980510cb54c8dd7c6ecdad29fd81e4.jpg)

You forgot to include the base resistors for the transistors.

1k should be OK but - **really** - go get the [TPIC6B595](http://www.ti.com/lit/ds/symlink/tpic6b595.pdf)s and do the job properly.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 3:41am UTC](https://forum.arduino.cc/t/interfacing-2-3-inch-common-anode-7-segment-display-with-arduino-uno/350148/10 "2021-05-06T03:41:20Z")

</div>


