/autotrax-tools

A set of tools to aid in using DOS Autotrax software

Primary LanguagePython

autotrax-tools

A set of tools to aid in using DOS Autotrax software.

Objective

Autotrax is an old software for MS-DOS, which can be used to design printed circuit boards (PCBs). It runs perfectly in DOSBox and, despite its mature age (initial release of the program, as Protel PCB, was in 1985, and the software got renamed to Autotrax in 1988), it still can be used to design PCBs. And I'm still using it.

The program is quite easy to learn, very flexible and allows selecting all of its functions and operations from the keyboard (using user-configured shortcuts and macros), its PCB file format is straightforward and very simple (I had no trouble reverse-engineering it for the sake of creating these tools) and traxplot utility (part of the Autotrax package) can be used to export one or more board layers to various formats (including PostScript, which is still used today), but it lacks a few useful functions.

My autotrax-tools package aims to fill these gaps.

Installation

As all scripts are written in Python 3, you can use this one-liner to install them:

git clone https://github.com/CircuitChaos/autotrax-tools && cd autotrax-tools && sudo ./setup.py install

This will install the library (pcbfile4 package), which opens and interprets the PCB FILE 4 format, used by Autotrax, and all tools.

Tools

There are five tools in the package:

  • pcb-drill – generates list of holes to aid in manual drilling
  • pcb-bom – generates bill of materials to aid in soldering
  • pcb-psinvert – inverts part of the PostScript image generated by traxplot to aid in developing boards with negative photopolymer films
  • pcb-mm2mil – converts millimeters to mils
  • pcb-mil2mm – converts mils to millimeters

pcb-drill

This tool can be used to generate a list useful in manual drilling of the PCBs. It loads the PCB file and dumps information about all holes, sorted by drill sizes.

Example:

=== Drill summary ===
1. 0.6 mm /  25 mil:  28 holes
2. 0.7 mm /  28 mil:   6 holes
3. 0.8 mm /  30 mil:   2 holes
4. 1.0 mm /  39 mil:   3 holes

=== Drill details for drill 1 (0.6 mm / 25 mil) with 28 holes ===
1. 28 holes in IC1 (DIP28A, ATmega8)

=== Drill details for drill 2 (0.7 mm / 28 mil) with 6 holes ===
1.  2 holes in R1 (AXIAL0.3, 1k)
2.  2 holes in R2 (AXIAL0.3, 2k)
3.  2 free vias

=== Drill details for drill 3 (0.8 mm / 30 mil) with 2 holes ===
1. Free pad: PAD1
2. Free pad: PAD2

=== Drill details for drill 4 (1.0 mm / 39 mil) with 3 holes ===
1. Free pad: PAD3
2.  2 free vias

pcb-bom

This tool generates a bill of materials used on the board. It also sorts them using four keys, in this order:

  1. Pattern type (more on it below)
  2. Pattern (library element) name
  3. Component comment (value)
  4. Component designator

Pattern types are defined in the script and sorted in order which is best suitable for soldering. It puts SMD components first (from smallest to largest), then wire jumpers, and then THT components, from shorest to tallest. If the component pattern doesn't match any which is listed in the script, it will be put last.

Pattern types are stored as regular expressions and are tailored to my needs and component patterns in my libraries (as over the years I've created a few libraries with various component footprints used by me), so you might need to tweak it to suit your needs.

Example:

=== Bill Of Materials ===
1. C10 (RC0603): 100n
2. C5 (RC0603): 100n
3. C6 (RC0603): 100n
4. C9 (RC0603): 100n
5. R1 (RC0603): 10k
6. C4 (RC0603C): 100n
7. R5 (RC0805): 1k
8. R4 (RC0805): 1k5
9. C7 (RC0805): 1u
10. C8 (RC0805): 1u
11. R10 (RC0805): 3k3
12. R11 (RC0805): 3k3
13. R2 (RC0805): 3k3
14. R3 (RC0805): 3k3
15. R7 (RC0805): 3k3
16. R8 (RC0805): 3k3
17. R9 (RC0805): 3k3
18. R12 (RC0805): 560R
19. R13 (RC0805): 560R
20. R14 (RC0805): 560R
21. R15 (RC0805): 560R
22. R16 (RC0805): 560R
23. R17 (RC0805): 560R
24. R18 (RC0805): 560R
25. R6 (RC0805): 560R
26. T3 (SOT-23X): BC807
27. T1 (SOT-23X): BC817
28. T2 (SOT-23X): BC817
29. IC4 (SMD8A): TL071
30. IC3 (DIP28A): ATmega88
31. IC2 (TO-92A): 78L05
32. IC1 (TO-92A): 78L12
33. LED1 (LED5): GREEN
34. ENC1 (SIP4): EC11
35. CON1 (DCJACK): DC IN
36. C2 (RB.1/.15): 10u/25
37. C3 (RB.1/.15): 10u/25
38. C1 (RB.1/.25): 47u/50`

If you paid attention then you probably noticed a problem with sorting of component designators. Designators should be split into type and index (for example, IC3 is type IC and index 3) and components with given type should be grouped together before sorting using values. Also, it would make numeric sort of indices easier (now they're sorted lexicographically, which makes C10 appear before C5). It doesn't bother me much, but will be done when I'm sufficiently motivated :)

pcb-psinvert

When using an UV method to develop and etch PCBs (which is my favorite, as it gives me best results), sometimes you'll need a positive image and sometimes a negative one, depending on the photoresist used. Photoresist most commonly used by me (a photopolymer film) is negative, meaning that it hardens under the light. Because of that, light has to pass through the parts that should be kept on the board as copper, so these parts have to be white.

Unfortunately, Autotrax doesn't allow to create negative images, so I created this script to do it for me.

It doesn't operate on a PCB file, but on PostScript (SBL, STL, …) generated by the traxplot utility. It inverts whole image or just a part of it (whole halves or just quarters), so the printout can be used with negative photopolymer films. Why only a part? Because sometimes, when making small boards, I use the same tracing paper up to four times.

Note that it's not a generic tool. It's tailored only for PostScript files generated by traxplot and it recognizes and rewrites only PostScript commands generated by it. After all, PostScript is a quite versatile language!

pcb-mm2mil and pcb-mil2mm

These two utilities can be used to quickly convert between the millimeters and mils, as both units are sometimes used when designing a PCB.