Go Down

Topic: Struggling to understand the basics of a 7 segment display common anode (Read 1 time) previous topic - next topic

crosson

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?

CrossRoads

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

crosson

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?

LarryD

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

CrossRoads

See the common cathode diagram above - writing your outputs  high source current into the anodes to turn the segments on.
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.

MarkT

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...
[ I won't respond to messages, use the forum please ]

Go Up