Here is a silly question from a beginner: What is easier to use, a common anode or a common cathode? This relates to LED's and 7 segment LED displays.
I want to daisy chain about ten 7 segment LED displays with shift registers for a project I am designing in my head still. And considering a bunch of RGB LED's that I have ordered which are common anode (layman's terms, only one input but many outputs correct?), I can't really figure out yet how one would use a common anode LED?
But point is, which is easier or is it another one of those situations where one must define easy?
Thanks so much. If not for the 14 hour working days lately I would've been much further along with this or any other project.
I would say common anode is more common. This is because there are lots of "sinking" drivers like ULN2803 Darlington arrays, cheap NPN BJT's or cheap N-type MOSFET's, while their sourcing (for common-cathode) counterparts are not as common. Constant-current LED drivers tend to be of the sinking type, etc.
I agree that common anode is easier to use, but plenty of common cathode are sold also, can be harder to deal with.
One is to use a sinking driver at the junction of current limit resistor and the unique anode, pull the pin low so the segment is not on. Versus trying to source currernt from something else, such as 74AC299 if one has some.
Yes I would also agree common anode is the most common and easiest to use.
However beginners are often unconformable with sinking current and think that sourcing is more natural. That is why they are beginners.
Grumpy_Mike:
Yes I would also agree common anode is the most common and easiest to use.
However beginners are often unconformable with sinking current and think that sourcing is more natural. That is why they are beginners.
Yeah, what he said. Sinking??? I get a sinking feeling when you guys in the know talk shop XD
Well I want to order some 7 segment LED displays and I am now a bit confused which to get? Which one's require the least input pin...man I am such a noob!
Do you mean what specific one? Go to your distributor and search foe seven segment displays common anode. Then sortbthe results into price order, most sites havebthis option, then get the cheapest you fancy. How many are you going to use? That will determine the bestbway to drive them if you want to minimise the number of pins you use.
You can get 10 single digits, or find units that have multiple digits.
Either way, you will need to come up with a way to create 17 control pins.
7 that will determine which segment turns on, wired to all the segments in parallel, and 10 to select which digit is enabled, wired to the separate anode lines per digit (there are usually 2 common anodes per digit).
I would drive the 7 segments from the arduino, current limited to 20mA or less.
Then use a shift register and walk a 0 (or 1, depending on how you turn the anode current on) across it to enable the digits 1 by 1.
You could shift out the segments, enable the shift register output (i.e. drive the Load Clock to move the data from the shift-in register to the parallel out register) & drive the anode. While that is displaying, shift out the next digit's segmets, anode off, enable the shift register output, drive the next anode.
In this case, maybe common cathode would be better - then the arduino could drive the 7 anode segments, and a ULN2803 (or NPN transistors) could drive the cathode low to enable the segments.
That sounds like the Oracle Sales Analyser I am starting to use at work - any analysis is possible in probably 20 different ways.
I did some light skim reading last night on shift registers, and also SPI, and I2C. Can I...no wait maybe not me alone, but rather is it possible to build a display unit of ten 7-segment displays that uses I2C? I suppose one will have to use a specific I2C chip - I think I am reaching in a pot I should rather leave to the one's who actually know electronics.
Reason I ask since I want to add quite a lot of stuff to this project I'm designing - in my head still. I started looking at ways to do more with less pins and shift registers was already in my head, but then read about I2C. I will give more info on the project when I have listed all the things I need it to do. So far I can say it will have a row of ten 7-segment displays, a LCD dot matrix screen (not to sure about size yet - probably nintendo DS size), a 4x4 keypad (thank you eBay), and a barcode scanner - and maybe a 4 way joystick (like those one's on Playstation or maybe just 4 buttons), OH and GSM capability and data storage/logging capability.
But need to list all the features first, then see the way forward, then decide what hardware I need. All that and I have no knowledge of electronics....AHAHHAHAH I'm sure a shmuck. But its fun, for me anyway.
Not with I2C, but I think SPI you could. I2C has hand shaking built in, while SPI is more like a hardware shift register, you should be able to just hook up SCK & MOSI to pump data out real fast (vs the software drive ShiftOut).
What's you pay for the keypad? www.surplussales.com has 20-button keypads for $1. Lot of neat stuff there.
Take a look at the "1284 evaluation" thread, some neat ATMega1284 boards with extra IO & SD cards built in being developed, dual hardware serial ports, real time clock & battery.
Do you really need 10? Look into a MAX7221 to drive 8 of them from just 1 24-pin chip vis SPI. Then 2 shift registers for the last 2 maybe.
Don't worry about not knowing too much.. it seems that you are doing your reading and research and coming with relatively thought-through questions... I find that as long as you are willing to a little bit of trying to figure it out yourself first, there's folks here more than willing to both lend a hand and point you in the right direction if you need it, even do a little bit of teaching themselves at times in terms of explaining the "why" behind the answer. Only the other day did I get steered towards info explaining why I ought to use N-Channel MOSFET for switching power rather than Bijunction "normal" transistors. I've learned a TON in the year since I started messing with Arduino.. I'm not an engineer by any means, but I can get a project working, if not optimally.
An intelligent question isn't a stupid question, usually
@ Crossroads. Regarding the keypad, I think I paid about 7 or 9 Dollars US, however shipping was free. I just kinda looked at all the ebay listings with Free Shipping. Usually shipping stuff to South Africa (when paying for shipping) just makes it expensive - usually more than the part I bought in the first place. And yet, the choice is larger abroad than locally, even with RS Components locally - who seems to be expensive anyway. Haven't tried Rabtron yet though - but thank you for the link to surplus, I will see how it works out shipping wise. I do have some other projects in mind. I wanted to build a weather station until I saw what some of the sensors cost like wind direction and speed, rainfall bucket etc. Think I will look into my time-lapse photography unit that does the pan and tilt thing, but was thinking of adding movement via rail.
I was thinking about the number of 7 segments...see I want those to display a total price, and being intended for some African countries like Zambia where the value of Kwacha is quite low ($1US = R7 = 4900Kwacha roughly). The "R" is for South African Rand by the way. You can imagine how many Kwacha's you need to buy a can of Coca-Cola. But I degress, maybe I should just add a sticker to the from to make up for the added Zero's - solving quite a few problems and requiring less 7-segment displays.
@ focalist. Thanks for the support, sometimes I feel like a complete brick cause I understand the logic, have a pretty good idea, but explaining it in ANY human language seems tough especially when you start mixing up terms. The whole "common cathode" - "common anode" thing still mixes me up. But I find the electronics fun and its better than sitting around and be bored. Another avenue I'm looking into a Class D amps and speaker enclosures - joined diyaudio.com. However I'm not so much interested in the design of the electronics as I am in the look and feel of the final product. I think I have to many hobbies.
I ordered a bunch of stuff which has all been shipped, ranging from a nintendo DS screen to some push buttons. In the meantime I will readup some more about how to connect things - no wait better yet, first do the design then look at the best method of connecting it all. Design first - hardware second, thats what my pneumatics lecturer said anyway....but there was a third step which I can't recall.
Toodles everyone, have yourself a stupendous weekend! I gotta eat something now.
I picked up some RGB LED's that I haven't used yet.. yet another of my late night ebay china purchases. Got twenty of them for about a buck fifty, shipped. I had the choice of either common cathode or anode.. I assumed that due to different drive voltages, it would be easier to use common cathode, so that's what I got.
Would I be better off with common anode, and if so, why? From a design standpoint, since they only draw 20ma max, that one could be happily driven directly off three PWM pins with a series resistor on each. To drive more than one, you'd use a transistor.. NPN usually. To be honest, I'm still a little hazy as to WHY NPN is better than PNP for that kind of thing. Is it as simple as "You are switching it off and on AFTER or BEFORE the load." ?
Both are okay to use - its just generally easier to use common anode becuase many more parts can drive outputs low with more current capability than they can High. So if you had ULN2803, 2N2222, etc, you pull the cathodes low like the right hand design, and when not on there is no current draw.
The left hand, the current is always flowing either thru the part, or thru the LED.
There are shift registers that can drive high output currents, like 74AC299 from Newark.com (56 cents when I ordered last). Or 74Fxxx logic (I happen to have bunch of old parts). In which case the current limit resistors would go series with the output pin and the LED anode.
Is it as simple as "You are switching it off and on AFTER or BEFORE the load." ?
No, please think about it, that makes no sense.
I think you mean to say one switches the ground and the other switches the positive. It's back to sourcing and sinking current.