ATmega328 thermal reset

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Guys,

 

I have an LED lamp I built using an ATmega328 to drive the rest of the circuit that gets pretty warm from the surrounding LEDs and other components when I run it at full power, and it appears that the ATmega is resetting itself.  At reset, the lamp goes to a lower power preset, so I know it has reset, and it runs just fine at the lower power setting.  I cant find anything in the ATmega data sheet about thermal resetting.  Can anyone tell me anything about this?

 

Thanks,

mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is it BOD activating perhaps. High heat suggests high current. If so and your PSU is not up to it this may mean dropping Vcc which could trigger BOD.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 Remember that the AVRs have a reset cause trapped.  Put in code to trap/record/clear the value, and examine later.

 

Check other components, also.  A regulator may be overheating under the problem conditions, and may well have a thermal reset.  If the AVR's power is then lost...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Cliff,

 

The ATmega is only used to drive a TI TLC5940 LED controller, so I don't think high current from the ATmega is happening.  The TLC may have a thermal reset, but I don't see how that would cause the ATmega to reset.  They talk to each other with SPI.  I wonder if the cheap switching voltage regulator I am using is going wonky when it gets too hot.  That could be what is happening.  Thanks for the input.

 

Hope your cats are doing well.  Ours are as annoying and sweet as always.  I have started volunteering at San Francisco Animal Care and Control again.  I am going to try to limit my time there so I don't burn out again.  The last time I spent way too much time there and couldn't handle it any longer.

 

Take care,

mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As far as I know, there is no inherent "thermal reset". M328 is spec'd for operation to 125C so there should be nothing in the chip that would "reset" it up to that point.

 

Now, BOD is a different matter. First, BOD depends on the internal voltage reference. Figure 30-316 of the spec sheet shows how the bandgap (reference) voltage varies with both supply voltage and temperature. It shows that the voltage decreases with increasing temperature. That should imply that the BOD trip point is lower at high temperatures. So, THAT does not seem to be a likely explanation. I could not find a temperature chart or spec for BOD trip levels over temperature.

 

Have you checked the actual voltages at full power? 

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just looked at the lamp and it is an older design with no internal voltage regulator.  I am running it at 4.2V with an external regulator.  I'm not sure what the BOD fuse is set at.  Probably 2.7V.  It's hard to check voltages, Jim, as everything is enclosed in the lamp body.  Maybe I will reset the BOD fuse to the lowest value or turn it off and see if that does anything.

 

Is it possible for another component to cause a reset over SPI?  That seems unlikely.

 

Usch, I will look at the data sheet for the reset trap you mentioned and see if I can find it.  Do you know where it is in the data sheet off hand?

 

Thanks guys,

 

mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MarkThomas wrote:
I am running it at 4.2V with an external regulator.

Is that regulator getting hot?

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey theusch,

Yes, that regulator is getting hot.  It is a very small, cheap switching regulator from China.  That is a really good question.  It may very well be that regulator.  I think I will power the lamp with my big, linear power supply and see if anything happens.  Thanks for the good question.

 

mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MarkThomas wrote:
Yes, that regulator is getting hot. It is a very small, cheap switching regulator from China. That is a really good question. It may very well be that regulator. I think I will power the lamp with my big, linear power supply and see if anything happens.

Actually, if it were me under "controlled" conditions I'd set up to monitor the regulator temperature and output V under the heavy load and verify the root cause.  >>Then<< decide what to do. ;)  Perhaps add a heat sink.

 

NB:  We like our <$10 infrared/laser/digital thermometer for this type of thing.  E.g.

http://www.ebay.com/itm/HH-Non-C...

Not "lab quality", but really useful.  Beats the finger and seconds-till-ouch test.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey theusch,

You are brilliant!  I am pretty sure that is the cause of my resetting.  I noticed earlier that the regulator didn't put out quite as much current as it should when all the LED emitters were at full power.  I hooked up my big power supply, and it is supplying the current I would expect.  I wont know for a day or two if there is a reset condition happening, but I am pretty sure it is that external regulator.  They are just not built for putting out a lot of current.

 

Thanks so much for the ideas.  I should have put it together myself, but I was fixated on the lamp internals.  I will let you know the result of the experiment tomorrow.  Maybe the lamp internals will melt or start a fire.  The lamp body needs some vent holes, which are in our current design, so it gets pretty hot inside the lamp.  If it fails this time it will probably be catastrophic.

 

Thanks again,

mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have little voltage and current meters on the regulator, and the voltage remains constant with current, all the way up to full power on all emitters, but like I said, the current is not quite what it should be at full power.  I can stick a thermocouple on the regulator to get a rough measure of temperature, and I am pretty sure it is above 85C.  I guess I shouldn't expect to much for a 50 cent adjustable regulator.  Maybe we should consider a quality regulator for future designs.  I thought switching regulators were not supposed to get hot like the linear ones.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey theusch,

What is the beam size on that IR temperature gun you suggested.  Is it small enough to measure a 6 pin chip.  Does it average over the whole beam, so for small components it averages in a lot of background?   It looks pretty interesting, and is certainly low cost.  I am thinking about taking your advice and buying one.  Are the super heavy duty batteries worth the $2?

 

Thanks,

mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It was kind of an impulse buy, but indeed a project required some temperature measurement and this was deemed easier than attaching the thermal tip of our "real" meter with conductive cement, and then moving it and repeating.

 

"Real" units are about $50 and up.  Generally, they will feature twin laser locators that intersect at the correct spot.

 

There is one parameter, forgot what it is called, that indicates the proper distance for best results.  Haven't used it for a while; is it completely reflective surface that won't work?

 

It is grabbed off the shelf every few weeks or months.  The last time I saw it used, the office manager was firing up the bread maker and was checking yeast water and other ingredient temperatures. ;)

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

Last Edited: Fri. Mar 31, 2017 - 07:47 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh, I see the distance:spot ratio is 12:1, so if I am 12 inches away the measurement spot is 1 inch diameter, so I would just need to get closer.  I am going to buy one.  It is an impulse purchase.  I can compare it to using a thermocouple.  It will be easier to use than that.  Thanks for the impulse.

 

more tomorrow,

mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I thought switching regulators were not supposed to get hot like the linear ones.

They can't change the laws of physics.

 

Switching regulators can be >>more<< efficient than linear regs, but not 100% efficient.  A typical el-cheapo switching reg will have 70%-90% efficiency.  If you're pulling 5 W out of it, then even at 90% efficiency it's still dissipating about 0.5W.  That's enough to get awfully hot unless you're able to sink that heat away.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Good point Joey.  The lamp is running at 4.2V and pulling 1.68A, so that is 7W.  I see your point.

 

It is still running fine with the big power supply.  It appears it is indeed that voltage regulator.  It would have reset by now using the regulator.

 

Thanks so much guys!!  I really like this place.  So many smart people to help me debug my projects.  I really don't know where I would be without you all.

 

My current project is a cheapo range finder set up on my workbench so when a cat jumps up on the workbench it detects a change in range and a little speaker lets out a loud annoying squeal.  I have been finding pieces of wire and other parts around the house that have become cat toys that started out on the workbench.  I added a counter in software and an LCD display to see how many times it has been activated since the last reset.  Should be interesting.

 

mark