Author Topic: Problem with AMS1117 regulators  (Read 4799 times)

0 Members and 1 Guest are viewing this topic.

Offline beebTopic starter

  • Newbie
  • Posts: 7
  • Country: ch
Problem with AMS1117 regulators
« on: June 02, 2022, 12:48:48 pm »
Hey everyone,

First time posting here, don't know why I waited so long to join!

I'm currently working on a nixie clock project and I assembled my first unit a couple of weeks ago. Everything was going pretty smoothly and I managed to program it completely and it worked for a while. This is not my first electronics project (designed from scratch a VFD tube clock and some arduino-based data logger stuff before) but I consider myself a beginner.

Suddenly the clock wasn't working anymore. I did some post-mortem and found out that the 5V regulator had fried and the 3.3V was getting very hot.

Here is the design which you can check: https://oshwlab.com/krizzli/nixie-clock-in-14

Now disclaimer: I know I messed up and didn't connect the regulators tabs to a copper fill to dissipate heat. My mistake! But I'm not sure this is exactly the problem (yet) and I plan on adding radiators as workaround. There are probably other design mistakes, I'm sure some of you will point them out :)

I'm using 2 variants of the AMS1117 low dropout regulator, one for 3.3V (for ESP32 and USB to TTL chip) and one for 5V (HV5122 drivers and logic level shifter), both getting an input of 12V (which is needed for the high voltage board I'm using, which generates the 170V for the tubes). The datasheet specifies a maximum input voltage of 15V for those regulators so I should be good, right?

So anyway, I started assembling a second unit, making sure to check everything along the way and to avoid frying anything.

I got the board partially assembled (anything that jlc had in their "basic" parts) and only added the power input jack and USB connector (there are no ICs except for the two regulators): see picture

With the board unplugged, when measuring the resistance between GND and 3.3V, I get a reading of around 300 Ohms. And between GND and 5V I read around 400 Ohms. Is that expected? I checked the rest of the board and couldn't see anything out of the ordinary. I checked my first (partially fried) board and they read almost exactly the same, resistance-wise on the regulator outputs.
Anyway, I tried to connect 12V on the input side, and checked the output of the regulators. Getting almost 9V on the 3.3V regulator, and 10.8V on the 5V regulator.... ?

When assembling the first board, I remember doing the same and checking the outputs, which were in spec (3.3V and 5V, respectively). Did I get some duds? Did I do something wrong in the design or assembly? Is it expected that they provide the right voltage under more load?

Hopefully someone can shed some light so I can keep going with my troubleshooting and hopefully get a working board in the end.

Thanks!
« Last Edit: June 02, 2022, 12:53:50 pm by beeb »
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 8263
  • Country: fi
Re: Problem with AMS1117 regulators
« Reply #1 on: June 02, 2022, 01:10:17 pm »
Hi and welcome,

1) Do not use crap like 1117. Use modern MLCC-stable LDOs, if you need LDO (Low DropOut), or classic non-LDO linear regulators (like 78xx) if you want it cheap.

2) If you still want to use 1117, read the datasheet (possibly from different manufacturers) carefully, paying attention to stability requirements regarding output capacitor value and ESR.

I forgot exact values, but basically, you need something like 4.7-10uF MLCC + 1ohm resistor in series with it, or use a tantalum capacitor (which has suitable internal series resistance built-in) instead.

If you fail to follow the stability requirements, these parts oscillate (you can see it with an oscillosscope) and the average voltage they output can be anything, including significant overvoltage.

Modern regulators are usually stable with MLCC output capacitor (ESR as low as 0.020ohm) and they brag about it on the front page. They also offer even lower drop-out voltage which is sometimes handy, although for your 12V->5V,3.3V, 1117's dropout spec is fine. I would probably use 78xx parts just because they are even more retro, equally cheap, and better whenever you are fine with the 2-2.5V dropout spec.

Other usual suspects:
* Input capacitors. Use a combination of MLCC and electrolytic capacitor. Large MLCCs alone can create large voltage transients (usually up to 2x but in very bad cases can go beyond that) when hot-plugging. If 12V becomes 24V momentarily, that can exceed maximum ratings of parts. Absolute maximum rating of AMS1117 is just 15V, so your design is marginal and very sensitive against any input voltage problems!

