Archives for posts tagged ‘Eagle’

CNC mill phase 4: PCB fabrication

By now I’ve got a pretty good system down for fabricating PC boards:

1. print artwork onto transparencies
2. laminate the dry film resist onto copper
3. expose the board on the UV light box
4. develop the film, rinse
5. etch the PCB in a tupperware in a sink full of warm water (I’ve been experimenting with acid cupric chloride, but my go-to is still ferric chloride), rinse
6. strip the film off with acetone & tin plate the board with Tinnit (also in container in warm water), rinse with ammonia solution
7. drill & trim board
8. dab on solder paste and place components
9. reflow solder in the toaster oven
10. hand-solder through hole components

This is basically the process I followed this time, but this was the biggest PC board I’ve made to date at around 11″ long. To start with, I couldn’t fit the whole thing on a 8-1/2 x 11″ transparency out of my laser printer, so I had to print it in two pieces and tape them together.

PCB artwork transparencies

I also couldn’t fit the board in my typical etching tray, so I had to use our good Pyrex baking tray for the etching and plating. Otherwise the process went smoothly. I intentionally sized the board to just fit into my reflow toaster oven, and despite using expired solder paste the boards came out pretty good.

PCB - ready to etch

CNC milled PC board

One of my goals for the CNC mill has been to help fabricate PC boards, primarily in terms of cutting out the overall shape and drilling any through holes. For simple boards, however, it is possible to machine the circuit traces into the copper and avoid the entire photo-etching process altogether. I recently had a chance to try this process out, and the results were quite good.

This particular board needed to be circular, and needed to have a rectangular opening for a switch, so CNC routing the outline is really the way to go. The circuit is relatively simple, so it also lends itself well to routing the traces. If I were to etch this circuit the usual way with photoresist, developer, etchant, etc. etc. it would have taken three times as long.

PC board layout in Cadsoft's Eagle

 

The board was designed in Eagle as usual, but I then used an add-on to Eagle called PCB-gcode to generate gcode from the traces. There are a number of settings to specify depths, tool settings, speeds, etc. but it is fairly self-explanatory.

PCB-GCODE screenshot

I chose some pretty basic settings, which resulted in the following preview:

PC board layout in PCB-GCODE

I was never able to figure out how to generate the outlines using PCB-gcode, so I re-drew them in Mastercam and went from there. PCB-gcode is supposed to have that ability but there appear to be some bugs in the software that limit its ability to deal with circles and arcs. If anyone has made better progress than me I’d love to hear about it.

CNC machining a PCB on G0704 CNC mill Anyway the final product came out pretty good. I was pretty pleased with myself having tightened up the backlash to only .004″ per axis, but after machining .024″ wide traces I realized how bad that is. Under the right circumstances this is a good technique to save time, but I wouldn’t try to machine extremely fine traces or tight-pitched pads until I work those last few thousandths of backlash out of my machine.

 

 

 

 

 

[flickr video=6710516711]

My First Robot part 4 – Power Regulator PCB

With Adafruit’s lithium ion battery pack and USB/DC/Solar charger our power strategy is off to a good start. I chose those in part because I could easily add a solar panel later, but assuming the robot is running continuously, that would result in a possible output voltage range from 2.5V (the shutdown voltage of the LiIon battery pack) to 6V (the full-sun output of the solar panel). The Raspberry Pi (and ATMEGAs, which I’ll probably use as ‘standalone’ Arduinos) want a 5V supply, requiring either a buck or boost depending on the output voltage from the charger. I couldn’t find any turnkey solutions, but I did find this buck-boost DC-DC converter IC. The LTC3112 from Linear takes 2.7 – 15V in and provides 2.5 – 14V out, configurable with two resistors. Maximum current depends on Vout, at 3V in and 5V out I should get at least 1A. The documentation included some pretty thorough design guidelines, including a complete demo board schematic and layout, so I set about designing one of my own.

power_reg_schematic

The design is pretty similar to the demo board. I removed a few things I didn’t need and added a bunch of output pads, and a second set of inputs so additional boards can be daisy chained. I’m told the component layout of boards like these is extremely sensitive, so I stayed as true to the demo board’s layout as possible.

power_reg_brd

I’ve been wanting to try outsourcing my PCB fabrication, and I think this finicky design was a good one to start with. The best value for this one seemed to be OSH-Park, and the process was really easy and smooth. They even take native Eagle files, so there was no messing with Gerbers, etc., and the instant preview made it easy to catch errors. Two weeks later I got three of these beauties in the mail. Ten bucks, delivered.

2014-04-26 21.54.47

Typically the next step for me would be dabbing tiny dots of solder paste onto the pads and mashing the components into them, but these boards look so nice and professional that I knew it was time to try a solder stencil. I recently gained access to a laser cutter, so I ordered some .004″ thick Mylar from McMaster and conducted a quick test.

I first exported the “Cream” and “Dimension” layers from Eagle as a 1200 dpi .png image, then brought that into Photoshop. I then selected all the pads (Select -> Color Range on black) and shrunk them down one pixel layer at a time using Select -> Modify -> Contract, Saving As every time until I had seven different versions, each one eroding the pads by about .0008″ all around. I cut these on the laser, using Raster settings of 30% power and 40% speed. Turns out the best one for this layout (with the fine pitch of that IC) was the “minus 4 pixels” version. By the way the fogginess of the Mylar there is the result of sanding off some very small ridges that had formed around all of the openings.

2014-04-24 13.53.30

Next I made a couple of fresh ones and cut a piece of 1/16″ acrylic to serve as a fixture to hold the board in alignment with the stencil.

2014-04-26 21.57.38

Here we go. First try, not bad! I made a little mess in the mounting holes, but generally the transfer was nice and clean.

2014-04-27 18.03.02I tweezered the components onto the board (my cheat sheet can be seen in the background) and fired up the reflow toaster oven.

2014-04-27 18.10.50About 6 minutes later…

2014-04-27 20.11.12

The inductor slid around a bit as the solder melted, but it’s still on its pads and not touching anything else. The IC looks perfect. You can see where R1 and R2 can be changed with thru-hole resistors to provide any output between 2.5 and 14V. The IOUT pad provides an analog voltage proportional to the current draw of the load, which I may end up using to monitor which systems are consuming the most power.

I works! 9V on the left, 3V on the right, identical output (and pretty darn close to 5V, too). I realized I had to hook up an LED to get a good output, probably because the multimeter was not drawing enough current and the IC went into a shutdown mode.

power_reg_test

Robot is ready to go wireless!

UPDATE: Here’s the files and BOM to make your own:

OSH Park link

Eagle .sch and .brd files

Bill of Materials (Google Docs)