Author Topic: GM328 out of order [solved]  (Read 6863 times)

0 Members and 1 Guest are viewing this topic.

Offline PBhTopic starter

  • Contributor
  • Posts: 14
  • Country: fr
GM328 out of order [solved]
« on: July 18, 2021, 08:00:22 pm »
Hello everybody,

As a quick presentation, I bought my Fluke 77 multimeter in the 80's and I am still happy using it every day !
But sometimes it's missing some functions ;-)

I ordered this GM328 https://fr.aliexpress.com/item/32785578867.html exactly four years ago.
I added a power switch to avoid forgetting it powered on.
Recently, it doesnt work anymore. Power on Ok but no menu appearing on the LCD (or on another LCD I've tried on).
Supposing a program memory loss, I bought a GM328A (unfortunately without the removable DIP µP) and an arduino R3 I supposed able to copy from a good CPU to the bad one, or check the 'bad' Atmega328P chip.
I've installed the Arduino IDE but is not familiar with ATMega, git and other software tools. I am nearer the soldering iron than keyboard :

Is a memory corruption in Atmega328P possible ? Because of the power switch ? (memory corruption by powering off when writing ?)
Any other idea for causing this failure ? Is it frequent ?
Where to find a hex file to compare with the supposed corrupted Atmega328P ?
How to make the comparison ? With the R3 board ? Howto link ?

Any advice, link to something to read will be appreciated.

Probably I will, in a second time, ask for source code, if exists, to adapt my GM328 to my needs...
« Last Edit: August 03, 2021, 05:19:52 pm by PBh »
 

Online BrokenYugo

  • Super Contributor
  • ***
  • Posts: 1186
  • Country: us
Re: GM328 out of order
« Reply #1 on: July 18, 2021, 09:32:08 pm »
I would sooner expect the 328P to be damaged, these testers don't have much for input protection.

There testers are heavily documented with improved firmware available, no need to dump another unless you want to, where exactly to get the firmware and how exactly to ICSP flash them into the tester I've not yet gotten around to figuring out on mine, as it works well enough as is. There's a huge thread about the here https://www.eevblog.com/forum/testgear/$20-lcr-esr-transistor-checker-project/

One generally compares hex files in a hex editor.

 

Offline modoran

  • Regular Contributor
  • *
  • Posts: 68
  • Country: ro
Re: GM328 out of order
« Reply #2 on: July 19, 2021, 06:49:02 am »
The microcontroller is most likely locked, so you will not be able to dump the hex content from it.
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2417
  • Country: us
Re: GM328 out of order
« Reply #3 on: July 19, 2021, 07:12:02 am »
I don't know about the exact hex dump for your exact model, but most of the firmware for these testers originated as open source. At the very least, you can replace it with something that will work, assuming the hardware otherwise works and you learn some basic tools.

This is THE thread for this subject. Jump in at the end with specific questions: https://www.eevblog.com/forum/testgear/$20-lcr-esr-transistor-checker-project/msg3547011/#msg3547011

Or read this site for basics: https://www.mikrocontroller.net/articles/AVR_Transistortester
 

Offline PBhTopic starter

  • Contributor
  • Posts: 14
  • Country: fr
Re: GM328 out of order
« Reply #4 on: July 19, 2021, 07:16:47 am »
Yes, I have seen this thread, but the problem is its 281 pages !!!
I will take more time to search in it.

Is there any tutorial to program my ATMega chip ?
« Last Edit: July 19, 2021, 07:19:36 am by PBh »
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2417
  • Country: us
Re: GM328 out of order
« Reply #5 on: July 19, 2021, 07:24:06 am »
The pdf download at my second link contains a great deal of useful information. Start by at least skimming that.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6636
  • Country: ro
Re: GM328 out of order
« Reply #6 on: July 19, 2021, 07:25:38 am »
Never seen a microcontroller that lost it's program, but in theory it could happen.
- First of all, check if the microcontroller is powered.
- I see 2 electrolytic capacitors in the kit pics.  Electrolytic capacitors often dries out after some years.  Change those and see if it starts.
- Check if the clock is runing (Quartz crystals may shutter from mechanical shocks).
- After that, if still doesn't work, reflash (reprogram) the existing microcontroller.  Find the proper firmware that matches with your existing hardware.    The thread to ask this is the link posted before https://www.eevblog.com/forum/testgear/$20-lcr-esr-transistor-checker-project/.  You can use your Arduino R3 as a programmer to program the GM328 on its board.  You don't need to desolder the GM328's chip to do that.
- If that still doesn't work, then desolder the ATmega328 and resolder a new one.  If you don't have a spare chip, use an Arduino nano as a donor, they are dirt cheap and easily available.
« Last Edit: July 19, 2021, 07:28:07 am by RoGeorge »
 

Offline PBhTopic starter

  • Contributor
  • Posts: 14
  • Country: fr
Re: GM328 out of order
« Reply #7 on: July 19, 2021, 07:56:28 am »
[ a lot of answers not seen before writing this:]
I like to understand why electronics fails, it helps me create robust schematics.
I dont't think it is an input stress problem. I take care of my tester and only measure in a safe manner.

Hex comparison: my question was "how to extract it from failed ATmega ? ", supposing firmware is not protected of course.
Once reprogrammed, impossible to know the cause if it was a firmware loss !

[Ok, I take some time to read links you sent me ! Thanks]
« Last Edit: July 19, 2021, 07:58:28 am by PBh »
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6636
  • Country: ro
Re: GM328 out of order
« Reply #8 on: July 19, 2021, 08:19:26 am »
There's no need to read a thread with thousands of replies.  Just put some pictures with your kit model and ask what firmware is compatible with the board you have.  Then program that firmware into the chip.  There's no need to read the old one.

Verify what usually fails first, like I advised you in the previous post.

You wont get any understanding from a single failure.  If it were to analyze 100 failures of the same board, maybe, but from a single board and a single failure you can not learn much.  Failure is a statistical process.  You need lots and lots of examples to draw any correct conclusions.

Chips can be damaged from electrostatic discharges, or from cosmic rays, not kidding.  Very rare, but could happen.  Then, it might not be a microcontroller failure, after all.  Have you checked the other causes, yet?
« Last Edit: July 19, 2021, 08:21:40 am by RoGeorge »
 

Offline PBhTopic starter

  • Contributor
  • Posts: 14
  • Country: fr
Re: GM328 out of order
« Reply #9 on: July 19, 2021, 03:09:15 pm »
- First of all, check if the microcontroller is powered.
- I see 2 electrolytic capacitors in the kit pics.  Electrolytic capacitors often dries out after some years.  Change those and see if it starts.
after pushing on the button:
Red led lighted and
µC power is good and clean
- Check if the clock is runing (Quartz crystals may shutter from mechanical shocks).
For the moment I have no appropriate tool to check that. My Fluke77 says <1V AC is present. My DSO138 is too slow.
I see nothing alive on serial link lines to the LCD.

- After that, if still doesn't work, reflash (reprogram) the existing microcontroller.  Find the proper firmware that matches with your existing hardware.    The thread to ask this is the link posted before https://www.eevblog.com/forum/testgear/$20-lcr-esr-transistor-checker-project/.  You can use your Arduino R3 as a programmer to program the GM328 on its board.  You don't need to desolder the GM328's chip to do that.
I have to learn how to do that- do you mean that I can use R3 board as an ISP programmer connected to GM328 board ?
If that still doesn't work, then desolder the ATmega328 and resolder a new one.  If you don't have a spare chip, use an Arduino nano as a donor, they are dirt cheap and easily available.
Hopefully, no need to desolder, it is a DIP28 on a socket ;D
« Last Edit: July 19, 2021, 03:22:11 pm by PBh »
 

Offline blurpy

  • Regular Contributor
  • *
  • Posts: 236
  • Country: no
Re: GM328 out of order
« Reply #10 on: July 19, 2021, 03:54:21 pm »
It looks like a standard AY-AT, which I have documented quite a bit about here, including the original firmware for download:
https://github.com/blurpy/transistor-tester
 
The following users thanked this post: elecdonia

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6636
  • Country: ro
Re: GM328 out of order
« Reply #11 on: July 19, 2021, 05:19:41 pm »
I have to learn how to do that- do you mean that I can use R3 board as an ISP programmer connected to GM328 board ?

How do you know the power is good if you don't have an oscilloscope?  If those 10uF electrolytic are too old, they can make the voltage stabilizer to oscillate.  Just replace them to be sure.

Yes, you can use an Arduino UNO (R3) as a programmer, to program other AVR chips like (the presumably defective) ATmega328 used in GM328.  If you do that, while programming other chips you must put a 10uF between the Arduino UNO R3 Reset and GND pins.  This is sometimes not mentioned in the documentation or tutorials, but without it it won't work (unless you have a very old original Arduino UNO).

In fact, without even trying to program the GM328, you should be able to read the chip ID using "avrdude" from the command line.  Avrdude is installed when you installed the Arduino IDE for your Arduino UNO R3.

This is a random video showing the wiring to program an external chip.  Do that, and don't forget the 10uF between Arduino UNO Reset and GND I wrote you before.  The 10uF is not shown in the video.


https://www.arduino.cc/en/Tutorial/BuiltInExamples/ArduinoISP/
https://forum.arduino.cc/t/arduinoisp-on-uno-requires-10uf-cap-why/102111
« Last Edit: July 19, 2021, 05:21:26 pm by RoGeorge »
 

Offline PBhTopic starter

  • Contributor
  • Posts: 14
  • Country: fr
Re: GM328 out of order
« Reply #12 on: July 19, 2021, 06:53:30 pm »
How do you know the power is good if you don't have an oscilloscope?  If those 10uF electrolytic are too old, they can make the voltage stabilizer to oscillate.  Just replace them to be sure.
DSO138 is an oscilloscope - with a limited bandwith.
I don't read any minimum value of capacitors nor stability problem in the LDO regulator HT7550 datasheet.
But I agree, electrolytic capacitors are often a source of problems ;-)
« Last Edit: July 19, 2021, 06:58:52 pm by PBh »
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6636
  • Country: ro