* Note that your "12V supply" can be significantly over 12V, even if proper quality. Try measuring it for fun.

* Thermal design. How much current are you pulling out of the 5V and 3.3V regulators? Note that the 5V regulator dissipates (12-5)V times current, and 3V3 regulator dissipates (12-3.3)V times current. These regulators supposedly have some kind of built-in thermal protection so they should not blow up because of this, but I have learned never to trust this feature.

AMS1117 datasheet misses the crucial Rth Junction to Ambient value, but let's assume it's 100 degC/W with your PCB layout. This would mean, at +40degC ambient, and one Watt of dissipation would make the internal die temperature go up to 140degC. This is simple to calculate, temperature increase is dissipated power times Rth, if you can find RthJunction-Ambient value for a similar part (maybe another 1117, or some other power component in similar size/shape package). Don't let Tjunction exceed +100degC for some margin.

Where did you buy the components? If the 1117's are from Aliexpress or Ebay, having nonfunctional fake parts is also a real possibility. If so, start by buying genuine parts from distributors like Digikey, Mouser or LCSC, because having iffy parts adds another factor of uncertainty, and as a beginner, you already have quite many!

Also some linear regulators need protection against input short (especially if certain amount of output capacitance is exceeded); basically an added diode from output to input. Don't remember if 1117 is such. At some point, I started routinely adding these diodes to LM317 and 78xx based designs.
« Last Edit: June 02, 2022, 01:22:52 pm by Siwastaja »
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5094
  • Country: ro
  • .
Re: Problem with AMS1117 regulators
« Reply #2 on: June 02, 2022, 01:19:06 pm »
Don't see any capacitor on the output  (also thin traces for the output... why?)


SOME 1117 regulators can becomes unstable without capacitor on the output, AND with ESR between 0.1 ohm and 1 ohm.
Most are stable with a ceramic capacitor, but some require ESR above 0.1 ohm.


For example : From http://www.advanced-monolithic.com/pdf/ds1117.pdf

Stability
The circuit design used in the AMS1117 series requires the use of an output capacitor as part of the device frequency compensation.
The addition of 22µF solid tantalum on the output will ensure stability for all operating conditions.
When the adjustment terminal is bypassed with a capacitor to improve the ripple rejection, the requirement for an output capacitor increases. The value of 22µF tantalum covers all cases of bypassing the adjustment terminal. Without bypassing the adjustment terminal smaller capacitors can be used with equally good results

22uF tantalum is  "codeword" for a "capacitor with esr within some reasonable value, like 0.1 ohm to 1 ohm"

Other manufacturers are even stricter, see TI's LM1117 datasheet : https://www.ti.com/lit/ds/symlink/lm1117.pdf

Quoting from page 16:

9.2.2.1.3 Output Capacitor
The output capacitor is critical in maintaining regulator stability, and must meet the required conditions for both minimum amount of capacitance and equivalent series resistance (ESR). The minimum output capacitance required by the LM1117 is 10 µF, if a tantalum capacitor is used. Any increase of the output capacitance will merely improve the loop stability and transient response. The ESR of the output
 capacitor should range between 0.3 Ω to 22 Ω
. In the case of the adjustable regulator, when the CADJ is used, a larger output capacitance (22-µFtantalum) is required.

I usually recommend using 47-100uF 10-25v electrolytic capacitor from low impedance series like Panasonic FC , Nichicon PW etc ... the ESR of such capacitors would be around 0.4-0.6 ohm .. ex 100uF 16-25v FC series has 0.35 ohm ESR : (page 6) https://industrial.panasonic.com/cdbs/www-data/pdf/RDF0000/ABA0000C1209.pdf


I would simply NOT use 1117 linear regulators, there's so many other regulators you could use, and in better packages

edit:   also, consider maybe rotating the nixie chips 45 degrees to allow for easier / better routing.   And maybe move the buttons closer to the edge, for easier access and further away from the anodes of the nixie tubes.  Very unlikely you'd accidentally shove your finger to touch that pin, but why risk it. 
« Last Edit: June 02, 2022, 01:31:09 pm by mariush »
 

