Go Down

### Topic: Arduino + 7 Segment Display [Feedback Needed] (Read 2006 times)previous topic - next topic

#### sudar

##### Dec 04, 2010, 04:30 pm
Hello all,

This is my first *real* project using Arduino. I have integrated a 7 segment display with Arduino and it goes on in a loop and displays the numbers from 0-9.

You can view the Fritzing diagram of the circuit below.

The code for the program is available at my github account https://github.com/sudar/arduino-sketches/tree/master/SevenSegment

I know this is kind of simple, but please do go through the circuit and let me know if I am a) doing anything wrong (b) can I improve anything.

#### Korman

#1
##### Dec 04, 2010, 06:42 pm
A few things: You wired up your circuit as common cathode display, your text says common anode. If it works, no problem, just change the label.
Next, you have a current limiting resistors on both middle contacts. That's not what you want, they're connected internally and present on both sides for convenience only. Remove one.
Last, you have the current limiting resistor on the common cathode. Which means, the current through led varies with how many segments are active, so the 8 will be much darker than the 1. It's better to put a resistor on each line from the Arduino to the anode of each led. The version with the resistor on the common cathode can also fry a led, if one draws more current than the others. But that shouln't be problem with a 7-segment led display, the leds are going to be pretty much equal.

Korman

#### sudar

#2
##### Dec 04, 2010, 08:47 pm

Even I was confused whether it has a common cathode or common anode. The datasheet says it is common anode, but I am not very sure. Is there a way by which I can check whether it is common anode or cathode?

Regarding the current limiting resistors, I will remove one of them.

#### Korman

#3
##### Dec 04, 2010, 10:35 pmLast Edit: Dec 04, 2010, 10:35 pm by Korman Reason: 1
If the middle pin is attached to +5V and the LEDs work, it's a common anode. If it's attached to GND, it's a common cathode.

Korman

#### sudar

#4
##### Dec 05, 2010, 02:19 pm
Thanks for letting me know the method. I checked and it indeed seems to be common cathode. I guess the datasheet is wrong.

I have updated my circuit diagram.

#5
Well done Sudar

Go Up