Re: GM328 out of order
« Reply #13 on: July 19, 2021, 10:31:19 pm »
So, you don't want to check/replace those capacitors.   ;D

OK, let's hope they are good.  I won't try to convince you any more how a high ESR in filtering capacitor can make the microcontroller clock to not start, or how on the power line oscillations of many hundreds of kHz or even MHz can arise and make the microcontroller to not work.

You just want to know how to download the firmware.  Let's say you downloaded it, and you compare with the other working GM328.  Then, they are different.  Does this means that the other GM328 has a different firmware, or does it means the old GM328 firmware was damaged?  Let's say the former.  You see byte 74 is differnt on the 4th bit.  Now what?  What understanding does this bring?

If you are not willing to follow directions, and don't need general advice, then just ask a very specific question, for example "how to download firmware from an ATmega328 using an Arduino nano?".  Most probably it won't be possible, because AVR chips, like ATmega328, can be protected against reading the firmware, so one can protect its programs against unauthorized copying.




Go to the github page blurpy gave you, https://github.com/blurpy/transistor-tester , click on the "CODE" button, then click "Download ZIP".  Save it locally and unzip.  Now you have the whole project locally, including the already compiled hex.  If you read the readme files you'll find this, as already told:
Quote
Original GM328 firmware
The GM328 AY-AT comes with the fuses of the ATmega328P configured in read protected mode,
meaning we can not backup the firmware. Trying to read the chip will only result in files filled with
the value FF. One user was lucky and got an unprotected chip, and uploaded the firmware (v1.12k)
here. The files are also available in this folder
Meaning it shouldn't be possible to download the firmware.

However, it is possible to overwrite another firmware, as advised.

Beware that there are 3 things that can be written in an ATmega328
- the fuses (or fuse bits)
- the program (the executable firmware)
- the EEPROM (the data flash)
You can find them all already compiled in the "transistor-tester-master/firmware/original" folder.  The exact location of the avrdude programmer software depends of your OS and your local install path for Arduino IDE.  To find it, search on your local disk "avrdude".  Usually is in "hardware/tools/avr/bin/".  If you are using windows it might be "avrdude.exe" instead of just "avrdude", IDK.

Since the MCU is on a socket, remove it, place it on a separate breadboard, and see if this PDF has enough detail to read the chip.  https://app.box.com/s/ol1z8jjnrpy6wly4w61imt7wcbxk3fcg

Good luck with it.

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2329
  • Country: 00
Re: GM328 out of order
« Reply #14 on: July 19, 2021, 11:20:17 pm »
This device is so cheap that is easier to buy a new one, and put the old one on trash, is not worth the time to save 4 dollars
 

Online BrokenYugo

  • Super Contributor
  • ***
  • Posts: 1186
  • Country: us
Re: GM328 out of order
« Reply #15 on: July 20, 2021, 01:32:18 am »
This device is so cheap that is easier to buy a new one, and put the old one on trash, is not worth the time to save 4 dollars

While technically correct, nobody ever learned anything from being a model consumer like that.
 
The following users thanked this post: AVGresponding, Dumidan

Offline PBhTopic starter

  • Contributor
  • Posts: 14
  • Country: fr
Re: GM328 out of order
« Reply #16 on: July 21, 2021, 07:26:48 pm »
 :-+
May be ebclr have not read
I like to understand why electronics fails, it helps me create robust schematics.
  8)

So, you don't want to check/replace those capacitors.   ;D
No, I can't for the moment. And I could explain you the cause of electrolytics cap failure - it is clearly not a risky situation on this board used a few hours only at low power and low temperature and powered with a battery through a few cm line !


Beware that there are 3 things that can be written in an ATmega328
- the fuses (or fuse bits)
- the program (the executable firmware)
- the EEPROM (the data flash)
This is useful information. If program memory content is the same, flash could be a more probable (since it is written into) cause to check.
Is there any CRC in flash content ?

"readback protect fuse": I have enough worked with chinese people to know that this is not a thing they take care of !

"""ISP""" programmer. I had red information like that before. But "ISP" means "In situ", so on GM328 Tester board itself. Correct title should be "how to contruct a programmer with a R3 and a breadbord".

Does anybody have tried to add an ISP connector to GM328 board ? In other words, will the 680r resistor cause the MISO line (pin 18 of ATMega)  to fail in its programming function ?

Thanks guys for your time,
« Last Edit: July 21, 2021, 07:29:21 pm by PBh »
 

Offline PBhTopic starter

  • Contributor
  • Posts: 14
  • Country: fr
Re: GM328 out of order
« Reply #17 on: July 21, 2021, 07:37:36 pm »
:-+
May be ebclr have not read
I like to understand why electronics fails, it helps me create robust schematics.
  8)

So, you don't want to check/replace those capacitors.   ;D
No, I can't for the moment. And I could explain you the cause of electrolytics cap failure - it is clearly not a risky situation on this board used a few hours only at low power and low temperature and powered with a battery through a few cm line !


Beware that there are 3 things that can be written in an ATmega328
- the fuses (or fuse bits)
- the program (the executable firmware)
- the EEPROM (the data flash)
This is useful information. If program memory content is the same, flash could be a more probable (since it is written into) cause to check.
Is there any CRC in flash content ?

"readback protect fuse": I have enough worked with chinese people to know that this is not a thing they take care of !

"""ISP""" programmer. I had red information like that before. But "ISP" means "In situ", so on GM328 Tester board itself. Correct title should be "how to contruct a programmer with a R3 and a breadbord".

Does anybody have already tried to add an TRUE ISP connector to a GM328 board ? In other words, will the 680r resistor cause the MISO line (pin 18 of ATMega)  to fail in its programming function ?

Thanks guys for your time,
 

Offline blurpy

  • Regular Contributor
  • *
  • Posts: 236
  • Country: no
Re: GM328 out of order
« Reply #18 on: July 22, 2021, 07:11:05 am »
Does anybody have already tried to add an TRUE ISP connector to a GM328 board ? In other words, will the 680r resistor cause the MISO line (pin 18 of ATMega)  to fail in its programming function ?

Thanks guys for your time,

What is a TRUE ISP connector? Is it different from what I have used in the link I gave you previously?
 

Offline PBhTopic starter

  • Contributor
  • Posts: 14
  • Country: fr
Re: GM328 out of order
« Reply #19 on: July 22, 2021, 10:04:13 pm »
Please read the definition of ISP here:
https://en.wikipedia.org/wiki/In-system_programming
If you have to remove the processor from its board to program it, it is not an ISP.

Said differently, you can update processor firmware while it is on target (application) board, so you can make hundreds of tries/compilations very quickly without taking any risk with the processor or the socket.
I'm a newbee in arduino software, I'll need so many tries !


« Last Edit: July 22, 2021, 10:09:26 pm by PBh »
 

Offline blurpy

  • Regular Contributor
  • *
  • Posts: 236
  • Country: no