Offline beebTopic starter

  • Newbie
  • Posts: 7
  • Country: ch
Re: Problem with AMS1117 regulators
« Reply #3 on: June 02, 2022, 01:31:07 pm »
Hi! Thanks for the reply.

1) Understood, I will try to find an alternative (78xx), hopefully in the same package!

2) Here is the datasheet of the exact part I got https://datasheet.lcsc.com/lcsc/1811142212_Advanced-Monolithic-Systems-AMS1117-3-3_C6186.pdf They do mention putting a 22uF tantalum cap on the output for stability, but also mention the adjustment pin which I don't have since they are fixed output versions. I have some capacitance on the output by virtue of the decoupling caps next to the various components powered by those 2 regulators, but I'm not sure what the difference between tantalum and other caps is...

Input caps: interesting, I didn't think to put an electrolytic cap there, but I could still add one on the barrel jack connector as I have some though-hole caps laying around. Any recommended value? (I'm a noob a dimensioning those kind of things, usually I refer to other designs)

Thermal design:

For 3.3v:
  • ESP32: could potentially draw quite a bit (datasheet recommends 500mA)
  • USB to serial: 17mA
  • Level shifter: almost nothing

For 5v:
  • Level shifter: almost nothing
  • HV5122: 15mA

For the 1117 Rth junction to ambient they say:
Quote
The thermal resistance from the junction to the tab for the AMS1117 is 15°C/W. Thermal resistance from tab to ambient can be as low as 30°C/W
« Last Edit: June 02, 2022, 01:34:14 pm by beeb »
 

Offline beebTopic starter

  • Newbie
  • Posts: 7
  • Country: ch
Re: Problem with AMS1117 regulators
« Reply #4 on: June 02, 2022, 01:33:45 pm »
Missed your reply while I was replying to Siwastaja.

Seems like your recommendations are the same. I'll try to add some capacitance on the output (will be ugly but I don't really care). I think I have some tantalums somewhere. I definitely have some low ESR electrolytic caps.
 

Offline beebTopic starter

  • Newbie
  • Posts: 7
  • Country: ch
Re: Problem with AMS1117 regulators
« Reply #5 on: June 02, 2022, 01:51:17 pm »
Stability
The circuit design used in the AMS1117 series requires the use of an output capacitor as part of the device frequency compensation.
The addition of 22µF solid tantalum on the output will ensure stability for all operating conditions.
When the adjustment terminal is bypassed with a capacitor to improve the ripple rejection, the requirement for an output capacitor increases. The value of 22µF tantalum covers all cases of bypassing the adjustment terminal. Without bypassing the adjustment terminal smaller capacitors can be used with equally good results

