I'm a relative newbie to programming and electronics, with a lot of perseverance I've built my own Arduino controlled home brewery and now my attention has turned to serving the beer! I've got a beer fridge (kegerator) with 4 taps and want to display the amount left in each keg. I'm concentrating on the display first.
I've got 4 CC and 4CA dual segment displays:
I also have a bunch of 74HC595N shift registers. From my research I believe its possible to drive each display via a '595 and PNP / NPN transistors to sink /source current, depending on which type of display is used (not forgetting current limiting resistors on each data pin on the display). I really could do with some pointers as to a schematic using a 328 Arduino chip, I've seen loads of different ways to drive 7 segment displays and I'm a wee bit baffled by it all!
You can use a 74595 as you describe, 1 chip per digit and load all the bits as needed for common-anode or common cathode each time you want to update the display. Or you can use a single 74595 to drive the segments, and an IO pin (with a transistor) for each digit and quickly scan through all the digits repeatedly; that's a bit easier hardware-wise, a bit harder code-wise.
There are also chips like the 7447 which will take your digit in BCD on 4 inputs and decode the 7-segment font to drive a single digit.
The easiest way, in my opinion, is to use a MAX7219 which will drive up to 8 common-cathode digits from a single chip needing 3 IO pins on your controller. You simply set the values the digits should display and the chip takes care of the rest including constant current drive. There is an LedControl library available which makes this route extremely easy.
Hello,
try this library I written: http://laurent.le.goff.free.fr/blog/IMG/zip/sevenseg.zip
This version is suitable for common cathode and anode common, directly connected to the arduino, look at example, and the image in the zip file.
not exceed 6mA per LED (40mA max per pin)
Wow that was quick; only 3 working days and 4 MAX7219 chips have just landed on my desk in the UK from San Jose!
I ordered some from taydaelectronics in Bangkok, Thailand - they also arrived quickly to east coast US, but from a Colorado (western US) address with no hint that Thailand was involved outside of a piece of taydaelectronics advertising in the packate. Don't understand the delivery flow there.
Waiting on delivery of a large piece of perfboard now, coming Niagara Falls area (western NY), really surprised it didn't arrive before the '7219's.
Will mount 4 large (60mm) LED matrices, the 4 7219's, maybe build up a standalone arduino too.