Re: GM328 out of order
« Reply #20 on: July 23, 2021, 07:25:12 am »
Please read the definition of ISP here:
https://en.wikipedia.org/wiki/In-system_programming
If you have to remove the processor from its board to program it, it is not an ISP.

Said differently, you can update processor firmware while it is on target (application) board, so you can make hundreds of tries/compilations very quickly without taking any risk with the processor or the socket.
I'm a newbee in arduino software, I'll need so many tries !

Ok, then you should have everything you need  :)
 

Offline PBhTopic starter

  • Contributor
  • Posts: 14
  • Country: fr
Re: GM328 out of order
« Reply #21 on: August 02, 2021, 01:01:26 pm »
Ok, going back to original problem.
I bought another kit to have spare parts.
I tried to (add) new capacitors, change quartz, change LCD, change ATMega: same problem.
Cleaned PCB from glue/foam backwards the PCB (to maintain battery in the box and avoid shorts between GM328 pins), same problem.

BUT ! What a strange behavior ! :
After 90seconds after power-up, I can see on the display:
Bat. 8.4V OK
VCC=5.01V
2 seconds later:
Cell!
11mV 12mV 12mV
Another 2 seconds later
short probes! (flashing). Etc
It is the calibration procedure, but VERY slowed, and nothing changes after end of procedure.
Same problem appears after power off/On.


Same thing with ATmega chip No2.

Is anybody here understanding that behavior ???

I continue my investigations, and cleaning of quartz section...
« Last Edit: August 02, 2021, 07:31:35 pm by PBh »
 

Offline PBhTopic starter

  • Contributor
  • Posts: 14
  • Country: fr
Re: GM328 out of order
« Reply #22 on: August 03, 2021, 03:33:46 am »
Does anybody have already tried to add an TRUE ISP connector to a GM328 board ? In other words, will the 680r resistor cause the MISO line (pin 18 of ATMega)  to fail in its programming function ?

Thanks guys for your time,

What is a TRUE ISP connector? Is it different from what I have used in the link I gave you previously?
True ISP described here: https://dragaosemchama.com/en/2019/04/gm328a-reverse-engineering-new-firmware-and-tetris/
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2417
  • Country: us
Re: GM328 out of order
« Reply #23 on: August 03, 2021, 06:25:15 am »
 :( :-DD
Does anybody have already tried to add an TRUE ISP connector to a GM328 board ? In other words, will the 680r resistor cause the MISO line (pin 18 of ATMega)  to fail in its programming function ?

Thanks guys for your time,

What is a TRUE ISP connector? Is it different from what I have used in the link I gave you previously?
True ISP described here: https://dragaosemchama.com/en/2019/04/gm328a-reverse-engineering-new-firmware-and-tetris/
No idea where you got the word "true" from, since that word doesn't exist on that site, says search. Googling "true isp" doesn't get me anything relevant either. The only thing I can think of is that you looked at a translated version of the site and garbled it going back to English to get a technical term that isn't used.

Anyway, what I see in the picture is probably your typical 2x3 6-pin avr isp pinout. The other common one is a 2x5 10-pin avr isp pinout. USBASP programmers usually have one or the other, sometimes both. Adapters between the two are trivial.

And to actually answer the question, the ISP pins are connected directly to the CPU pins, so the 680 ohm resistor is not in series with the programming circuit to the MISO pin. And going the other way, so long as the test socket is empty, there's nothing to interfere with its operation.
« Last Edit: August 03, 2021, 06:32:59 am by Nusa »
 

Offline PBhTopic starter

  • Contributor
  • Posts: 14
  • Country: fr
Re: GM328 out of order
« Reply #24 on: August 03, 2021, 05:19:14 pm »
When I am talking of true ISP, it means you can program the chip without removing it from the target board. 9th
It is not the case with the "Arduino as ISP"  video you can see here: https://youtu.be/muP1dp73Mdg and in RoGeorge post on July 19th above.

I found the original problem of my GM328: it was some diodes in the ESD protection array which was shorted.
Since it is a very small and not easily accessible component, I tested it late...

There should be a form of autotest procedure inside the ATMega, which causes the initialisation to be VERY long, and made me think about quartz problem...
« Last Edit: August 03, 2021, 06:24:50 pm by PBh »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf