Tuesday, January 31, 2012

Ubuntu 11.10/Gnome 3.0: Surviving the transition!

I've had significant issues with the new Ubuntu GUI and Gnome 3.0; ranging from irritations (difficulty to create launchers) to bugs (mouse stops responding).  If you are googling around I'm sure you've seen the near universal cry of dismay.  If there is one message to send Canonical (if any of you ever read this posting) it would be that while its a great idea to "dumb down" the interface so a single GUI will work between your desktop and touch machines, you can't disable the advantages available through a mouse interface!

Anyway, here is what I did to make it workable.  These are mostly culled from various web sources; they are not my original work.

Friday, January 27, 2012

Transdescending Arduino: Going cheap and small

The Arduino is great; a microController you can actually do something with for 30 bucks!  Ok, but your train layout needs 5 of them ($150), your home sensor network needs 10 + $40 xbee cards (clocking in at $700!).  Or the mere fact that your want to KEEP your projects around means that you get nailed for 30 bucks over and over again.

But wait a second... the AVR328p is a 3 dollar chip!  And the AVR ATMega48 (pin compatible but with a LOT less space) is 2 bucks (for 10)!  And if your requirements are extremely minimal, there's the ATTINY13 which comes in as little as 60 cents -- but in an inconvenient package (you'll be better off spending another 4 dimes and getting one for 1 buck).

Let's hack up a bunch of these chips so next project we'll have lots of choices...

Note: If you've figured out the hardware part and just need some software help check out this posting: AVRez -- "arduino" style APIs for other chips


Friday, January 20, 2012

DIY PCB SMT Breakout board fabrication: Results

In the last posting I described how I made a few PCBs to act as SMT breakouts.  I've discovered that this seems to be a pretty ideal job for DIY PCB work!  To mount thru-hole stuff, you need the hole -- and that means hand drilling... but a small breakout board can be done on a single side, and its possible to use .1" Right Angle headers soldered onto an oval thru-hole pad so you don't even need to drill the hole for the breakout header.

In my last posting I finished with the circuit board ironed onto the blank PCB.  It turns out that the final steps are quite easy.  First you get some etchant.  I used ferric chloride from Radio Shack, but I wish I had used muriatic acid and hydrogen peroxide as it seems slightly better for the environment.  I poured the etchant in a leftover food container (now forever dedicated to PCB etching) and left the boards in for about 30 minutes.  I used a twisted wire hanger to keep my fingers out of the etchant:



Then rinse the board in lots of water, and leave the tap running to dilute any drips of etchant solution that go down your drain.   When you're done, put the top on the container (make sure it seals!) and store for next time.

To remove the laser printer toner, I tried a few paint removers, liquid sanders, etc.  Nothing really worked.  It turns out that Acetone (nail polish remover) is required.  Its available in the paint section of hardware stores, and is absolutely amazing at the job. 2 swipes with a rag daubed in Acetone cleans the toner like wiping milk off a table!

Next I soldered the parts on to the PCBs using a toaster oven.  I was concerned that the lack of a solder mask might make the solder bridge across PCB pads because its impossible to keep the solder paste onto pads.  In fact, I don't even bother, I just paint a thin line down across all the pads in a row (see my earlier post on DIY SMT soldering techniques here).  But in fact, the solder balled up nicely as you can see here:



These are tiny SOIC-8 and SOT-23/5 parts.  I left the chip off the rightmost SOT-23/5 to see how well the solder wicked onto the pads.  Before putting it in the oven, the space between all the pads was completely covered with solder paste -- the wicking works great!

I cut some of these boards with a hobbiest bandsaw, like you can get for $200 at Home Depot.  But its even easier to cut them by scoring the front an back with a ruler and then breaking them against the edge of  table (preferably metal).  Place something hard (like a metal or hardwood block) on top, grab the protruding board with pliers and then crack it by rotating the pliers downwards quickly.

