Help about ATMega8A-AU

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

I'm curently facing problem with my project using ATMega8-AU TQFP32. I have 100-unit of ATMega8-AU soldered on PCB, and the problem occur at around 20-unit of them. The design just on/off 4 leds, buzzer, and 2 push-on input switches. And the problem is, after around 5 minuts works fine, and then the system become unstabil, buzzer and LEDs on/off randomly uncontrolled. is there someone have experient with this problem?

I already have experient with 100-unit of ATMega8A-PU DIP28 with no problem before. Thanks.

Best regards
Siswanto
Indonesian

Attachment(s): 

Last Edited: Tue. Oct 4, 2011 - 02:42 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Connect AVCC to VCC first of all.

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

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

Quote:
is there someone have experient with this problem?

Sure. It is called "buggy design".

No RSTDISBL, no fun!

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

MBedder wrote:
Connect AVCC to VCC first of all.

I had connect AVCC to VCC, has no effect.
:?

Siswanto

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

Looks to me like you need more uFs after the regulator. Obviously the a/d inputs werent working at all with avcc disconnected. I bet the a/d inputs are going above 5V and messing stuff up.

Imagecraft compiler user

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

Dear All,
The problem is caused by aktive-low DIGITAL_INPUT become low by it self at running time, but I don't know why?.

Maybe coused by interference 24VDC_line upper of digital_input_line, may you take a look attached pic.

Looking for you comment, guys.., and Sorry my poor english. :)

Siswanto

Attachment(s): 

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

Any soldering error below SW1 or the binary encoder would route 24 Volts to the CPU. Imho you really have to reroute to clearly seperate the 24 volt lines from the CPU lines. Also note that using a linear voltage regulator from 24 down to 5 or 3.3 volts will produce quite some heat . Touch one of them once the erratic behaviour begins and see if its hot and its internal heat protection has kicked in. Consider using a switched regulator like the MC34063 or a newer design :P
If this is for automotive use also consider using better filtering as cars have a very noisy supply voltage.

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

Do you have the internal pull-ups enabled on the input PORT?
If no, enable them!
If yes, they may be to high(60-70K) and you need something like 10K or so.
Can you see a HI on the inputs with a LOGIC PROBE with the switch open?
Make sure that the external wiring to the switches is not far. If it is you may need to used twisted wiring to reduce induced noise. Other measures for really long lines or very noisy environments.
This probably belongs in General Electronics!

Incidentally I can't work out the odd way you have wired up the BCD switch? :shock:

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

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

To All, thank you for your comments, suggestion, etc
I think I will reroute the PCB. :)

best regards
Siswanto

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

siswanto stated:

Quote:
after around 5 minuts works fine, and then the system become unstabil,

mschoeldgen stated:

Quote:
see if its hot and its internal heat protection has kicked in.

I think you already have your answer, by mschoeldgen.
The 78M05 is dissapating LOTS of Watts as heat, and is likely going into its thermal overload rollback, and then your circuit becomes erratic.

Put a very large heat sink on the voltage regulator and see if it runs a little bit longer, say 8 minutes instead of 5 minutes, before it overheats.

Then re-design the power supply to use a different regulator, as suggested above.

JC

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

DocJC wrote:
The 78M05 is dissapating (..) and then your circuit becomes erratic.

I do not know the details of this specific chip, but LDOs have a thermal shutdown circuitry, which pulls Vout to some low voltage when it is too hot(150*C) till it cools down. Heat LDO up with a soldering iron or force some energy to dissipate into it - trigger thermal shutdown several times "manually" to find out how it operates. Nothing fancy really.

If this made your m8 enter an unpredictable state, then presumably you allowed your chip run out of the specification voltage=f(F_CPU) - rerouting will not change a thing.

No RSTDISBL, no fun!

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

Why do you have 24V into a regulator chip when NONE of the components use it ?! That's ALOT of wasted power for it.

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

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

What is more:

siswanto wrote:
The design just on/off 4 leds, buzzer, and 2 push-on input switches.

Each led current is below 5mA, that gives below 20mA on all leds, then a 8MHz m8 is <10mA and a buzzer(lets suppose a <20mA) giving below 50mA current.

With a 24V to 5V LDO we have 19V*0,05A is below 1W of energy - it is not enough to trigger thermal shutdown at ambient temperatures on such chip (SO-8 triggers at ~0,8W and this DPAK monster can dissipate over 10W).

No RSTDISBL, no fun!

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

Isn't also D2 (the buzzer kick-back diode on page 2) supposed to be the other way around? I don't think it is causing the problem, but still.

-Pantelis

Professor of Applied Murphology, University of W.T.F.Justhappened.

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

Quote:
I think I will reroute the PCB.

:shock:When you haven't proved that is actually the problem?
You might finish up with another 100 boards you can't use.:oops:
Quote:
Isn't also D2 (the buzzer kick-back diode on page 2) supposed to be the other way around?

It certainly is! In addition, the buzzer & diode (reverse to what is shown) should be in the collector as well, if you want the buzzer to operate at full 5 volts.
I agree that the regulator is probably just OK, but it needs verification.

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

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

Things to try:
1.- Use an external 5v power supply and try......
2.- Use an external 7v5 instead 24v and try....
3.- Test the BODLEVEL fuse (if any).
4.- Use 2k2 on leds....

rgds.

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

Dear All,
1. total 100 unit, only at 18 unit problem.
2. i'm very sure, 7805 not overheat, total current no more than 30mA, measured with ampere meter.
3. i'm using 24VDC, since the circuit drive 24V DC motor.
4. The problem is, DIGITAL_INPUT become low at running time, even push-on button not pressed (internal pull-up enabled).

siswanto

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

Have you tried wiring a 10K pull-up resistor on a few of 18 units that don't work.
How long is the wiring that goes to the switches on the inputs?
Effectively check my earlier post! Ie.
If yes, they may be to high(60-70K) and you need something like 10K or so.

Quote:
Can you see a HI on the inputs with a LOGIC PROBE with the switch open?
Make sure that the external wiring to the switches is not far. If it is you may need to used twisted wiring to reduce induced noise. Other measures for really long lines or very noisy environments.

If you can't see a logic HI with a probe, then the MCU won't see it either!

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

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

siswanto wrote:
The problem is caused by aktive-low DIGITAL_INPUT become low by it self at running time, but I don't know why?.

Does it happen randomly? or after a specific scenario? Do you have access to an oscilloscope/logic analyzer/something to verify that?

-Pantelis

Professor of Applied Murphology, University of W.T.F.Justhappened.

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

pnp wrote:
siswanto wrote:
The problem is caused by aktive-low DIGITAL_INPUT become low by it self at running time, but I don't know why?.

Does it happen randomly? or after a specific scenario? Do you have access to an oscilloscope/logic analyzer/something to verify that?

It is randomly, once it happen then the system become unstable.

LDEVRIES wrote:
Have you tried wiring a 10K pull-up resistor on a few of 18 units that don't work.
How long is the wiring that goes to the switches on the inputs?
Effectively check my earlier post! Ie.
If yes, they may be to high(60-70K) and you need something like 10K or so.

yes, i have tried 4k7 pull-up,
with enternal pull-up, some board ok and some other still unstable.

no wire to the switches, since the switch on the board, and under switch percise there is width 24VDC line, please take a look above PCB picture.

thank so much, and I still need your help.
siswanto

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

Quote:
yes, i have tried 4k7 pull-up, with enternal pull-up, some board ok and some other still unstable.

OK, what are the voltages that you read with a digital multimeter on
a) some of the units that work.
b) some of the units that dont work.
c) on some of the units that work with a 4.7K ext PU.
d) on some of the units that don't work with a 4.7L ext. PU.

You could try decoupling the inputs and the 24V track with a 0.1uF monolithic.

As Brutte has already alluded to, there might be a bug in your program which is triggered possibly causing the DDR to be written to an output? Why the bug should only affect specific units I have no idea, but there will be a good reason.

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

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

Slightly offtopic, but which CAD did you use to create your PCB? Looks very neat.

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

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

Do you run the chip within the specification limits? I mean no overclocking, under and over-voltage, violation of Absolute Maximal Ratings, etc?

I cannot see if pin3 and pin5 are connected with a track on your PCB. Looks like the GND current flows through IC. Could you zoom the design in there?

We already know you have powered the PORTC[0:3] through clamping diodes (which violates the specification). Do you have some chips which you are sure are/were not affected by this practice?

No RSTDISBL, no fun!

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

Do you handle the chip with proper ESD safety procedure and how about your soldering iron is it ESD safe and grounded properly.

P.Ashok Kumar

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

MBedder wrote:
Slightly offtopic, but which CAD did you use to create your PCB? Looks very neat.

EAGLE CADSoft

ashokok wrote:
Do you handle the chip with proper ESD safety procedure and how about your soldering iron is it ESD safe and grounded properly.

In Indonesia is hight humudity, electro static not crytical here.

Friends!!, I'm forgot to tell you something.
I have experience with AT89C2051 circuit before, there is 24VDC line under DIP-10 AT89C2051, and some system not stable too, I think I'm repeat my mistake, so I decide to re-route my PCB. :)

thank you
siswanto

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

Yeah, a 24 V motor connected to the same supply will infest your circuit to a larger degree. Try to incorporate a coil in the 100uH range and a few capacitors as mentioned above into the DC line to clean it up a little. Move the 24V lines away from the logic and 5 volt lines. We here with our electric cars can tell quite some stories about EMF infested supplies and their influence on MCU's :P