Friday, July 24, 2009

Nets and Planes and Layers and Stuff

Short continuation of technical stuff from the other day. I mentioned somewhere before that this board has six layers. On any board, each of the inner layers usually has one or more planes assigned to it (sometimes the outer ones too). A plane usually just spans the entire layer; if a layer has more than one, then the planes just cut it up into two, three, or more pieces. So you might be wondering why the hell are we cutting up layers into these plane thingies--isn't making traces enough?

Well, that's where nets come in. Errr, this is hard to explain. A net is a connection, in its basest form. Imagine two components in series, say an RC circuit. Then there is at least one net in this circuit--the wire between the R and the C comprise one unique net, and the wires on the other sides of the R and C should also be separate nets of their own. Physically, I am guessing an entire net would remain at the same potential, since there would be potential drops across either the R or C (although I never really asked).

Hence the usage of planes in layers. A plane is basically a giant net throughout the layer. So, one of the inner layers of the board is a power layer, and the net assigned to it might be -5VA or +5VD. In other words, any through hole connected to the layer will have a constant supply of power at that potential, and thus all the components connected to that can interact with each other.

Anyway, enough technical talk. I'm not sure if I can explain it any better anyway. It's not something you can usually tell just by looking at a board either, so it's probably not one of the more obvious things. On the other hand, I am proud to present, after another week's worth, the routed (more or less) TDC board. Too bad I'm still not done with it.


If you are curious, all the red parts and green traces are on the top layer, and all the blue parts and traces are on the bottom. So it doesn't matter that red overlaps blue and blue overlaps green. What DOES matter are the positions of the through holes. It was often frustrating to find that a via on one side would hit a component on the other side. Then I'd have to move the via or the trace, which sometimes led to moving other traces, etc. It was bad enough that everything was so condensed.....

Thursday, July 23, 2009

Of Reference Designators and Datasheets

Short post about random stuff. This site has been a reference for me many a time during work: http://en.wikipedia.org/wiki/Reference_designator

I'm sure most engineers know at least the common ones by heart. Anyway, these reference designators are how parts are named--usually the letter(s) followed by a number. So they'd be like C412, R78, or Q90. The C's and R's are pretty self-explanatory, but it did take me some time to get used to recognizing transistors as Q's or circuits as U's.

Another thing is pins. Each part has a certain number of pins (which matches the number of pads on the board). One can just think of them as connections. So resistors and capacitors each have two; a signal comes in one end and out the other. A transistor has three, different types of gates have three or more. Why is this important?

Datasheets. When I come across parts that PADS doesn't have built in, I have to make them myself to place on the board. As you would expect, a schematic symbol does not look like the actual part itself; a capacitor is not just two lines in reality, and a resistor is not just a series of spikes. All parts are of a certain type, and they have standardized names, like NC7SZ00.

These names meant nothing to me either when I started out, but apparently every one has its own datasheet, which is easily Google-able. For example: http://www.datasheetcatalog.org/datasheet/nationalsemiconductor/DS012156.PDF

On the first page are two diagrams; the one on the left is for schematic purposes, and the one on the right is how it looks like in real life, as well as the shape I make to place in PADS. This particular part has five pins--two inputs, one output, one power, and one ground (I don't know what it means either -__-).

Sadly for me, I didn't know about this stuff until a couple weeks ago, so I had been struggling along before and wondering why the hell did stuff not fit together. Turns out I numbered the pins wrong when making the footprint and stuff like that. Well, luckily I can change parts relatively easily.

On the bright side, I got my real paycheck today, and I found out like more than halfway into my job that I make $12.00 an hour. Berkeley's minimum wage is somewhere between $8 and $9. WIN!

Sunday, July 19, 2009

A How-To

After this post, I will probably take a break from the technical stuff for a while. Before that, I want to take some time to describe exactly what I do. Sure, I'm replicating circuit boards, yes, but just how do I go about doing that? Well, first I start out with the schematics for a board. For example, the following is one of the schematics for the board I am working on now:


I received these files to begin with; they were already in existence along with the original board. My first duty would be to clean these up--for example, making sure connections are complete, assigning the right properties to each part, etc. The biggest concern here is actually what is called the PCB (printed circuit board, as these are all called) footprint. Example: A capacitor is represented as two parallel lines on a circuit diagram; its footprint on the actual board would be two nontouching conducting squares.


Anyway, that's the back of the TDC board (the current one). All those little silvery shapes are footprints for the different elements in the schematic; their different sizes and shapes allow for the placement of the actual variable parts that will go on them later on. In OrCAD, I basically assign the right footprint to each part in the schematic and make sure they match up (I wouldn't want an inductor to take the place of a transistor, for instance).

Once I finish that and debug the schematics until they are error-free, I can then make a netlist using the program--it's nothing more than a simple text file that PADS will be able to read. This netlist contains all the information necessary about the different parts and connections that are going on in the PCB. In PADS, I start by making the board outline (just draw a shape, simple enough), and then I import the netlist file. This is the result:


So the board outline is there, and the parts are all neatly dispersed next to it. Also, I've defined the different layers (this board has six), with each having its own properties and whatnot. Guess what happens next? Yup, I would have to (manually) move every single part to its appropriate spot on the board. Best fun ever, considering how many parts there are to move. To assist me, I consult the actual physical board seen above, as well as the CAM files that I have. With respect to actual positions, it's a lot of guess-timating, as I can't really put anything at exact locations. Either way, my eyes get tired pretty often, with so many little things crunched together in such small areas.

From Monday to Thursday, I slaved away trying to get everything in their approximate positions. The red parts are on top, while the blue ones are on bottom (that's just my personal preference of color). It is not perfect, of course, but at the end of the day I was extremely satisfied that this second stage was (more or less) completed. On Friday I started on the next step--routing.


In some ways this is even more frustrating than placing parts. I have to make the connections from one part to another; even though there are guides to assist me, the fact that they are so small and that there are so many of them doesn't make it any easier. And this is where the physical board is limited--I can't see the inner layers of course, so I have to rely on the CAM files to get information on all the different through holes (there are so MANY of them too).

The other major problem is that the imported netlist is not perfect. There are instances where the schematic really doesn't match the board at all, so PADS never read the differences in. To overcome that, I have to invoke the ECO (Engineering Change Order) mode, which basically allows me to create and override anything I want. This is of course not normally permitted to prevent the user from making any unintentional mistakes; ECO is only used when one is consciously aware of its necessity. It is probably something that all aspiring engineers will have to learn to deal with in their careers. http://en.wikipedia.org/wiki/Engineering_Change_Order


This is after Friday's work. I basically routed a fourth of the bottom of the board so far. The reason this first go took so long was because I had to manually make sure everything was correct, invoking ECO quite often. Luckily, the right side is virtually identical to the left, and shouldn't take nearly as long. As for the top... more on that later, I guess.