Showing posts with label PCB prototyping. Show all posts
Showing posts with label PCB prototyping. Show all posts

Tuesday, December 9, 2014

EAGLE PCD layout of quarter bridge strain gauge

Intro

I don't use EAGLE PCB often enough and subsequently forget how to use it between uses.  To that end, I'm writing this quick example/tutorial to remind myself how to use EAGLE.  Maybe you can make use of this too.  Also maybe one day I'll be using it enough to become a pro.  Until then...

The circuit I'm modeling is a 3-wire, quarter bridge strain gauge, Figure 1, attached to an INA125 instrumentation amplifier, Figure 2.  The three wire circuit shown in Figure 1 minimizes any offset resistance due to resistance in the wires.  The INA125 is used because it has both a clean 10V reference voltage to power the quarter-bridge and a single resistor to control the amplifier's gain.  

Figure 1.  3-wire quarter bridge circuit.  E is the excitation, and e_o is the voltage measurement.  

Figure 2.  INA125 instrumentation amplifier.  Notice the wheatstone bridge on the left side.   

Setting up EAGLE

First, make sure you have the latest version of EAGLE installed.

Next, you need to download some helpful EAGLE libraries.  (The lack of native easy-to-use libraries is one of my biggest criticisms of EAGLE.)  Element14, Adafruit, and Sparkfun all provide additional libraries that are a little simpler to navigate.  Read this link on how to install your libraries.

I also strongly recommend copying all useful libraries to a separate folder so you can find them easier in the future.  For example, I've created a folder called 'JohnsUsefulLibraries', and inside, I have a library for throughhole resistors, throughhole ICs, throughhole trimmers, etc.  To do this, File->New->Library and save it accordingly.  Next, right click on the new library and click open.  Then find the schematic (which should be linked to all of the related parts) in other libraries, right click on it, and click Copy to Library.  Save the new library.

EAGLE Step-by-step procedure to create parts

Schematic

Start with the schematic.
  1. Look through your library and place all parts that you'll need.  
  2. Give each part a Name and Value.  
  3. Move/rotate/mirror/etc each part until you have it where you want it.  
  4. Click "Net" and connect all parts that need to be connected.
  5. Under the supply library, you'll find ground and power symbols.  These are great because they reduce the clutter on your schematic while still being "connected".  Use these and make sure all relevant power or ground symbols have the same name (e.g. all ground symbols should be Named GND) to keep them connected.  
  6. Once done, click "Generate/switch to board"
Figure 3 shows my schematic.  I'm using 3x1 headers as place holders for my standoff connectors (which I couldn't find the part for).    

Figure 3.  EAGLE PCB layout of quarter-bridge strain gauge circuit.  

Board

  1. Turn Grid on.  
  2. Move components about where you want them.
  3. Click ratsnet to redraw the "unconnected" lines.
  4. Ground plane
    1. Resize board to something reasonable.  
    2. Change to "Top" layer
    3. Draw polygon around the outside of the board.  Red line should become dotted when connected. 
    4. Change polygon name to GND (name of ground connection).   
    5. Click ratsnet button.
  5. Cleanup silkscreen (optional)
    1. Smash names.
    2. Move and delete desired values.  
  6. Set autorouting values.  
    1. Edit -> Net classes.  
    2. Change traces to maybe 12mil, drill to maybe 20mil, and clearance to maybe 10mil.
  7. Autorouting
    1. Click autorouter.
    2. Continue.
    3. Optionally, place each route manually.  

Figure 4.  EAGLE PCB board layout.  The 0 ohm resistors are there in case I need a second resistor to better balance the bridge circuit.  If I don't need it, I'll just jump it.  


Wrapup

Depending on how you want to have your board developed, there will be additional steps.  I'm presently using a Vinyl cutter and Ferric Chloride to make mine.  For details on this process, see my tutorial on Vinyl Etching PCB Boards.

My final product is shown below.




Resources

INA125 - Instrumentation amplifier
EAGLE tutorials created by Jeremy Blum









Tuesday, May 27, 2014

Vinyl Etching PCB Boards - 5V regulated power supply.

Intro

I've been dabbling with various methods to prototype PCB boards, and I thought I would share some of my latest work.

I've previously tried using the Sharpie + Ferric Chloride method and various perf/strip board methods but haven't been thrilled with the results.  I recently decided instead to start building a mini CNC based on the Mantis 9.1 design, but that work won't be ready for a while.  In the mean time, my coworker [2] showed me how to use our Silhouette Portrait to create a vinyl mask for etching, and it works remarkably well for both through hole and surface mount.

The design below is based on [victordas]'s Instructable design [1].

The Process

First, I started with the board layout provided from [1].  Alternatively, Eagle Cad can be used to create your own board layouts.  I also have a brief tutorial on Eagle Cad elsewhere on my blog.  Once the board layout has been create in Eagle Cad, turn off all of the layers (except for the traces, through holes, and surface mount pads) and save the image as a monochrome bmp file (not png or other filetype).  The bmp file format saves the correct scaling whereas png does not.  This is VERY important when you load the file into Silhouette.  
Fig 1.  Original board layout from [1].  I was fortunate that someone had already created my circuit, but normally I would need to draw it in Eagle Cad.  
While this is a great start, I really need a monochrome image of Fig 1. without all of the text and part outlines.  After a bit of work in Gimp and MSPaint (I know that I need to learn big boy image processing, but I'm procrastinating), I came up with the following image.  I didn't do it in this example, but I typically use mspaint to mirror the image about the y-axis so that I don't end up with a mirrored final product as shown in Fig. 6.

Fig 2.  Monochrome version of original layout.  This gets fed into the vinyl cutter.  
Fortunately, the scaling of the above images correctly matches the physical layout of the parts (e.g. each pin spacing of the IC is correctly spaced at 0.1 inch, etc).  

Next, I imported this image into Silhouette Studio, traced the outline, and created the vinyl mask with the vinyl cutter.  Fig 3. shows the vinyl mask placed on a single sided copper board.  Here is a copy of the Silhouette File I used to to make the mask.  
Fig 3.  Vinyl mask is placed on a single sided copper board and is ready for etching.  
Next, the board is placed in Ferric Chloride, and the resulting board is shown in Fig 4.  The etching fluid leaked under the vinyl a bit in a few places.  
Fig 4.  Ferric Chloride has etched away the exposed copper from Fig 3, and visible copper traces remain after the vinyl is removed.  
The next image shows the board after it has been polished (steel wool) and drilled.
Fig 5.  The board has been polished and drilled.  
 This final image shows the final board with all of the components mounted and soldered.  I didn't have a 2.2Ohm/1W resistor so I used 4x10Ohm/0.25W resistors in parallel.  As I mentioned before, I should have mirrored the monochrome image so that the final product was backward.
Fig 6.  The components have been mounted and soldered.

Conclusion

The vinyl cutter isn't particularly inexpensive [3], but it is significantly easier and less trouble to use than perf/strip boards or the sharpie etching method.  I strongly recommend this to anyone willing to spend less than $200 for a relatively quick and trouble free PCB prototyping setup.  

I'm hoping my mini CNC will be even better than this, but the amount of work to build my own CNC (even using the pre-existing Mantis 9.1 design as a baseline) has taken a fair amount of work/time/money.

References

[1] http://www.instructables.com/id/Super-clean-5V-power-supply/
[2] https://www.youtube.com/channel/UC8KeMEKSLE5paGtjatYALRg/videos