So I decided a few things since etching the last PCB:
- I’d design a new board that used a high quality ADC (16+ bits), preferably Sigma-Delta and not SAR
- Since the ADC was on the board, may as well throw an AVR on there too!
- SMT was necessary
- Some type of USB connectivity was necessary (RS-232 wouldn’t be so bad since I have plenty of RS-232<->USB adapter cables for my networking stuff)
So I came up with my board layouts (I should really do schematics first, very bad practice), and it looked pretty good. I tried to etch it and each side came out fine, but I was about 0.004″ off on my alignment which made my vias unusable. Also I couldn’t do a via for through-hole stuff (but I could solder each side). I quickly decided I was going to have boards printed up.
In design I chose an ATTiny1634 as it was fairly small and had more than 512b of RAM.
I use ExpressPCB. It’s pretty lame, but it was doing the job for me with single sided stuff.. and I’m used to it, I’ve done layouts in it before although I’ve never etched a board from those layouts until recently. They offer a proto-board service at 3 boards for $59 with exactly 3.8″x2.5″ dimensions. That’s just over $6 per square inch, which isn’t bad — but then they don’t include soldermasks or silkscreens and they charge you like $25 to ship the things. I found some software that could actually read ExpressPCB files so I didn’t have to do my layout over again and could work with a simple tool in familiarity (even if I loathe it). It’s called Copper Connection and has a free version which properly translates the printed images (ExpressPCB does not) so you could theoretically do double sided boards — and your single side bottoms don’t come out flipped. Oh hey, it’s picture time so you don’t get too bored!
As you can see, the bottom transfer failed in one spot, but it’s not critical. The small traces all came out great, and it looks kind of pretty.
It can ALSO export Gerbers if you pay for it, perfect! It even has some settings for OSHPark exports, among a couple other PCB houses. OSHPark does 3 boards @ $5/in^2 of your board dimensions and a more reasonable ~$5 in shipping. So I paid under $46 for 3 boards. Score. I also paid for the most expensive version of Copper Connection so I could have the freely readable text version which can be stored along with the code in Git.
I know I wrote a wall of text. I apologize! But I digress.. getting back to the board, it was pretty great. It was going to be awesome to do things this way. I ordered a USB to TTL cable with an FTDI chip in it so I just had to bring out the USART pins and grab power from USB.
I used one of my LTC2439 chips (pin compatible with LTC2418), which is 16 bit.. just in case there was something wrong with the board layout. And god was there. But it looked a hell of a lot better than my etches, everything lined up, it had vias, a soldermask, a silk screen (where I didn’t bother with component labeling), and I made a few revisions to the board before it went out:
As you can see I have a few components already soldered — and there’s a solder bridge. You’ll find out why after the next picture which has the towering totally uncalled for MOSFET and some headers in. This is my first attempt at SMD soldering, so don’t be too harsh!
Total board errata (I did some of the tracing late at night..):
- ATTiny1634 is SOIC-20, board has SOIC-24!
- ICSP header holes are too small (drill size)
- FTDI header holes are too small (drill size)
- J1 AREF holes are too small (drill size)
- Increase distance between resistors and JFET receptacles
- MOSFET Silk is reversed
- MOSFET Drain grounded — WTF?
- No decoupling caps are on the uC/ADC
- Minor trace issues to ADC (not lining up perfectly — clearance could be increased)
- Missing pull-up resistor for !CS on ADC
- MOSFET for Idss/Vp mode (SOT23-6) incorrect (pins 5/6 swapped & connected to G instead of S on DUT)
Some of these were easily overcome. The SOIC-24 pads I was able to just bridge the last few pins since I used very few pins on the ATTiny1634 as I counted pins from each end of the chip, so I just laid it down where most of the pins already lined up.
The incorrectly sized vias for through-hole stuff was rectified with a dremel and a sanding drum so I could get my headers on the board. The MOSFET that the uC was going to switch was just a complete disaster, I had to cut traces with a razor and just let the uC directly switch the MOSFET on each JFET.
No decoupling caps is pretty much inexcusable, but doesn’t seem to be an issue thus far. My Fluke 175 agrees with the ADC insofar as the resolution that the Fluke has.
The missing pull up resistor was a problem as I was using the same SPI lines that ICSP (In Circuit System Programming) uses, the second I soldered the ADC on (which being TSSOP-28 you’d think would be the hardest chip on the board.. nope, easily the easiest) I could no longer program the ATTiny. So I soldered a resistor right on top of the chip between Vdd and the uC pin connected to !CS on the ADC. With !CS being (weakly) high during reset, the ADC no longer interfered with programming the device.
Ultimately I didn’t like the way the USI module of the ATTiny did SPI so I just decided to bit bang it anyway, making all of these issues moot as in the future I can just connect it to any pins I want.
Speaking of, you know how I did a poor job of soldering SMD before? Here’s where I makeup for that with perfect alignment and a good solder finish. 0.5mm pitch is fun!
I also should’ve put some LEDs on the board to use as status indicators, and pulled up spare IO pins onto a header.
Nearly un-correctable errata: The SOT23-6 MOSFET (I’m just using the N-side for now, it’s an N/P pair) was traced to the JFET completely incorrectly making it useless, I can’t measure Vp and Idss since it can’t switch what it needs to. I might overcome this before the next board revision/print by cutting the traces and wiring the Source and Drain where they need to go, but that’s a huge pain and I kind of just want new boards.
In the future I’m going to keep the uC board separate from the JFET/ADC board, for the next couple of revisions I’m keeping the same basic hardware layout, correcting errata and cleaning up the layout a bit.
And finally.. here’s the semi-functional board with the ICSP and USB cable hooked up and actually reading Vp for each JFET (the MOSFET is actually removed now, traces cut, and a solder bridge is there between two of the vias)
Code is up on GitHub for all to see. Make your own, I dare you.. because it’s totally not worth it unless you’re really into JFETs or you’re a masochist. I actually might make the ADC board card-edge and have a base board with the uC, hmm!