One surprise was how fine a pitch may be possible.  I had originally "designed" this board for professional fabrication and I accidentally left some tiny lettering on the board.  Amazingly, it transferred to the PCB perfectly well!  Here is a close up:


As you can see, by the ballpoint pen I put in for scale, the height of these letters is less then one millimeter!  I will need to go back to the file to check, but I'll bet that the line width is just a few mils (thousandths of an inch) wide.  Many professional PCB houses won't do less then 8mils!  Of course, they require repeatability across hundreds of large boards -- my goal is to get a single small breakout board out of a panel with a half dozen attempts.

So basically, if the transfer works without smudging or distortion you can get amazingly fine detail.  And from my limited experience it does tend to do so reliably across portions of the board that can be 2 square inches in size.  This makes me believe that it may be possible to home fabricate chip-scale BGA breakout boards -- at least for small BGA packages.  I have not discovered anyone who has tried it yet; so I think that will be my next experiment (as soon as I find a "fun" BGA chip)!


EDIT:  Here's a photo of the SOIC8 installed on a PCB.  I think that its better to put all the pins in a single row, rather then the DIP configuration because that gives you the other side of the breakout board to use to make your circuit!



Also note that no drilling is needed!  Get right angle breakaway headers and then solder them to the (undrilled) thru hole pad.

EDIT 2:  Here is a photo of a SOT-363 chip with a 2 mil circle indicating pin 1.  To get an idea of the size, the circle is indicated by the lead of a standard 1/4 watt resistor. As you can see the 2 mil line width was etched perfectly!




Friday, January 13, 2012

DIY PCB fabrication; Breakout Board Toner Transfer Experiments

Using modern components in PCB circuit board design essentially requires the use of small surface mount packages.  Testing these components can be costly and time consuming if you need to have a break-out-board professionally fabricated for every component.    It is possible to hand-solder extremely thin magnet wire to individual leads of a SMT package but that is a very painstaking process.

It would be much easier if individual PCBs could be hand-fabricated for the task.  I dug around on the web and DIY PCB fabrication for very small parts seems quite tricky; most people use home PCBs to make larger circuits out of thru-hole parts.

However, even if multi-chip SMT designs are not feasible, it would be very valuable to be able to rapidly fabricate single chip breakout boards for SMT parts (for noobies: a breakout board is a PCB that simply brings all the pins in a SMT chip to a male header that can be plugged into a solderless breadboard).  Especially small parts; if you are putting a TQFP-144 on you board there are places where you can buy breakouts.  And there are fewer footprints so you could build up a "library" of breakouts.  But there are tons of different packages for components ranging from 2 to 32 pins!

Making these small-pin count PCBs might be feasible (where large SMT designs are not) for several reasons.  First, the PCB will be quite small, allowing you to panel multiples "tries" onto a single DIY board.  You only need one success!  Second, the routing will be pretty short and simple.  If the pins are placed on either side of the chip the routes will be short and on a single side (so you can try the same circuit on both sides!).  Finally, I think that right angle .1" headers could be used in place of straight pins, so the final board would not need to be drilled.  This will save a lot of time (and painstaking work).

Here are my first attempts (ever) to use the toner transfer method to put a mask on copper PCBs.  I panelized 6 SOIC-8 and 6 SOT-23/5 breakout boards onto a space about 2x3 inches:


And the back side attempts:



The basic methodology (for people who are reading this as an instructable) is to:
1. Remove all layers of your PCB except routes, pads and vias.  Export it as an image (monochrome, 600 dpi).  Load it up in a graphics editor (gimp), reverse the color, and horizontally mirror it.

2. Next, use a laser printer to print it onto some kind of paper.  You want a paper with unique, generally undesirable properties; essentially the toner should just barely stick and it should dissolve readily in water.  Four types are commonly suggested:
  A) glossy paper ripped from a cheap magazine/catalog
  B) glossy photo paper
  C) sticker backing paper (pull the stickers off and print on the shiny side)
  D) speciality PCB toner transfer paper.

