Thursday, July 30, 2009

My poor eyes

Because I stare at a computer the whole day. Either that, or extremely tiny things on a board. Although my body isn't physically exhausted, I'm usually pretty mentally fatigued by the time I get home in the evening. The other major contributor is the commute, but I will describe more about that later on. Speaking of my computer, I never actually showed you guys how my place looks like. Here's a partial view of the room:

Err, yeah, it's pretty damn messy, especially by my standards. It was like that when I first started, and it's still like that now. I'm pretty sure that all the other rooms in the place are like this as well, and no one really bothers to do anything about it. It's probably because it's not a private office, more like a common usage room. (I have a coworker on the other side of the room.) And here's how my workstation looks like:

The computer is nice, no complaints--Windows XP, fast connection (and who cares about any other specs, I'm only using this for work and not as a storage space for porn or whatever), and super-nice monitor. I don't mind so much the mess around me either, since it doesn't get in the way. The chair sucks though; it's old-ish, and the squeaking is Horrible. I hate it whenever I lean back, and I feel sorry for anyone else in the room as well. All the other chairs in the room are too short, too tall, lack arms, etc. I use the drawers as well, and they sometimes suck too and refuse to open or close.

Anyway, back to my eyes. On account of these things being so small, most engineers have a visor like this one. It's pretty neat--just pop it on, adjust to head size, and pull over eyes. Then everything becomes magnified without worry. No need to clumsily hold a stupid magnifying glass or to look for a microscope (my coworker, incidentally, does have one at his workstation). And finally, we have this:

A digital caliper to help me measure things down to about a tenth of a mil (a mil is a thousandth of an inch). You really didn't expect me to eye things or use a fucking ruler, right? But yes, this is pretty indispensable for getting things into the right place.

As for today, it was just a LOT of measuring and calculating. If you look back at the circular anode board on the bottom, you'll notice the copper skeleton. To find out the relative positions of the lines, I basically used the known radii of the circles and angles of the lines to find their coordinates. Way too much sine and cosine crunching. -_- Hopefully I can actually start placing parts and routing soon, and I'll probably finish up early next week if not tomorrow.

Wednesday, July 29, 2009

Final Destination

Well, not really--this isn't my last post (the first one was like all of a couple weeks ago), but there Is some progress involved. Actually, I'm on my last board at this point. YAY! Let's do a quick review of my summer thus far. I first started with the very simple (by now, this is literally a piece of cake, even though I was hyperventilating during that first week) preamp board:


There are a few changes since the last time, but everything is essentially the same. It is simply four (with another small one) circuits, mostly identical, running from four connectors in the center and out to the edges. Of the three boards, this one goes in the middle--it sits above the anode and below the TDC board, which is the following:


I finished this yesterday, a proud product of about three weeks' hard work. Main additions from last time are the reference designators, or the names of each of the parts. It wasn't too bad, just tedious rotating and resizing and moving each to fit next to its respective part. Compared to the preamp, this is probably a true test of what I learned. The preamp is just a tutorial if you look at this one. I think being able to do this board actually shows that I can do something, that I can use PADS and get some engineering done. Conceptually, this board was not that much harder than the first (probably even easier in that respect), but it was just a lot more tedious and complex in terms of structure. So I guess the TDC is just a natural extension of the preamp. Oh yeah, if you are curious as to how the actual parts look like on the board...


Looks a lot cooler, doesn't it? And the wires coming out of the back too--this all seems to make a lot more sense when you see it physically.

And finally, we come to the anode board. Here are some pics to get an idea of how it looks like:


It sure doesn't look anything like the other two boards. As you can see, it is Much simpler than the previous two in terms of parts and routing. In fact, there are only two layers on this board, and all the parts that you see on the top make up pretty much everything. The schematic for this is only one page, and it's just the same thing over and over, to be honest:


Why am I so apprehensive? Well, simple as it may be, the conceptual part is Much more difficult to appreciate. All the copper-plated portions of the board have to be shaped on PADS. The top side is a little easier, although the cutouts into the circle will probably be a bit strange. On the other hand, the back contains a skeleton of circles, as well as anodes (the many circular sectors) in between the radial copper lines, but not connected to the skeleton. This board is indeed unusual in many respects, and PADS was not, as far as I know, built to handle such things. My coworker (who has worked with PADS for a year) told me that this is beyond his domain. It's like going from Pre-Calculus to Calculus and then all of a sudden being rudely thrown into Linear Algebra.

At the very least, I do have some idea of how I'm going to approach it. It will be a lot more geometry and creativity on my part, such that I can brute-force PADS to do what I want it to do. More on that coming up, as I work through it. At the very least, my expectation is that it should take no longer than a week to do, 3 times faster than the TDC board. Here is what I did today. Same business--board outline, clean up schematic, create netlist, import parts.

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.

Monday, July 13, 2009

Preamp.

Since I had finished my first board a couple weeks ago, this is still pretty much all summary, although hopefully I'll be done after this. At least this enables me to skip over the rather painful details of the whole process, since I was still learning a lot at the same time.

So the physical board itself looks a bit like this:


It is, in fact, a rather simple and tame board, in retrospect. Notice the large gaping hole in the center on the bottom, along with the seven other, much smaller holes. They are just board cutouts, for placement with other boards after it was completed. The light green, the main stuff of the board, is copper, the conducting material on which charge can flow freely; the dark green is insulating material. Finally, the silvery stuff would be solder, where the copper was eroded away.

Notice the many little squares on the board? Those are pads, the parts on which the actual components would stand. Each pair would hold either a capacitor or resistor, depending on how I assigned it, and there were also transistor triplets lurking here and there. The shields around each of the 12 sections are rather unusual, however, as they are not often found on boards.

The theory behind this board is rather simple: Signals come in through the four center holes from the bottom, snake their way through the (essentially) identical circuits, each having three parts, and come out on the other end. In other words:


I really don't know what the circuits do to the input signals (although "preamp" most likely has something to do with it); I just know this is how it works. You may also be wondering how on earth do the electrons travel in such precise paths? Well, if you can make it out, there are routes within each of the shielded sections that guide them through. As for crossing each section and out into the output holes, the traces actually go a layer deeper.


This is how the board's second layer looks like. In fact, there are no fewer than four layers to the board, with every layer but the third classified as a ground layer (the third is the power layer). If you remember from physics, ground allows for the dissipation of an electric signal, whereas power would do the opposite. Hence, for this particular board, the darker green insulating material was key to producing the circuit tracing on the top: It surrounds the lighter green copper, forcing the electrons to travel along a particular path rather than dissipating through the rest of the board.

The key element allowing for the interaction among the layers is the through hole, or via. If you look carefully, you can make out (and certainly in the above CAM file) small holes scattered everywhere. They are friendly to the excited electrons, and allow them to progress from the top layer to another. Where they are supposed to flow, conducting material is soldered around the via; otherwise, they are blocked by the dark green material. A closer inspection of the back will show what I mean.


Some of the vias are surrounded fully by the insulation, others only partially. And still others have the full silvery material around them for full conduction. And finally, one of the circuits is shown below in schematic form (the other three are nearly identical), if you should want an idea of how the input signal gets to the output. Notice the many grounds throughout the circuit, as well as the one power source at the top. Some of the vias allows for a physical connection to the power layer; others link the grounded pads outside the shields for dissipation. Since layers 1, 2, and 4 are all ground layers, it doesn't make a difference where they are linked to.

Anyway, that's enough talking about how the first board works. Details of how I accomplished my goal of reproducing it in PADS will accompany those of the board I am working on now--since it is the same process, there is no point in explaining it more than once. All together, it took over a month (although that was mostly due to the learning process and my own laziness, more on that later). But it is more or less finished by now, a proud product of a month's hard work.


It is, I must admit, quite beautiful, and as close to the original as I could make it. As for the changes, they were just additions here or deletions there, but they did not impact the board very much. The one thing that did change significantly were the input and output connections at the center and bottom sides. They are no longer one huge hole (or pin, in technical terms), but five, with the major connection in the center. That was a source of constant agony for me, and they have to do with the other two boards that this particular one is connected to. But they are done with and finalized, and they will (hopefully) torture me no more.

Sunday, July 12, 2009

Round One... FIGHT!

Well, not really. The first day (June 1) was nothing too intense. Mostly just getting acquainted to the place and surroundings and where my room would be, as well as meeting the people I would have to work with most. More details to come interspliced randomly later on.

Anyway, the week was relatively uneventful; I was essentially getting paid to do nothing but go through the tutorials of this new program. For anyone who is curious, PADS is a product of the Mentor Graphics company, which specializes in EDA, electronic design automation. PADS itself is actually three separate programs: Layout, Router, and Logic.

For those who care, Layout would be the one that I use most, to "lay out" the circuit boards.


Fun stuff. Actually, that was just one of the tutorial boards, not the one I was working on. It's actually relatively less complex than the one I'm working on now. The other programs, Logic and Router, aren't really used so much, even by the other engineers. Router is mainly for routing (duh?)--in other words, the circuit traces that you see up on the image above. It is a pain to do manually, which is why PADS has a program to do it automatically for you. Like any automation program, however, results don't always come out as intended aesthetically, and most people still stick with doing it themselves (including me).

As for Logic, it is the schematic editor of PADS. For any circuit board, there goes along with it a series of schematic diagrams, where the circuit is written out in a legible form. I was inclined to use this over the other program, OrCAD Capture by Cadence, since either way the schematic would eventually have to be linked over to Layout.

Unfortunately, the older engineers at the lab have been used to working with OrCAD first, then exporting over to PADS, which is a much newer program. So the schematics I received from Jim were all in OrCAD format; it's not mutually incompatible with Logic, but it was too much hassle to convert over. PADS Logic is definitely cleaner though, and I wouldn't be surprised if the engineers make a transition in the near future.

In any case, here's what OrCAD looks like.


Again, PADS Logic is pretty similar, just cleaner imo. So there you have it, the main programs with which I'm working this summer. That first week was actually pretty tough; not only was I learning how to use the programs, but I also had to learn the various terminologies and whatnot.

So after a week, with the simplest understanding of how everything worked, I was to start on my first assignment, a board that looks like this.


Oh yeah, that program happens to be CAMvu, forgot to introduce it earlier. Anyway, it's more or less something of an image viewer, allowing examination but not editing of the board. It's kinda annoying in that it's rather inflexible (maybe I just don't know how to use it well enough), but I need this as a reference as to how the original board looks like. I have the physical board too, but obviously I can't look into the inner layers of it, as CAMvu allows me to do.

In summary, I had three weapons to fight this war. The schematics for each board, which I require, provide the backbone of each board, telling how each component would be connected to each other. I have the actual boards themselves, which is useful as a real-world visual (for the outer layers anyway). And I have the CAM files, which are necessary, as Jim wanted me to do as close of a reimplementation as possible.

Details of this first battle to come.