Showing posts with label Gerber. Show all posts
Showing posts with label Gerber. Show all posts

Wednesday, March 27, 2013

More Nerdy PCB Stuff

So, if you are nerdy (like me), and you're curious about making your own PCB's for your projects, you might be interested in our experience designing the Hall Effect Unit PCB.

There's tons of software out there for PCB development, the consensus among most hobbyists seems to be either Eagle CAD or KiCAD.  My own preference ended up being KiCAD, for one it's free (gpl) and free ($$), also it runs under several Linux distros, and after using it a bit, I liked the component library editor better than Eagle's (critical, since unless you have a large commercial library at your disposal, you are going to be making a lot of your own component models, which is annoying but pretty easy with a good editor).   There are plenty of tutorials available for both KiCAD and Eagle, I won't bore you with details, I found this one for KiCAD to be pretty useful.

The whole process, from an idea, to completion of all CAD work took me about 8 hours (that includes installing KiCAD and Eagle and then deciding on KiCAD, messing around with a tutorial, creating 2 library components, and then creating the schematic and board).  It's really pretty doable / even easy, or at least I hope it was, this was my first PCB design, so we'll see if all the components actually fit on the thing when we build one.

The final output from the CAD design flow is a set of gerber data files (one per board layer) that describe where you want copper or not when the board is etched, plus a drill file for the vias.  This is all that's really needed to manufacture one of these boards.  For a two layer board its very straightforward, but sorta cool looking, see screenshots from my gerber viewer for the Hall Effect board ...

Top Layer

Drill File

Bottom Layer

Amateur PCB Night

We just finished the unit circuit board for the position sensing network that will be used with the "project" which will remain unnamed until Ian's blood pressure subsides enough for additional Google searches on the words "labyrinth" and "maze" to proceed.  The board is pretty simple, a couple 2.54mm pin header strip connectors, and two open drain omni-polar (switch output drives low for both north and south pole fields equally) hall effect switch IC's.  Overall, very similar to the circuit we bread-boarded in an earlier post with the exception of the latches which are replaced with omni-polar switches in the final circuit.  The switches should be much smoother in actual operation, they are roughly twice as sensitive as the latches (magnets do not need to be placed as close to the sensors), and of course we were able to dispense with the circuitry needed to clear the latches in the absence of a field (the switches stop driving as soon as the presence of the magnet field is removed).

KiCAD Board Layout
 
KiCAD Board Schematic


The idea is to string together a bunch of these 28 sq mm PCBs in a grid shaped sensor array underneath the game board (the final project will utilize 256+ PCBs).  Each moveable piece on the board / sculpture will be embedded with a small rare earth magnet which will induce a magnet field to trigger the sensors.  Ian's friend Michael came up with the (pretty cool) idea to connect all the open drain outputs in a particular row or column in a wired-OR configuration.  If any unit circuit in a row (or column) detects the presence of a magnetic field it pulls down the wired-OR output for that collection of sensors.  This reduces the number of GPIO's required to read a position from the grid, and using an Arduino to read each row and column output, it's simple to detect which squares in the 256 sensor grid are occupied by reading only 32 inputs.