Go Down

Topic: Quick query about Common Anode 7 segment displays and transistors. (Read 1 time) previous topic - next topic

tomm

I very recently bought an Arduino Uno to brush up my rusty electronics skills, and am starting out with a relatively simple timer project.

I've successfully wired up a common anode 4digit 7segment display to my Arduino and have got it scrolling text, but I've noted that around the web a lot of people are connecting/switching their anodes with transistors. I understand this is to prevent too much current draw on the pins of the Arduino. In my case the draw per segment is only 20mA (and I have resistors on each segment), so as long as I'm only turning one digit on at a time, I shouldn't have a problem?

As I say, my skills are a little rusty, so just need some advice before I'm confident enough to move on with the project.
Regards
Tom

Grumpy_Mike

Quote
In my case the draw per segment is only 20mA (and I have resistors on each segment), so as long as I'm only turning one digit on at a time, I shouldn't have a problem?


That is right, you seem to be doing well. Cheers.

MarkT

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

tomm


But one digit = 7 segments = 140mA...??


That's what I've seen written in various places around the web.

Correct me if I'm wrong, but with a single common anode digit displaying the number 8 you have your anode pin supplying a maximum of 5V and 40mA to each of the LEDs in the digit (as they are parallel). Each of the LEDs in the digit is wired back to individual pins on the Arduino, supplying a maximum of 5V and 40mA to each pin, as long as you only have one digit on at a time. (In practice a series resistor on each segment reduces these values further.)

As I say, I only have very basic knowledge of this stuff so I may be missing something.

Grumpy_Mike

The arduino doesn't supply a maximum of 40mA, that is the maximum amount of current you can draw before damaging it. Keeping it down to 20mA is sensible. So yes 7 segments at 20mA = 140mA. This is close to the limit of directly sourcing current through an arduino (200mA total through all the pins).

You MUST put current limiting resistors on each of the cathodes:-

http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

If you want more digits you have to source the current from either the 5V rail or an external supply and control it with an arduino.

Go Up