Pages: [1]   Go Down
Author Topic: Arduino + 7 Segment Display [Feedback Needed]  (Read 1232 times)
0 Members and 1 Guest are viewing this topic.
Bangalore, India
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Thanks for your time.  smiley
Logged

Checkout some of my Arduino projects and tutorials

Central Europe
Offline Offline
Edison Member
*
Karma: 7
Posts: 1220
Use the Source, Luke.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Bangalore, India
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reply.

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

Checkout some of my Arduino projects and tutorials

Central Europe
Offline Offline
Edison Member
*
Karma: 7
Posts: 1220
Use the Source, Luke.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: December 04, 2010, 04:35:48 pm by Korman » Logged

Bangalore, India
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Checkout some of my Arduino projects and tutorials

Offline Offline
Full Member
***
Karma: 1
Posts: 200
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well done Sudar
Logged

Pages: [1]   Go Up
Jump to: