Sunday, April 13, 2014

Checking your work

I thought it was worth blogging about this, because I'm pretty sure it just saved my bacon.

After you've made a few surface-mount board designs, you'll be used to the standard parts outlines. SOIC, SSOP, QFP/TQFP as well, of course, as your size-of-choice for passives (mine is 0805), and a few more.

But there is always a first time that you come across a part that doesn't come in a familiar footprint. Therein lies danger. Or, at least, danger of wasting money.

Case in point:

I've designed a version 3.0 Hydra logic/display board that replaces the inlet processing hardware for pilot and proximity with the OpenEVSE GFI circuit. This way, you'll be able to wire a Hydra directly to a 240 volt socket and use it as a straight-up double-headed EVSE. Doing that was no problem, and there were no surprises on the way. But when I was done, there was a big empty spot on the board, which represented an opportunity to add something on. But what?

Well, OpenEVSE optionally can come with a realtime clock and backup battery, which allows ToU charging. How about that? It requires a single 8-SOIC, a 0.1uF cap, a coin battery clip and a crystal. Where things get interesting is the crystal - it's not available in the same 4 pad 2.5x1.3mm form factor as the 16 MHz crystals I use for "Arduino-izing" ATMega328s, and the collection of possible parts in the various EAGLE libraries I have handy is fairly large.

What to do?

I go with picking the actual part first. I went through DigiKey, looking for SMD crystals with the correct frequency and capacitance and then just picked one based on a combination of price and availability. I chose this one. Now the hard part: I sat on my hands until the part actually arrived in the mail.

Back in Eagle, I laid out the additional parts on the schematic. When it came to the crystal, I took a guess. When I was done, I ripped-up both of the ground planes and then printed out the board, making sure to use a 1:1 scale.

Here's the part sitting on top of the printed board layout

Now, with the PCB effectively simulated in ink and paper, I attempted to actually pick and place the part to make sure the pads were going to line up properly.

Looks good at first blush

In this case, the actual electrical contacts are on the bottom of the part, so looking at it from the top isn't good enough. We have to flip the part over and make sure that it's going to work.

That does look good after all

With the part turned over and pushed slightly upwards, we can see that the pads on the board definitely overlap the pads on the part, and that they don't extend so far that they hit anything that shouldn't be connected (like that little gold dot in the middle). So that layout is going to be just fine.

Note that the coin battery clip is visible in the pictures as well. I had used that part before, but double-checked it anyway. No problems there.

What I left out of that story is that in actual fact, my first guess for the part was wrong. The part was too narrow for the real crystal, and $45 worth of PCB and two weeks of turnaround time would have been wasted (in actual fact, what I likely would have done was just not stuff the clock parts and sold the boards as a variant without the RTC, or hunted through DigiKey looking for a crystal with the correct electrical specs and physical size). Instead, now I can order the boards with confidence that they're not going to give me any surprises.

No comments:

Post a Comment