Month: October 2015

µC Prototype JFET Vp/Idss Tester Part 5: Designing a slightly better tester

So I decided a few things since etching the last PCB:

  1. I’d design a new board that used a high quality ADC (16+ bits), preferably Sigma-Delta and not SAR
  2. Since the ADC was on the board, may as well throw an AVR on there too!
  3. SMT was necessary
  4. 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!

Me vs my 2006 Audi A4 Quattro 2.0T Part III: The S3 K04 Installed!

So the S3 K04 needed some modifications to fit on my 2006 A4, including:

  • Diverter valve relocation since the turbo was not machined for it
  • Drilling and tapping the turbo for the diverter valve to have a place to inject air into when active
  • A custom charge tube, which now connects to the top of the intercooler instead of the bottom
  • The bottom intercooler transfer line being clocked at a different angle so it can now connect to the bottom of the intercooler
  • K04 exhaust flange is larger than the K04, so weld holes and drill+tap new ones (in stainless!)

This is the mostly finished product, you can see the custom diverter valve mount with a rubber tube that hits a 3/4″ NPT nipple that was added to the turbo before the compressor wheel.

DV Relocate Body

The diverter valve relocate was made entirely from Schedule-80 tube, from the 1″ tube connecting at the bottom flange and and side flange (for the re-circulation tube) to the 2.5″ tube that brings it all together. Everything has been opened up mildly on the lathe, you can see the lip left over from the original thickness.

DV Relocate Body 2

The top view shows the lip a little better, along with a slight angle cut to make welding the top flange for the diverter valve easier. The 1″ pipe entering this pipe was cut on a ~$45 end tubing cutter from Harbor Freight which worked better than expected.

DV Relocate Assembly

Here’s a quick mockup of the assembly. I did mockups in PVC before machining anything.. partially because I was bored, partially to make sure my ideas would work correctly. The plate on the “top” of the relocate will have the small hole drilled out to 1″ to fit a coupling into the intake charge tube. The other long 1″ pipe actually seen in the picture will be cut short to allow for the recirculation hose to connect to the turbo.

K04 Modified Flange

The flange, modified. The outer bolt hole you can see in the lower left is the original K04 size. The other side needed to be cut off to avoid hitting the motor mount. Unfortunately I had some issues drilling the new top two holes after welding it, probably due to the type of rod used. The studs wound up getting welded in, but the important part was we now have a flange that fits the stock catalytic converter or 2006 A4 downpipe!

The car runs, at first it ran FAST and would pick up >15psi of boost with spikes above 20psi. It was pretty great, even if it was running lean. APR K04 tune incoming along with bigger injectors.

Keep in mind lots of stock parts needed tweaking, some of the oil/water lines needed to be bent slightly although they happily bolted up to the turbo.

K04 Installed in the B7 A4

The charge tube is a tight fit, it just about touches the radiator, AC lines, and the frame. I should’ve used 2″ pipe here instead of 2.5″ and tried to find some with tighter radii, but it worked out. Not the 2.5″->2.0″ reducer on the intercooler. I just welded some exhaust pipe on the core support to point it as well as I could at the intercooler, the silicone hose I used isn’t kinked so it appears everything turned out pretty good.

So my water pump replacement turned into a water pump, timing belt, thermostat, and a bigger turbo. It also made me buy shiny new tools, like an Ingersoll Rand 2235Ti Max 1/2″ impact gun (WHICH KICKS ASS! 1350ft lbs of reverse torque — really?!), and of course “triple square,” tools and a few sets of security bit sets for Torx bits which I’d constantly drop and find later — and smaller triple square bits (like M5).

So Audi A4, I win today. Though I’m sure you’ll break some other way. But for now I don’t have a noisy turbo, and hopefully I’ll have lots of horsepower soon.