# Build a device from a Schematic (Production PC board)

I will be using Eagle PCB software (the freeware version) because that seems to be used by a lot of hobbyists, and it can produce the files needed by BatchPCB (or anyone else).

### Project Log

I will be creating a production quality PC board the LED flasher circuit in Steve's thread.

https://www.electronicspoint.com/th...chematic-yet-another-work-in-progress.256843/

This thread will track my progress.

I intend to use the BatchPCB service started by SparkFun:

BatchPCB

Why? Because I have not used it before and it is really cheap to get high quality boards. The way it works is they "batch" up a bunch of small designs and have them built on one large panel. Then they cut them up and send them out. For this PCB it is going to cost me $12.50 U.S. That is far cheaper than any prototype service. For that you get a 2 sided board with solder mask and silk-screen. The price is a$10 setup fee and $2.50 per square inch of board. I am going to get this board in 1 square inch. The drawback? It takes about 4 weeks to get you order. I will be using Eagle PCB software (the freeware version) because that seems to be used by a lot of hobbyists, and it can produce the files needed by BatchPCB (or anyone else). I will continue this thread by adding a message about each step in the process. Step 1. Get Eagle software and install. You can get the Eagle PCB design software here: Eagle Download Page You need to buy a license to get full use, but you can simply install the sofware and use it as freeware. The size of board you can create with the free version is limited to two layer boards of 100 x 80 mm or less. It is also limited to non-commercial use. I.e. it is good for hobby projects or student projects, but you must have a license if you want to use it in any commercial project. Step 2. Draw the Schematic. I won't go into details about the schematic editor. Here is a good tutorial: Eagle Schematic Capture Tutorial Eagle has extensive libraries, but I find them very poorly organized. For example, vanilla resistors capacitors and inductors are all in a library called "resistors.lib". Go figure. When you pick a part, you have to pick not only the type of part but the exact package you are going to use, and, for things like resistors and capacitors, these are not named or organized in any reasonable manner. Another quirk of this editor compared to other schematic editors is that you must explicitly add a junction wherever wires are connected. I find this annoying because other editors I have used do this automatically and correctly. Anyway, here is the schematic as captured by Eagle. You might notice that there are no LEDs in the schematic. That is because this is designed to drive high power LEDs that are off the board. Instead, there is a 4 pin connector at the far right of the schematic which will be used to connect power, ground, and the LEDs to the board. Step 4. Place the components. The next step is to place the components on the board. You want to place things so that components that will be connected are close to each other. You should also take aesthetics into account, lining up the parts so that it does not look like a total jumble. I decided to add mounting holes to this board, unlike the DIY board I did. The mounting holes were constructed from a hole + a keepout area where the standoffs and nuts would go, to prevent traces from going through them. On a board this small, the mounting holes added a lot, so I did not meet my 1 in square goal, I went to a 1.25 in square. One thing not obvious in Eagle is how to move the labels around so they don't overlap other components and are easily associated with the parts they label. You have to use the "smash" command to break apart the different parts of the component and be able to reposition them individually. Here is the board with components placed. Notice the yellow lines indicating all the connections to be made. This is called the "rat's nest". Step 5. Manual Routing. I like to route the power and ground connections, the ones that are carrying actual current, myself. I have used a thicker trace the I will use for the the rest of the routing. Also note that the connections are made star like, from the power and ground inputs. That is, a separate trace is used to each place where significant current will flow. Here is the board with the power and ground traces done manually. The red traces are on the top copper layer and the blue on the bottom copper layer, so red and blue traces can overlap or cross. Step 6. Auto-routing. Next, let Eagle route the rest of the traces. When I first attempted this, it could not route a couple of things that were obvious. After reading the tutorial at SparkFun, I learned that you should reduce the "routing grid" parameter for auto-routing. After I reduced this from 50mil to 10, it could auto-route the rest of the board. Here is the board after auto-routing. Now a confession. This is not actually the board I submitted. I am writing this log after the fact, and when I looked at it again, I found that I had not routed the power and ground traces the way I intended. It was non fatal, but I thought I would show what I intended to do. Step 7. Prepare The Files For Submission. With the board design completed, the next thing to do is to create the files you will submit to the board fabricator, in this case BatchPCB. You will have to read the tutorial at Sparkfun.com for full information, as this is quite complicated. SparkFun Eagle Tutorial The quick summary is that you use the "CAM processor" command in Eagle. This brings up a dialog in which you select "Open -> Job" from the file menu. The job you want to open comes from a file that you can download from SparkFun.com and insert into the cam directory under your Eagle installation. This file (sfe-gerb274x.cam) contains the info needed to write out 7 needed files. I found that it did not include the names layer in the silkscreen and I had to add this myself to get it to label the components on my board. The SparkFun tutorial also has a link to a program called ViewPlot that will read the Gerber files and drill file and plot them. This gives you a check on how it will look to the manufacturer. You should see all the layers line up correctly. Here is the view of the board as I submitted it: Step 8. Submit The Files And Order. Once you have a set of Gerber files and are satisfied that they are correct, you put them in a .zip file and upload it to BatchPCB. You will have to create an account there to do this. When you upload it, it will be run through their design rules checker, and after it has passed, you can place an order! Here is the board, from the My Account page on BatchPCB after I uploaded it: You can see that they have listed a price of$3.91 for this board. This is the $2.50 per square inch charge. There is also a$10 handling charge for each order, and of course shipping. So the actual cost for 1 copy of this board is $16.81. Each additional board would be only$3.91.

The board was ordered on Feb 19.

Step 9. Wait.

Normally it takes 3 to 4 weeks to get your board back. I received the board on Mar 7. Here is what I received:

Whoa! That looks like 4 boards. Which is what I received. I do not know why, but I checked my credit card and I was only charged for 1.

Step 10. Get The Parts And Assemble.

On the DIY board I substituted and used parts I had around. Since this is supposed to represent a "professional quality" build, I actually ordered the specified parts this time.

Here is my "kit" of parts:

Step 11. Populate.

Here is the board after populating with the parts and soldering.

You can see that the 1M resistor rose up a little from the board when I soldered it. I hate it when that happens!

Step 12. Smoke Test.

Hook up the LED and the batteries and look for smoke. This board was designed to flash 2 high-power red LEDs at 6V. I used 4.5V and 1 white LED which is safe, it should run the LED at about 100mA, and this one can handle 350.

Here it is caught in the middle of a flash:

Plenty of fire, but no smoke. It passes.