# Running LM317 at the limits (or planned premature death?)

#### MikeA

Joined Jan 20, 2013
362
I have a Chinese made device (let's keep the mystery for a tiny bit) that runs on a lithium-ion battery with 13 cells.

With a fully charged battery where each cell is at 4.2V that would result in 54.6V at VIN.

VOUT
if my math is right would be 15V. That means a 39.6V drop.

But before we go further into the merits of this circuit, what is the purpose of R62?

#### bertus

Joined Apr 5, 2008
22,276
Hello,

It looks like R62 is a voltage dropper.
The voltage will be dependend on the current drawn.

Bertus

#### MikeA

Joined Jan 20, 2013
362
That's what I suspected. So they are trying to lower voltage to LM317T to keep the heat away from it? Essentially warming up the resistor instead of the the LM317T since the resistor can get much hotter without issues?

#### Papabravo

Joined Feb 24, 2006
21,225
It also may be the case that 54.6VDC exceeds the maximum input voltage of the LM327T, which should be in the range of 40V.
It also looks like R58, R59, & R60 are there for ensuring there is ALWAYS a minimum current draw. So long to batteries lasting a long time from being drained all the way. This seems like and example of "squeeze every nickel" out of component cost because the customer will never know.

It might be interesting to work out what that minimum current draw actually is. It will probably shock you. My guess is in the neighborhood of 180 mA, based on dropping 15 volts across R62. That's 2.66 Watts, so the 3 Watt resistor is cutting it close. No margin!

Last edited by a moderator:

#### AnalogKid

Joined Aug 1, 2013
11,033
It also looks like R58, R59, & R60 are there for ensuring there is ALWAYS a minimum current draw. So long to batteries lasting a long time from being drained all the way. This seems like and example of "squeeze every nickel" out of component cost because the customer will never know.
Disagree. They are there to increase reliability. They supply some of the required load current while keeping some of the heat out of the ICs. It might be that there is not enough room for the heatsink that would be required if 100% of the load current were going through the ICs. The current through the bypass resistors is not wasted; it powers the loads.

R59 and R60 provide 13 mA to the load, while taking 130 mW of heat out of U5. Note that U5 is in a SOT-23 package, with no obvious heatsink surface and a max output current of 100 mA. Taking 15% of that outside the chip is a big deal.

R62 also its there to take some thermal load off of U4

Resistors are cheaper than heatsinks, and more reliable than IC's running at 90% of their ratings.

ak

#### MikeA

Joined Jan 20, 2013
362
Typical Chinesium -- no margin!
I'm getting that feeling.

So let's do away with the mystery. This is a brushless 3 phase hub motor controller (a very common one too, probably millions of them out there) for an electric bicycle.

The controller, when turned on but idling does use roughly 4W of power (readout on bench power supply). Not aweful given it goes to sleep by itself when idling for 5 minutes, and that includes powering a backlit LCD display the size of a cell phone.

When the controller is idling, and with the case open in a room at 68F, I measured case temperature of the LM317T at 210F. It has no heatsink. Just standing straight up on the PCB. The aluminum controller case acts as a heatsink for MOSFETs that drive the motor. I would imagine it would get very very hot inside that enclosure in the summer. Probably upwards of 130-140F.

Looking at the spec sheet for LM317T, I'm not very impressed.

The 15V output from the LM317T is driving the gates on the MOSFETs. If the LM317T overheats and starts cutting back, won't the MOSFETs potentially start getting hotter too since they not driven as hard, and it becomes a cycle that ends in the death of this controller?

#### Papabravo

Joined Feb 24, 2006
21,225
I'm getting that feeling.

So let's do away with the mystery. This is a brushless 3 phase hub motor controller (a very common one too, probably millions of them out there) for an electric bicycle.

The controller, when turned on but idling does use roughly 4W of power (readout on bench power supply). Not aweful given it goes to sleep by itself when idling for 5 minutes, and that includes powering a backlit LCD display the size of a cell phone.

When the controller is idling, and with the case open in a room at 68F, I measured case temperature of the LM317T at 210F. It has no heatsink. Just standing straight up on the PCB. The aluminum controller case acts as a heatsink for MOSFETs that drive the motor. I would imagine it would get very very hot inside that enclosure in the summer. Probably upwards of 130-140F.

Looking at the spec sheet for LM317T, I'm not very impressed.

The 15V output from the LM317T is driving the gates on the MOSFETs. If the LM317T overheats and starts cutting back, won't the MOSFETs potentially start getting hotter too since they not driven as hard, and it becomes a cycle that ends in the death of this controller?
I know linear regulators are cheap and easy to use, but this does not seem like a good fit.
210°F ≈ 99°C so you have about 26°C case to junction margin. I have not used one of these parts in a long time and certainly never with this amount of potential stress.

Is there a reason why you are digging into this so diligently?

Joined Feb 20, 2016
4,471
Looks like a real good switch mode regulator rebuild is in order.

#### MikeA

Joined Jan 20, 2013
362
Is there a reason why you are digging into this so diligently?
I own one but have not put into production yet. If I can address some issues beforehand that might extent its life significantly.

#### Papabravo

Joined Feb 24, 2006
21,225
I own one but have not put into production yet. If I can address some issues beforehand that might extent its life significantly.
OK. I understand your position. I hope things work out for you.

#### MikeA

Joined Jan 20, 2013
362
Looks like a real good switch mode regulator rebuild is in order.
Is there any reason why they might have used linear regulation? Besides costs. It seems like switching regulators coming out of China cost pennies nowadays. I just find it difficult to see cost as the sole reason.

If they can get a 60V 3A buck converter to my doorstep from China for \$2, with terminals, and on a PCB, I imagine the two caps, the IC and a choke on that board would cost 10 cents extra, if that, instead of that gigantic 3W resistor and an LM317T.

10 year old PCB design that they have no incentive to update? I can see that.

Joined Feb 20, 2016
4,471
There are quite a few switch mode regs around nowadays.
Here is just one version for example....
R-78HB15-0.5L 72Vin, 15V out 0.5Amp.
R-78HB5.0-0.5/W 72Vin, 5V out 0.5Amp.
https://au.element14.com/w/c/power-...ements/prl/results/2?input-voltage-dc-max=72v shows some regulators hat are "78xx" pin compatible, NOT LM317!!!
These have 72V input voltage limits.
I've used these, or similar, in industrial control applications for quite some years with very good reliability.
The 72V input is a good step for handling transients.

#### MikeA

Joined Jan 20, 2013
362
Replacing it with a switcher would be tricky as everything is on one PCB, including a STM8S105C6 processor. It would involve cutting traces and soldering some wires to them. Thermal management on the LM317T seems like the better solution. A heatsink probably. Maybe even ventilation holes. The aluminum case is watertight.

I'd need to test how hot the case is under load. There are a number of Chinese electrolytic caps inside too. Keeping them cool is a good idea probably.

#### MikeA

Joined Jan 20, 2013
362
It's unclear from the spec sheet, but when does something like an LM317T start thermal cut back? Is it at the absolute max operating temperature?

#### Audioguru again

Joined Oct 21, 2019
6,688
How many times can an LM317 heat to its maximum allowed temperature and cool to normal before it has "thermal fatigue" and physically cracks?

#### MikeA

Joined Jan 20, 2013
362
How many times can an LM317 heat to its maximum allowed temperature and cool to normal before it has "thermal fatigue" and physically cracks?
Maybe 100 times or so, which is a season of bike rides? I think this is the part that the manufacturer planned to fail in their planned obsolescence scheme.

I did a few more measurements, this time not with a thermal camera, but with a thermocouple.

Room ambient temperature: 65.8F.
Input voltage: 54.6V (fully charged 48V nominal battery)

This time I measured with the motor running with no load, but that still was driving all the MOSFETs, the LM317T reached 287.6F (!!!), and still climbing (not fast though) at which point I terminated the test.

Then I added a little heatsink to it, and the same test resulted with a temperature of only 161F. That's with no air flow at all. I plan to add a little 1" fan to the controller for some active cooling.

Last edited:

#### bertus

Joined Apr 5, 2008
22,276
Hello,

Is it an idea to extend the leads of the LM317 and mount it (isolated) on the aluminium case?
That way you would have a larger heatsink.

Bertus

#### MikeA

Joined Jan 20, 2013
362
Is it an idea to extend the leads of the LM317 and mount it (isolated) on the aluminium case?
That would have been an easy and cheap thing to do for the manufacturer! But I didn't want to take out the mainboard out of the case since there are 12 upright MOSFETs screwed to the wall. And many many wires going through a grommet that is hot glued together. Not disturbing that nest is probably a good idea.

The standalone heatsink should keep it pretty cool with a little bit of air flow over it from a little fan. I think the fan would keep the capacitors from baking too. People with these controllers say they get too hot to touch in the summer, so probably high 100's on the outside.

The MOSFETs are isolated from the case using some yellow Kapton type tape. I would imagine given everything else it's not designed to be thermally conductive tape.

From an engineering perspective, given that costs need to kept down and the extruded aluminum case is to be used as a heatsink, what would be an alternative to Kaptop tape? Thermal pad and isolated grommet for hold down bolt?

#### bertus

Joined Apr 5, 2008
22,276
Hello,

For mounting a TO-220 isolated, have a look at the follwing picture:

Behind the TO-220 the isolation can be a silicon pad as shown or a piece of mica or kapton.

Bertus