Atmega 128a with resistive thermistor sometimes blows up - Page 1
Forum section: electronics / general

author: coromonadalix
author_rank: Super Contributor
timestamp: January 22, 2021, 12:46:22 am
content: HiI have a Chinese serial based i/o control board based on a atmega 128a (witch i suspect counterfeit, 3 same boards have slightly different logos on the atmega) i only have the compiled hex to program, not the source code.Its a simple thermistor +/- 10k ohms at 22 degree between the atmega pin to the ground, can't recall if its a positive or negative thermistor.Sometimes on power up, the atmega simply diethe 5v supply seems very good and stable, but its an unbranded psu.When it die the measured ambient temperature goes up to 99 degrees, change the cpu, reprogram it and voila.Q: is there a way to protect this pin with say an 4.7v zenner ?? or add an surge protection device ? maybe i have a vcc spike of some kind i don't see upon power up ?i'll try to make a schematic of the board, but as i see, its only a thermistor to groundideas thks

author: amyk
author_rank: Super Contributor
timestamp: January 22, 2021, 01:09:04 am
content: Decoupling caps...?

author: ledtester
author_rank: Super Contributor
timestamp: January 22, 2021, 06:34:56 am
content: QuoteThere must be more to it. I imagine either:Code:V+ --- resistor --- (pin) --- thermistor --- GNDorV+ --- (current source) --- (pin) --- thermistor --- GND

author: sleemanj
author_rank: Super Contributor
timestamp: January 22, 2021, 07:18:55 am
content: Quote from: ledtester on January 22, 2021, 06:34:56 amCould be using internal pullup, probably not a super idea, but could be.

author: coromonadalix
author_rank: Super Contributor
timestamp: January 22, 2021, 11:40:56 am
content: Since i don't have the source code i don't know if a pull up is implied, it's simply connected (have to check witch pin) to an atmega pin to groundJust the atmega once in a while die ?? made a complaint to the board maker, no answers.EDIT: pin 61 of the atmega 128a (adc0)

author: aheid
author_rank: Regular Contributor
timestamp: January 22, 2021, 02:38:49 pm
content: Does the uC do more than just measure temp? If so, maybe issue is something else and the wrong reading is just a symptom?

author: WattsThat
author_rank: Frequent Contributor
timestamp: January 22, 2021, 02:59:29 pm
content: I think a photo of the board would be appropriate as you’ve really given us nothing in the the way of useful information. You certainly don’t need an atmega128 to read a single thermistor. Somewhere, there’s 99% of the relevant information missing.In general AVR’s are fairly robust devices and there is little sense to be made of what has been presented.

author: thm_w
author_rank: Super Contributor
timestamp: January 22, 2021, 09:44:35 pm
content: https://product.tdk.com/info/en/products/protection/temperature/chip-ntc-thermistor/technote/apn-chip-ntc-thermistor.htmlDid you measure the voltage on the NTC input when its "dead"?

author: sleemanj
author_rank: Super Contributor
timestamp: January 22, 2021, 09:55:15 pm
content: Quote from: coromonadalix on January 22, 2021, 11:40:56 amThat is obviously not true. It would make zero sense to have that circuit, there must be something at least that is connected to, you know, actually make use of the readings it takes!In other words, for reasons unknown you have assumed that it is it the NTC (or code reading it) which is the source of your fault, when that is decidedly unlikely. Much more likely is whatever else you have connected to this I/O controller is doing something that causes it to die.

author: Siwastaja
author_rank: Super Contributor
timestamp: January 25, 2021, 09:24:02 am
content: In this era of camera-equipped smartphones, a photo of the board would be helpful.

author: Alti
author_rank: Frequent Contributor
timestamp: January 25, 2021, 12:09:20 pm
content: Quote from: coromonadalix on January 22, 2021, 12:46:22 amIt does not make sense. You either change uC or reprogram uC.The hex file can contain binary for one or for more memory spaces.If it contains only program memory then the uC can run with fuse-bits set in default state or with eeprom filled with junk. For example if you run uC with BOD disabled and Reset IO flapping in the breeze then according to spec uC can execute random opcodes on voltage rampup. Including setting grounded IOs high.

author: coromonadalix
author_rank: Super Contributor
timestamp: January 25, 2021, 06:16:59 pm
content: here's some picture, when it bust it goes up to 5vdc ??I'm trying to communicate with the makers to know if a pull up is validated in the code ... and the hand made schematic is good and simple as that

author: thm_w
author_rank: Super Contributor
timestamp: January 25, 2021, 10:28:35 pm
content: Is that sensor going to "Water J11" at the top? Not sure where it plugs in.I can't see that working reliably, there is too much variation in the internal pullup resistance. There should be at minimum a pullup resistor and hopefully a filtering capacitor. If not, then that could explain the IC input being damaged from static or overvoltage.If you measure on the board from ADC input to Vcc what resistance do you get?

author: Siwastaja
author_rank: Super Contributor
timestamp: January 26, 2021, 10:31:34 am
content: Your schematic does not work, but it can't blow up the MCU, either.Likely the board design is just bad.

author: madires
author_rank: Super Contributor
timestamp: January 26, 2021, 11:08:53 am
content: Using the ATmega's internal pull-up for a voltage divider with an NTC would be insane since it can be anything between 20 and 50 kOhms.

author: coromonadalix
author_rank: Super Contributor
timestamp: January 26, 2021, 01:08:59 pm
content: the hand made schematic "is" how the ntc is routed, nothing more, I'll have to check if i have spikes in the 5vdc line ..

author: BitsnBytes
author_rank: Contributor
timestamp: February 03, 2021, 06:25:58 pm
content: Do a simple test, take a through hole aluminum electrolytic capacitor and connect it parallel to Vcc and GND.Use a capacitor of say 100uF or above, do not use ceramic capacitors use aluminum electrolytic capacitor.If the issue is due to spike then it should get resolved.Best of luck!!!