NFC login 2.0 finally working

image

It’s taken some time, but it’s finally working! It’s hard to debug when you don’t know what’s at fault.

  • Is it the PCB design? I’ve never done anything as complicated or as high frequency as this.
  • Is the the PCB manufacture? I decided to get the board made by DirtyPCBs rather than home etching, so at least that took one potential source of screw-up out of the equation.
  • Is it my soldering? I’ve never done anything as fine as the LQFP (larger chip) and QFN (smaller one on the right). They’re both 0.5mm pitch but at least the LQFP has pins that stick out rather than just metal patches on the edges of a square block.
  • Is it the design of the antenna? This is the work of the very talented Mathieu Stephan (from here) so probably not the weakest link.
  • Is it the firmware? I’ve had the code running on a MSP430F5529 LaunchPad, but I’ve switched down to a smaller F5510 and reassigned the pins.

Well, it took three tries – as you can see from the scribble on the board above. There’s a mistake around the TPS77333 voltage regulator which truned out to be a footprint error in the Eagle-supplied libraries. It’s now a bodged-in TPS77533. There’s another by the LED which I’ve had to swap for two separate ones rather than a red/green single package. My mistake on the pinout there.

It turns out the problem was the soldering of the QFN packaged TRF7970A. Buying a microscope helped me sort it out and it’s finally there! It’s finally working! There’s more to do, of course. I need to fix the mistakes. The software could be tidier. Version 2.1 will be perfect (probably). I’ll publish the design and code when it’s tidy, but in the mean time if anyone’s interested in any of it, let me know.

image

I laser cut a simple acrylic enclosure. It’s just black acrylic on the back – with some 5mm neodymium magnets press fitted into holes so it attaches firmly to my PC.
Some clear acrylic makes up the front so I can see the LEDs and the fruits of my labours. M3 nylon bolts go into threaded holes on the rear piece.

It’s been harder and slower than I expected but I’m very happy.

A stereo microscope

Wow. I didn’t really think I needed a “real” microscope. So far for working on those tiny SMD components I’ve got by with a jeweller’s loupe and a magnifying headband from my father-in-law who is a retired dentist. For inspection afterwards, I used a £20 eBay USB microscope. This all seemed adequate.

However, for the latest version of my NFC login project I had to solder a TRF7970A NFC transceiver. These only come in QFN package. The 0.4mm pitch pins aren’t too much of an issue. I can handle these OK on the LQFP package that the MSP430 comes in. It’s the fact that there aren’t actually any pins sticking out – just a visible metal pad on the lower edge of the chip. I had to rework one a few times as I hadn’t got it quite right and I suspect I was starting to do some damage to the chip and/or the PCB.

I did a bit of research – mostly on eevblog. The really good ones are way to expensive for the amount of use it. The good value AmScope models that most people recommend are too expensive to ship outside the US. Brunel microscopes in the UK seem good, but still quite pricey. Then I stumbled across the usual eBay “bargain” direct from China. I’ve been happy with the price/quality compromise on the laser and CNC mill I got this way. Time to dig a bit deeper and see of this is likely to be a good idea.

Microscope1I found a very helpful review on eereview that served to be the same model. To be honest, it seems the same as some of the AmScopes too. It actually looks the same as the BMDZ series from Brunel too. I decided to risk trading off quality for specifications and went for it.

Here’s the image straight from the eBay listing. I assume the seller won’t mind as I’d be happy to recommend lapsun_gift. The microscope (plus some x0.5 and x2 barlow lenses) arrived in about a week. It was marked a $95 but form some reason UK customs decided to charge me VAT on £125. The cost was about £300 so I was OK with that. The same microscope without camera, ring light or barlow lenses was £450+VAT in the UK so I was happy with the price too.

wpid-wp-1448207092901.jpgI’m very happy with it. Inspecting a reworking LQFP used to be a pain. My USB microscope would allow me to see stuff but the lighting meant I couldn’t really be sure what was a short of solder and what was a reflection. The actual soldering had to be done with no magnification and then re-inspected. Now I can actually see properly. The microscope itself is 7x to 45x zoom. With the 0.5x lens I get less magnification and a 165mm focal length and can actually solder under it – whether an iron or hot air. Zooming in (and perhaps removing the barlow lens) means I can actually see the individual balls in the solder paste.

The 2x lens (i.e. up to 90x magnification) is a bit much for anything other than really detail inspection of a PCB. It should be great for counting a spider’s eye with my boys though – if it’s not too scary!

WIN_20151122_16_23_58_ProThe camera is probably the weakest point of it all. When switching the camera in, you lose one of the stereo eyepieces. Not really a problem. However, I find the the image the camera sees is about 10% of what you see through the eyepieces. Focusing is tricky and I can’t see to get it to focus at the same place as the remaining eyepiece. In the image shown each pin is about 0.2mm with 0.2mm gap to the next one. Through the eyepiece you can see the whole 48 pin chip and some passives around it. It’s also far clearer. That photo really doesn’t do the microscope justice. Never mind – the camera was just a “why not” addition. I might try an adapter for my SLR camera at some point but no hurry.

Many people recommended a boom stand. This didn’t come as an option with the eBay model, but if I ever need one I can always add one later. The supplied one is certainly adequate for me so far. If I need to look at an angle I just tilt the board and refocuscam.

 

NFC Login 2.0 – the first custom PCB I ever ordered

Home etched v2.0 - dodgy solder mask and via drilling

Home etched v2.0 – dodgy solder mask and via drilling

NFC Login version 1.0 is working fine, but I always intended to ditch the development boards and create a custom PCB with just what’s needed. As always it’s finding the time to do these things. I had an attempt at a home etched one, but it didn’t go quite right. Then I was busy with the new workshop so it got put on hold. Eventually I decided that the 2 week wait for a PCB from China was actually quicker than finding time for the few hours it (in theory) took me to etch a board.

NFC Login 2.0 PCBs

NFC Login 2.0 PCBs

As it seemed very likely that there would need to be a further iteration, I decided that the cheapest option of using DirtyPCBs would be fine. I must say I’m fairly impressed with the quality. The only minor issue I had was that they seemed to use the tNames rather than the tSilk layer for the silkscreen. As likely to be my fault as their, I’m sure. Anyway, this was the result. Not bad for $25 including shipping for 10. That’ll give me scope for ruining a few too!

I started just adding a few components – just the minimal the USB and MSP430 parts – expecting that I’d find a problem. All good. Even the tiny TagConnect header worked fine. The only snag I can across was an incorrectly sized footprint for the TPS77333 regulator. This was annoying as it came from the TI library included in the latest version of Eagle. An earlier version the library which I used for the laser coolant monitor was fine. Annoying. Somehow it also seemed to struggle with the supply voltage when flashing an LED, which made debugging flaky, so I bodged a 77533 (higher power, different pinout) sideways across the board. It works. It’ll be updated in the next revision.

Populated board - note the bodged regulater on the right

Populated board – note the bodged regulator on the right

All seemed OK, so I added the NFC side of things. Things here were more problematic. Currently it seems that communication (SPI) between the microcontroller and the TRF7970A are OK. What I can’t seem to get in any output at all from the NFC chip into the RF circuitry. The 13.56MHz crystal seems to be working fine. This could take me a while. I had a few goes at removing and reattaching the TRF7970. Lots of practice reworking those tiny 0.4mm pitch QFN and LQFP packages, but there’s a chance I’ve damaged it. Maybe I need to populate another one to check.