Pages: [1]   Go Down
Author Topic: Struggling to understand the basics of a 7 segment display common anode  (Read 936 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have built something similar to this.



My LED works fine. The problem is I do not understand how the circuit works. The anode side, display pins 3 and 8, receive power. Lets say for now I have pin 2 of the display going to pin 2 on the arduino board.

Now in my mind the pin 2 on the arduino board should complete/ground the circuit. However the program sketch uses pinmode(2, OUTPUT) and I use digitalWrite(2, HIGH) to turn on that specific led.

How does the cathode side of this CA 7-seg display work?
« Last Edit: February 09, 2013, 11:02:12 pm by crosson » Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 536
Posts: 27054
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Cathode needs to be LOW for a segment to turn on.

Perhaps it common cathode & not common anode?
Since you show what you think is the common anode connected to 3.3V, and the LEDs turn with 5V from an output pin, that would suggest a common cathode part.
Try moving the 3.3V connection to 5V - if the LEDs no longer turn on, that would prove my conjecture out.
Move the connetion to Gnd instead, and you should see working LEDs with improved brightness.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You were right. I was blinking the leds confusing myself. To confirm I turned all leds on by letting it remain on digitalWrite(2, LOW). Also tried your experiment and you were double right. So when I set the Write to LOW does that send power in that direction?
Logged

Offline Offline
Faraday Member
**
Karma: 67
Posts: 2674
The last thing you did is where you should start looking.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

See attached images


* 7seg.jpg (141.1 KB, 561x469 - viewed 22 times.)

* CCCA.jpg (24.4 KB, 455x267 - viewed 19 times.)
Logged

The way you have it in your schematic isn't the same as how you have it wired up!

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 536
Posts: 27054
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

See the common cathode diagram above - writing your outputs  high source current into the anodes to turn the segments on.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12161
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Incidentally the 3V3 rail isn't a good choice for LEDs since

a) Low current only, might not be able to drive many segments at once
b) A bit too low a voltage for blue and white LEDs - may only be able
   to light up dimly...
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: