Confused working out 7-segment LED driver IC current consumption - Page 1
Forum section: electronics / projects

author: HwAoRrDk
author_rank: Super Contributor
timestamp: August 04, 2021, 06:48:22 pm
content: I have a design where I want to use an LED driver IC, theTM1640(or similar from other manufacturers: GN1640, CMS1640), to drive 12 digits of 7-segment LED displays. I'm trying to wrap my brain around what kind of currents the LEDs are going to be driven with, and what kind of overall average current consumption there will be, but I can't quite figure it out.The typical application of this kind of LED driver seems to be to connect the 7-seg displays directly, without any current-limiting resistors on either the anode or cathode side, and relying on the PWM brightness control to set the average current the LEDs will be driven with.One thing I'm having trouble with is figuring exactly what frequency it's PWM-ing the outputs at. The datasheet says the "oscillation frequency" is 450kHz, but the timing diagram illustrating the brightness control (see attached) shows a per-digit period of 500us. For a maximum of 16 digits, by my calculation that equates to 125kHz. However, I suppose taking into account that brightness can be adjusted in increments of 1/16, that would mean the internal oscillator would have to be running at 2MHz?! That's not 450kHz...Anyway, if we assume the 500us per digit is correct, then at maximum brightness of 14/16, it has an on-time duty cycle of 87.5% (437.5us). The electrical characteristics section of the datasheet says that each grid pin typically sinks 140mA (note: the previously-linked English datasheet seems to have mistakes there - a more recentChinese datasheethas them right). So the maximum brightness average current will be 122mA?One thing I don't understand is how this chip ensures consistent brightness when different numbers of segments per digit are illuminated.Also, if I'm only using 12 out of the 16 supported digits, doesn't that mean that the perceived brightness of the used digits will be slightly lower, due to the increased off-time from the overhead of the on-cycles of the unused 4 digits?

author: RES
author_rank: Regular Contributor
timestamp: August 04, 2021, 07:17:52 pm
content: Page 8 of datasheet: Pulse width max. is 500usec=0.5msec, this times 8 digits is 4 msec, so the refresh is 1/4msec=250Hz. LED current avg will be max 200mA/8=25mA. (pulsed 200mA peak, but only for max. 0.5msec)

author: retiredfeline
author_rank: Frequent Contributor
timestamp: August 04, 2021, 10:04:09 pm
content: I used another display driver from Titan Micro TM1638 and no limiting resistor is used. Also I drove a display with two diodes per segment (= 3.6V) and it worked as well as one. So I think TM products have constant current circuits on chip.

author: edavid
author_rank: Super Contributor
timestamp: August 04, 2021, 11:43:49 pm
content: Quote from: HwAoRrDk on August 04, 2021, 06:48:22 pmI know this is common, but it still seems like a bad idea (if the Chinese data sheet is correct). There are not many 7 segment displays that are going to be happy with e.g. 65mA peak current, and you don't want to exceed the max digit ("grid") current. I would add resistors to the segment lines.QuoteWhy does it matter?QuoteThe digit outputs are not current limited, so the current per segment will be reasonably constant.QuoteYes, you might prefer to use 2X TM1637 instead.

author: Cerebus
author_rank: Super Contributor
timestamp: August 05, 2021, 12:41:57 am
content: Quote from: edavid on August 04, 2021, 11:43:49 pmLook at a typical Kingbright 14 segment display that I just happened to have the datasheet handy for:Quite happy at 60mAand a 1/10 duty cycle.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: August 05, 2021, 04:30:57 pm
content: Quote from: retiredfeline on August 04, 2021, 10:04:09 pmI have seen them described elsewhere as constant-current drivers, but I really don't think they are. Maybe current-limited, but not constant-current. It's obvious from the datasheets that the brightness control is done by pulse-width modulation, not by actual current control.Quote from: edavid on August 04, 2021, 11:43:49 pmIt doesn't really. I just found it odd that the one figure in the datasheet that has anything to do with frequency doesn't seem to jibe with what the output timings are according to other information.Quote from: edavid on August 04, 2021, 11:43:49 pmOkay. I probably won't actually have room for two chips. Plus there's the added complication of driving two separate serial interfaces (it's not like one can daisy-chain off the other). I was originally going to use 3 '595 shift registers, but found the TM1640 et al are a more convenient single-chip solution that's approximately the same price.Quote from: Cerebus on August 05, 2021, 12:41:57 amThe 7-segment displays I'm planning on using are similarly-rated: 60mA at "Duty-0.1,1KHz", which I presume means 1/10th duty cycle.In terms of peak forward current rating, if the max current per LED segment isn't significantly less than that, it seems it would be pushing the displays above their rating. I make it that each digit has a 437.5us on-time at max brightness duty cycle (14/16ths), versus 100us for a 1/10 @ 1kHz duty cycle.

author: retiredfeline
author_rank: Frequent Contributor
timestamp: August 05, 2021, 05:06:10 pm
content: Quote from: HwAoRrDk on August 05, 2021, 04:30:57 pmHair splitting. There is a constant current element in series with each segment drive transistor, which is how it adapts to different LED forward voltages and different supply voltages, and does not require a series resistor, but of course it is unable to maintain the set current when the PWM turns that segment off. I did not say constant current throughout the cycle. So constant current peak if you like, which is what you are saying.You have misattributed the suggestion for 2xTM1637 to me.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: August 05, 2021, 06:45:47 pm
content: Quote from: retiredfeline on August 05, 2021, 05:06:10 pmIf they're doing some kind of constant current limitation on the segment drive pins, then how come the datasheets give different current figures for different LED forward voltages? For example, 55mA with LED forward voltage of 2V, 70mA at 3V?But, that would make more sense if the current limiting is done on the segment side. The datasheets don't give any real indication of what kind of drive circuitry there is apart from saying "P tube open drain output" (where I believe "tube" is the Chinese terminology for "transistor").Quote from: retiredfeline on August 05, 2021, 05:06:10 pmOops, sorry, copy and paste error. Corrected now.

author: retiredfeline
author_rank: Frequent Contributor
timestamp: August 06, 2021, 01:21:54 am
content: Quote from: HwAoRrDk on August 05, 2021, 06:45:47 pmIt's not a perfect current regulator. When Vo = Vdd - 2V, implying a LED Vf of 3V max, after you have added the Vf and the voltage drops of the transistors, there is less room for the regulator to regulate. And this slope may be deliberate design, as higher voltage LEDs are usually brighter. The point is there has to be some kind of current regulator because no limiting resistors are required.Also I'm not sure that the duty cycle increases if you use less digits, it may be fixed at 1/16. And the PWM doesn't have 16 steps, only 8 of those values are used + full off and full on, see page 7. But you don't need to worry about how that's implemented since it's internal anyway.I think part of your confusion is because 16 is both the number of digits and the number of PWM values. That's a coincidence, there is no connection, they are independent. In other chips from TM supporting other digit widths, there are still 16 PWM values.Bottom line is the LED segments will be driven with about 70/16 mA average which sounds about right.PS: I did a translation of the original datasheet using DeepL and the procedure I developed here:https://hackaday.io/page/10164-translating-chinese-datasheets-in-pdfHTH