So I am aware (please correct me if I'm wrong) that the 74HC595 has a max continuous operating current of 70 mA, meaning that all the output pins should not draw more than 70 mA at once. Meaning that , assuming that there will be cases where I need all outputs to be on at the same time, the 8 outputs should draw at most 1/8 of 70 mA to ensure you don't burn out the chip.
My question is, suppose I am running a 7-seg display made from scratch from segments of LEDs in parallel controlled by the 74HC595 as a shift register:
Is it possible to "fake" multiple segments being on at once by rapidly switching on/off between those segments so the chip appears to be powering all the segments at once, when in reality is rapidly switching between them so they all appear on?
Wouldn't this make it so that the chip only has to worry about drawing the current associated with 1 segment/output at very small time intervals rather than 7 of them at once?
s it possible to "fake" multiple segments being on at once by rapidly switching on/off between those segments
Yes it is but the price is that the segments are then dimmer because they are not on all the time.
This results in the same brightness as if you had just reduced the current to the LED in the first place.
Yes, that's actually what my original design was, but it requires a lot more wiring to deal with......
Also, I'm aware that the brightness of the LEDs will be reduced if you switch the segments on/off at a fast rate, but how exactly would I do this in code? Would it require some indeterminate for loop that continuously turns a segment on/off at a desirable rate or is there some library function to accomplish this?
Use a TPIC6B595 - it is a shift register which can in a single package (20 pin, could have been 16 pin but has four extra simply for heatsinking) drive - or in fact sink, pull down only - much greater individual and overall currents.
So you need to make your LED modules common anode - and you still require current limiting resistors.
You do not want to have your sketch perform the (continuous) multiplexing if you do not need to - and in this model, you certainly do not need to do any form of multiplexing which would not help you at all.
Yea, I understand I could have gotten a better chip than the 74HC595 but I'm mainly doing this project as an opportunity to learn how to multiplex and see how to use different arduino functions and components. I know it seems kind of pointless but I'm mainly trying to learn different ways to do things.
Thanks for the suggestion though, on future projects I'll just use more powerful chips.
In order to do fast on/off switching of the outputs from the shift register to make sure that no 2 segments are on at the same time, would this require using PWM and is it possible to time the signals so that the peaks of the outputs never overlap but are close enough that it appears they are on at the same time?
arunalva24:
In order to do fast on/off switching of the outputs from the shift register to make sure that no 2 segments are on at the same time, would this require using PWM and is it possible to time the signals so that the peaks of the outputs never overlap but are close enough that it appears they are on at the same time?
OK, so we have adequately dealt with the original topic of this discussion and given that it is only an exercise now and not something you wanted to do for real (because if you do want to drive those 7-segment displays with more than 10 mA per segment group, you do need to go and get some TPIC6B595s; no other approach is worth considering).
So ...
If for some other purpose entirely, you wish to ensure that no two outputs of the shift register overlap, you do not need to do anything at all apart from shifting in a pattern which does not contain more than one bit active. Nothing happens until you activate the "latch" function on the shift register, at which point all the data you have shifted into it is conveyed to the outputs simultaneously. You are confusing yourself even further by referring to "PWM" which has nothing to do with this problem.
But please do not continue with the theme that switching on 74HC595 outputs alternately will in any way permit you to apply more average current to your LEDs. The chip is not designed to provide more than the current specified, either per pin or total, and you will be particularly disappointed if you actually attempt to draw more than 10 mA at most from any output as in doing so, the available voltage will fall by at least a volt. even before any damage occurs to the chip and it will simply fail to light the LEDs to the brightness you might expect.
Well yes , that is all true UNLESS he uses transistors that are switched by the 74HC595s , but I believe that this doesn't solve this question
Is it possible to "fake" multiple segments being on at once by rapidly switching on/off between those segments so the chip appears to be powering all the segments at once, when in reality is rapidly switching between them so they all appear on?
Wouldn't this make it so that the chip only has to worry about drawing the current associated with 1 segment/output at very small time intervals rather than 7 of them at once?
unless you shift 0xFF (all 1's) and use transistors and a separate supply for the leds so the current path is from the led power supply, through the transistors to ground and the shift registers simply drive the transistors. In that case all the segments would be on and it would not be simulated at all.
raschemmel:
Well yes , that is all true UNLESS he uses transistors that are switched by the 74HC595s
Well, we always know that if you really want to go to the trouble - and I do mean trouble - of using seven (or eight, if you use a decimal point) transistors and seven resistors in addition to the 74HC595 - and that for each digit, and allocate the board layout and assembly time to do so, well of course you can.
But why would you? Would you do that even if it did appear to save a few cents in a manufacturing run?
Other diversions about "multiplexing" or "spreading" the load over different outputs or time are all very well, but in no way address the particular problem.
Is it possible to "fake" multiple segments being on at once by rapidly switching on/off between those segments so the chip appears to be powering all the segments at once, when in reality is rapidly switching between them so they all appear on?
Wouldn't this make it so that the chip only has to worry about drawing the current associated with 1 segment/output at very small time intervals rather than 7 of them at once?
This is in fact the whole object of POV displays :
Ok, I think I kind of understand where Paul_B is coming from about multiplexing not being necessary in this project
but I think I did not do a good job of explaining my project in detail.
Firstly, I think I used the wrong term "multiplexing" to refer to what I'm doing. Sorry about that. I am simply using my shift register to provide me with more outputs to work with. My setup so far is exactly as rashchemmmel referred to, with my shift register driving 7 transistors for each of the 7 segments. The base of the transistor is connected to one of the 595 outputs and a resistor, while the collector is connected to the LEDs and a 5V source. The emitter is connected to ground. When there is base current in the transistors triggered by the chip output I control with code, it will enable the collector current to flow, turning on the LEDs of that segment, and when there is no base current, no current flows so they will be off.
I have already created a working 7-segment display on my breadboard using this setup, and simply created this topic because I also realized it seemed unnecessarily tedious to have transistors when I could simply get a stronger chip. I think I just over-complicated things a bit with trying to come up with other possible solutions.....anyway thanks again from the help from everyone.
Ahhh now I understand Grumpy_Mike and Paul_B 's original points about why multiplexing in this case
makes no sense /is pointless. If I'm merely doing it to lower the current for the sake of the chip,
it visually accomplishes the same thing as simply decreasing the current by adding more resistors to the LEDs. That's why it would be better to just get a better chip to avoid this hassle. And also, even with multiplexing, controlling more than a few LEDs with 1 output without transistors will just sag the voltage.
Ok, I fully understand now, I'll save learning about multiplexing for another project where it makes more sense to do haha.
TPIC6D595 would be great for that - combines the 74HC595 and the transistor drive into one package. Still need the current limit resistor.
TPIC6D595, good for 100mA continuous.
TPIC6B595, good for 150mA continuous.
Drive G/ (output enable) with a PWM pin for brightness control too.