Original page created on 19/03/2020; updated on 22/11/2021.
So far, I have made quite a lot of circuit boards, mainly for coach lighting, but also for locomotives, not to mention my professional activities. For this, I used Orcad software a long time ago, at the MS-DOS time! But, finally, I preferred AutoCAD, which I could program at will, both for the diagrams and for the circuits themselves. It was okay as long as I was making the circuits myself.
My opinion has changed somewhat, for several reasons:
To use professional services, professional documents must be provided. This involves using software that produces standard files for the PCB manufacture, namely Gerber for the boards themselves, and Excellon for the drilling.
That’s why I decided to get into KiCad, free software for designing PCBs. Free, yes, but powerful enough to produce professional-quality files.
The classic design process is as follows:
I will describe in the following my first steps, my difficulties and also some criticisms that I have to make in the use of this software. I admit that I begun without consulting the documentation too much (that’s wrong!), and that I may have missed tips that would have made my life easier.
To begin, I chose to redo coach lighting circuits already drawn with AutoCAD. Indeed, I use the latter for the layout study: coach diagram, distribution of compartments. Generally, I place one LED per compartment, plus one at each end for toilets and platforms.
The first question was how to use this diagram in KiCad for the precise layout of the devices.
Generally, the layout of the devices of a circuit is done on a grid with an Anglo-Saxon pitch of 1/10 inch, or 2.54 mm, or submultiples. But in the application that interests me, this is not the case: I want to respect the precise position of the lighting points, especially since some coaches are provided with a “false ceiling” drilled in the exact location of compartments.
Note: this work is not essential, one can very well make a freehand sketch and write all the necessary dimensions on it.
This is the B10 OCEM FL Models World. The photo should be taken as carefully as possible: well perpendicular line of sight, point of view as distant as possible, telephoto, to minimize the effects of perspective.
Note: do not rely absolutely on the photo, because differences in dimensions may appear between the two ends. Hence, the need to take dimensions directly on the model.
The indicated dimension (195.7) allows me to determine, by a simple cross-multiplication based on pixels, the image width in millimetres (286.0), in order to import it at its exact size in AutoCAD.
After importing the photo, I begin by drawing the important lines: compartments, toilets, openings, etc. In the following, I only show an extract for readability.
Then I place the lighting points and their axes, including for the toilets, for which an opening will have to be made. I also mark the possible location(s) for the anti-flashing capacitor. This diagram allows me to estimate that, if necessary, an 8 mm diameter device will possibly be used, which corresponds to a capacity of 220 µF / 25 V. I am generally satisfied with 100 µF, especially if all the wheels pick up the current, as is the case here.
Finally, I draw the outline of the future strip (in light blue). The coach image has been made invisible to improve readability. Note the notches intended to receive the metal pickup strips from the bogies.
I move the drawing to put the origin at the indicated point, on the horizontal axis and at the edge of the board.
I use the dimensioning tool to locate the devices’ horizontal (and sometimes vertical) position, starting from the origin, in Ordinate mode. Contrary to what one might suppose, this mode doesn’t only measure ordinates, but also abscissas, depending on the position of the cursor in relation to the target point. You can see that, for the capacitor which is not on the axis, I measured both the abscissa and the ordinate of the centre.
Note that anything that is only for construction purposes will not be saved for import into Pcbnew. The best thing to do is to save the complete drawing as a DWG (it might still be useful), delete the unnecessary constructions and finally save as DXF. Finally, here is the set that will be saved in DXF.
Last thing before saving the drawing in DXF: do a purge to remove the temporary blocks created by the dimensioning, invisible here, but which would become visible in Pcbnew.
Note: The KiCad documentation states that KiCad only accepts simple lines (i.e. no polylines) and circular arcs. However, there is no need to explode polylines: they are accepted and directly transformed into lines. Texts are accepted.