I just added on the output a 10uF through-hole tantalum cap I found (didn't have anything bigger) and result is the same. Get 8.9V on the 3.3V regulator output. Time to find another regulator I guess!

BTW thanks for the other suggestions, next iteration I'll move some things around like the buttons and shift registers.
« Last Edit: June 02, 2022, 01:52:49 pm by beeb »
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5094
  • Country: ro
  • .
Re: Problem with AMS1117 regulators
« Reply #6 on: June 02, 2022, 01:52:44 pm »
Shouldn't need more than around 100uF on the input.

Quote
For 3.3v:
ESP32: could potentially draw quite a bit (datasheet recommends 500mA)
USB to serial: 17mA
Level shifter: almost nothing

(12v - 3.3v ) x 0.6A = 5.22 watts

Page 2 tells you : SOT-223 package ϕ JA= 90°C/W*
 * With package soldering to copper area over backside ground plane or internal power plane ϕ JA can vary from 46°C/W to >90°C/W depending on mounting technique and the size of the copper area

Usually such datasheets assume at least 1 square cm of copper as heatsink under the tab. If they don't tell you, you usually want to look at the "electrical characteristics" where sometimes they tell you the conditions under which they determined those values, and the heatsink area may be specified there.

Also see the footnotes in that section :
[...]
Note 2: Line and Load regulation are guaranteed up to the maximum power dissipation of 1.2 W for SOT-223, 2.2W for TO-252 and 780mW for 8-Lead SOIC. Power dissipation is determined by the input/output differential and the output current. Guaranteed maximum power dissipation will not be available over the full input/output range.
Note 3: See thermal regulation specifications for changes in output voltage due to heating effects. Line and load regulation are measured at a constant junction temperature by low duty cycle pulse testing. Load regulation is measured at the output lead ~1/8” from the package.
Note 4: Dropout voltage is specified up to 0.8A load. For currents over 0.8A dropout will be higher
Note 5: Minimum load current is defined as the minimum output current required to maintain regulation. When 1.5V ≤ (VIN - VOUT) ≤ 12V the device is guaranteed to regulate if the output current is greater than 10mA.

So you should not dissipate more than around 1.2w on the regulator, and with such high input voltage the regulator should have a minimum of 10mA load to guarantee it's stable.

I would recommend looking into a switching regulator to produce 5v at up to around 1A, and from there use a linear regulator to obtain 3.3v - this way you'll only drop (5v-3.3v) x 0.6A = 1w at most. I'd also suggest DPAK / TO-252 packages.

With synchronous rectifier switching regulators, you only need an inductor and a couple ceramic capacitors and resistors so it's not a big deal.

See for example AP62300 : https://www.digikey.com/en/products/detail/diodes-incorporated/AP62300TWU-7/12702558
Or AP62200 (it's just the 2A max version of the above chip) : https://www.digikey.com/en/products/detail/diodes-incorporated/AP62200TWU-7/13161381
Datasheet even has example layout to get the best out of it.




It will be tough finding a regulator with same pin order as 1117.
 

Offline beebTopic starter

  • Newbie
  • Posts: 7
  • Country: ch
Re: Problem with AMS1117 regulators
« Reply #7 on: June 02, 2022, 01:57:54 pm »
Shouldn't need more than around 100uF on the input.

Gotcha! Thanks

Note 5: Minimum load current is defined as the minimum output current required to maintain regulation. When 1.5V ≤ (VIN - VOUT) ≤ 12V the device is guaranteed to regulate if the output current is greater than 10mA.

So you should not dissipate more than around 1.2w on the regulator, and with such high input voltage the regulator should have a minimum of 10mA load to guarantee it's stable.

I would recommend looking into a switching regulator to produce 5v at up to around 1A, and from there use a linear regulator to obtain 3.3v - this way you'll only drop (5v-3.3v) x 0.6A = 1w at most. I'd also suggest DPAK / TO-252 packages.

Bingo! I guess that's why the voltage is random when no load is applied as it's the case now with no other components soldered on.
But I now see also the other challenges in terms of power dissipation. Like I said I was planning on putting some aluminum heatsinks on them, I found some quite small ones. But I guess I need to look into alternative regulators in any case.

This also explains why I thought my 5V regulator was shot on the first board. I'm probably not drawing enough current with only the HV5122's and it fails to stabilize... Or maybe it's burnt from the power dissipation. I measure 12V on its output but I don't know how to diagnose a fried regulator. Luckily the HV5122's are happy with 12V on the input so I think they are still functional.

Thanks!

EDIT: When providing 5V on the input, the regulators actually seem to regulate properly and I measure 3.3V and 5V on the outputs with no load. That would seem to confirm the fact that I need some current flowing through to get the proper regulation.
« Last Edit: June 02, 2022, 02:22:44 pm by beeb »
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 8263
  • Country: fi
Re: Problem with AMS1117 regulators
« Reply #8 on: June 02, 2022, 02:47:47 pm »
I just added on the output a 10uF through-hole tantalum cap I found (didn't have anything bigger) and result is the same. Get 8.9V on the 3.3V regulator output. Time to find another regulator I guess!

Quite likely the regulator is toast anyway, so when fixing things, you have to replace it with a fresh one.

For the output, adding the tantalum (or another way of providing enough capacitance with ESR in the correct range) is absolute must anyway, so good that it's added now. Usually you can have as much capacitance on the output as you want, but you definitely have to beware too small ESR. Tantalum capacitor has well controlled ESR which happens to be in a sweet range for most regulators like this. Any random electrolytic could work, too, but their ESR vary all over the place with temperature and aging.

For damping hot-plug voltage transients, on the input side (12V), add any random electrolytic capacitor. Anything rated from 47uF to something like 1000uF (and of course at least 16V) does the trick. Can be "low ESR" type, they are not too low ESR, but preferably general purpose non-low-ESR type. No polymer cap, it might have too low ESR.

With these fixes, solder in a fresh 1117 (if you have spares) and give it a try. Before that, measure what your 12V supply actually is. With 15V absolute maximum rating (with no recommended value given; would be something like 12-13V), you have almost no margin for error.
« Last Edit: June 02, 2022, 02:50:21 pm by Siwastaja »
 

Offline beebTopic starter

  • Newbie
  • Posts: 7
  • Country: ch
Re: Problem with AMS1117 regulators
« Reply #9 on: June 02, 2022, 03:11:42 pm »
Quite likely the regulator is toast anyway, so when fixing things, you have to replace it with a fresh one.

For the output, adding the tantalum (or another way of providing enough capacitance with ESR in the correct range) is absolute must anyway, so good that it's added now. Usually you can have as much capacitance on the output as you want, but you definitely have to beware too small ESR. Tantalum capacitor has well controlled ESR which happens to be in a sweet range for most regulators like this. Any random electrolytic could work, too, but their ESR vary all over the place with temperature and aging.

For damping hot-plug voltage transients, on the input side (12V), add any random electrolytic capacitor. Anything rated from 47uF to something like 1000uF (and of course at least 16V) does the trick. Can be "low ESR" type, they are not too low ESR, but preferably general purpose non-low-ESR type. No polymer cap, it might have too low ESR.

With these fixes, solder in a fresh 1117 (if you have spares) and give it a try. Before that, measure what your 12V supply actually is. With 15V absolute maximum rating (with no recommended value given; would be something like 12-13V), you have almost no margin for error.

I think this one is not toast as it provides the correct output when I reduce the input voltage to 5V. But as mariush said, I need at least 10mA of current to ensure regulation if the voltage difference is high, so that's likely the issue here.

Thanks for the considerations on the input cap too! Of course I checked that I have 12V and all is good on that side.
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 8263
  • Country: fi
Re: Problem with AMS1117 regulators
« Reply #10 on: June 02, 2022, 03:20:42 pm »
Yes, you are probably right. Minimum load requirement is a bitch and easily overseen. It usually does not cause destruction of the part. If adding a resistance, sized by Ohm's law to provide this minimum current, seems to fix the issue and the regulator regulates over the specified input voltage range, then there's your problem.

But as usual in beginner circuits, you find one obvious mistake (correcting which seems to solve the issue), but you find five more in the process! It's important to fix them all, even if they don't seem to cause problems - or at least write a note for yourself so that if you encounter strange behavior half a year later, you know what to look at first.

Me, working professionally or as a hobby (I do both), I tend to rather replace (than not replace) parts if I ever feel unsure. I have seen some strange hidden damage and it wastes so much time, and if a $0.50 component replacement (which takes 2 minutes) can save you from it, better just do it. But obviously during the current component shortages, we have had to even use desoldered parts from prototypes for production, something you would never normally do, so might not have the luxury of part replacements "just in case".
« Last Edit: June 02, 2022, 03:23:50 pm by Siwastaja »
 

Offline beebTopic starter

  • Newbie
  • Posts: 7
  • Country: ch
Re: Problem with AMS1117 regulators
« Reply #11 on: June 03, 2022, 02:12:58 pm »
I managed to salvage my first board in the end, and will probably assemble the second one like this too:

The 5V regulator is for sure more problematic than the 3.3V one, so I ended up removing it and changing the input voltage of the board to 5V. That way the 3.3V regulator works nicely too, and I'm just bypassing the 5V regulator altogether. I checked and my HV boost converter can generate the 170V from 2.5V up to 15V so I'm good on that front too.

The logic level shifter was toast from the 5V regulator being shot (and outputting 12V) but I replaced it with a new one and all seems to work now. The 3.3V regulator is surprisingly cool even without any heatsink.

Monitoring over the next few days but for now it seems I managed to salvage v1.0 :D

Thanks again for the help and general advice!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf