Reverse Engineering Altium Files

altium

Several times in the last few weeks, I’ve heard people say, ‘this will be the last PCB I design in Eagle.’ That’s bad news for CadSoft, but if there’s one thing Eagle has done right, its their switch to an XML file format. Now anyone can write their own design tools for Eagle without mucking about with binary files.

Not all EDA softwares are created equally, and a lot of vendors use binary file formats as a way to keep their market share. Altium is one of the worst offenders, but by diving into the binary files it’s possible to reverse engineer these proprietary file formats into something nearly human-readable.

[dstanko.au]‘s first step towards using an Altium file with his own tools was opening it up with a hex editor. Yeah, this is as raw as it can possibly get, but simply by scrolling through the file, he was able to find some interesting bits hanging around the file. It turns out, Altium uses something called a Compound Document File, similar to what Office uses for Word and PowerPoint files, to store all the information. Looking through the lens of this file format, [dstanko.au] found all the content was held in a stream called ‘FileHeader’, everything was an array of strings (yeah, everything is in text), and lines of text are separated by ‘|’ in name=value pairs.

With a little bit of code, [dstanko] managed to dump all these text records into a pseudo plain text format, then convert everything into JSON. You can check out all the code here.

The cool kids all file their resistors for accuracy

Here’s a tip to keep in your back pocket, you can use a metal file to adjust your resistors. [Gareth] shows off this technique in the video after the break. A metal file is literally all that you need to do some fine tuning. Just make sure you’re starting off with a carbon film resistor as this will not work with the metal film variety.

His example shows a 10k resistor which is reading just 9.92k on his multimeter. But he needs precisely 10k. After getting through the protective layer he makes just a couple of passes with a small file, each time adding about 20 Ohms of resistance. Now he does mention that excessive deep cuts can hurt the power rating of the resistor. But this certainly isn’t damaging it if done correctly. It turns out this is how they are tuned at the factory.

One possible use he mentions is trimming the balance on a hacked servo motor.

[Read more...]

Follow

Get every new post delivered to your Inbox.

Join 96,369 other followers