3. "clean" a blank PCB with steel wool, and then iron the toner on by placing the iron at its highest setting on the paper (which is on the PCB) for about a minute.  You can't move the paper relative to the PCB so some masking tape on the corners might help.  Also don't push down hard, and don't move the iron around much.

4. Soak the PCB in water for about 5 minutes and then rub the paper off.  You can rub quite hard; if it toner comes off then it did not transfer.


The PCB on the upper left of image 1 was made with glossy photo paper.  This paper essentially did not work for me; it would glue itself to the iron and then separate from the PCB or pick it up as well.  The toner was still melted at this point so most of it stayed with the paper.

The upper right image 1 board shows what happens when you push down too hard.  Pressure on the melted toner caused it to spread out.  So don't do that!! :-)  The bottom left of image 1 was ironed on for several minutes.  It got so hot it changed the copper color -- additionally the paper was extremely hard to remove.  Oops!  The last photo on image 1 was again done with glossy photo paper.  The paper still lifted off with the iron but amazingly it left a perfect transfer in the middle!  Unfortunately I doubt its repeatable.

I left board on photo 2 clean to show how the PCB should look after it has been rubbed by the steel wool.   The other 3 boards on the bottom image show transfers with the sticker-backing paper with ironing times of 30seconds, 1 minute, and 1:30.  I'm sure you can see which is which since they show more toner sticking.  In fact, the last image has perfect transfers of 9 out of the 12 circuits!  The only miss transfers are on the top of the PCB.  Clearly I did not get that portion hot enough (in fact, I think that it may have been under the steam holes of the iron).  Removal of the paper was pretty quick under hot water; about 5 minutes (so clearly the boards were not under the iron for too long).  But the paper did not "pill" up like other web postings suggest; it mostly peeled off.  After ironing, the paper it was a little browned in spots but not significantly.

Like any other craft there is clearly a bit of skill and practice required.  And some experimentation is required to become familiar with your particular tools.  However, so far this looks like a pretty feasible method for breakout board fabrication.  In the next installment I will attempt to etch the boards and solder the parts on!



Tuesday, January 10, 2012

Ubuntu 11.10 64bit CadSoft Eagle 6.0.0 installation pain

I think Eagle 6 was rushed to market :-).  It resists installation on the most popular Linux distros, and when you do finally get it working it pops up with an "I'm sorry, there's a nasty bug" dialog.  But Kudos to Cadsoft for admitting it!!!

Here are my notes on the installation.  I think I might be missing a step or two so if you follow these and run into issues, please post a comment!!!

These instructions should also mostly work in 32 bit Linux distros, but you won't need to install as much (remove the packages with "i386", or "32" in their names).

Step 1: Prep Ubuntu for 32 bit compilation

sudo apt-get install build-essential lib32z1-dev g++-multilib gcc-multilib ia32-libs libssl1.0.0 libssl1.0.0:i386 libjpeg8 libjpeg8:i386

Next, get and install libpng14 from source:  

http://sourceforge.net/projects/libpng/files/libpng14/1.4.8/libpng-1.4.8.tar.xz/download

tar xvf libpng-1.4.8*
cd libpng-*
./configure CFLAGS=-m32 --prefix=/
make check
sudo make install

32 bit distros should remove "CFLAGS=-m32" and just use this line instead:
./configure  --prefix=/

[Troubleshooting] If you get the error: "configure: error: C compiler cannot create executables" check the config.log file.  If the problem is: "/usr/bin/ld: cannot find crt1.o: No such file or directory" then you did not install g++-multilib gcc-multilib.

If you get:  "configure: error: zlib not installed" you did not install lib32z1-dev


Now install Eagle:

chmod a+x eagle-lin*
sudo ./eagle-lin*


Good Luck and keep building OSHW!!!