Mettler PM EEPROM tool
An open-source tool to read, decode and edit the parameter EEPROM of Mettler AM/PM precision balances, so that these instruments can be serviced without the ServicePac adjustment cassette that is now almost impossible to find.
Why
Mettler AM/PM (and PJ/AJ/CJ) precision balances from the early 1990s keep their measuring-cell parameters, such as span, linearity, temperature compensation, balance type and the user calibration trim, in a 128-byte serial EEPROM (NMC93C46) on the main board. The same numbers are printed on a sticker inside the cover plate. Normally they can only be written with a Mettler ServicePac adjustment cassette, which is hard to find today. I wanted to be able to service the balances I work with, so I reverse-engineered the EEPROM and wrote a tool that does what the cassette did.
Approach
I worked from the firmware of the V10.45 program cassette and from the service manual, and checked every finding against real balances and their stickers. The steps were:
- Dump the EEPROM of each balance with a programmer, twice, and compare the dumps.
- Trace in the firmware how the chip is read and checked: the four block checksums, the byte order and the type data.
- Work out the weighing formula the balance applies to the stored coefficients, and the encoding of the numbers on the sticker.
- Test the result by rebuilding each dump from its sticker. The tool reproduces the cell block byte for byte.
I verified it against five balances: PM200, PM3000, PM4600, PM6000 and a PJ6000. The J series turned out to use the same layout, although it runs different firmware.
Implementation
The tool is plain Python 3 with no third-party packages for the file tools. The GUI uses tkinter from the standard library, and the live tabs need pyserial. It decodes a dump (balance type, ID, checksums, span factor, calibration trim and the cell parameters) and edits it: linearity from a measured half-load error, temperature compensation, span and zero drift, the stored calibration weight and the operating mode. It can also reload the cell parameters from the sticker, which is useful after a board swap. Every write recomputes all four checksums and keeps the byte order of the file it opened.

The GUI can also talk to a balance over its serial line. It needs a cassette ROM that answers the service commands, which is not part of this repository. The live tab reads the EEPROM into the editor and backs up the chip before every write. A separate Procedures tab follows the adjustment steps of the service manual: resistor check, linearity, calibration and temperature. It works on the raw A/D value and the temperature count the balance streams.

The weighing formula, with t the temperature relative to a stored reference and x the raw signal relative to a reference point:
W = raw + Z(t) + S(t)*x/2^24 + L(t)*x^2/2^48
weight = W * (SPAN + UCAL) / 2^23
Result and status
The tool decodes and edits the EEPROM of all five reference balances, and the repository includes their dumps with the numbers from their stickers. On a PM4600 I tested the live read, write and restore, the resistor check, both linearity methods and the calibration. The temperature fit is only tested on synthetic data and logs so far.
Some parts are less proven than others:
- The experimental option to make the display step finer has been run on exactly one balance, a PM4600 taken from a 10 mg to a 1 mg digit. It works there, but no other type has been tried.
- I have not solved the check digit in the printed sticker numbers, so the tool reads stickers but cannot print a complete new one.
- Everything was derived from V10.45. Other V10.xx versions very probably use the same layout, but I have not tested that.
Changing these parameters on a certified or legal-for-trade instrument invalidates its verification, and the repository says so. It contains no Mettler-Toledo firmware, software or documentation, and I am not affiliated with Mettler-Toledo.