This PCB design is for my LockNFC project. I wanted an NFC reader that was tuned well to my NFC implant and which also included a keypad for my (unmodified) kids to use. As i started planning out the design I came up with the following features I wanted.
Use components I'm familiar with
My go-to microcontroller is usually something by TI and often an MSP430. Not for any particular reason, just that I find sticking with one toolchain, peripheral setup, etc. makes life easier. I've used TI's TRF7970A (both in Booster Pack and custom PCB form) before and know soem of the quirks here too. It may not be the best NFC controller, but "better the devil you know" and all that. I have earlier designs I can steal from to speed things along.
Make it read implanted tags well
Most NFC readers are designed to read credit card or keyfob sized tags. This tends to mean that it doesn't read tiny (2 x 12mm) implanted tags unless you press it right against a part of the large rectangular PCB antenna. This gives an odd "sweet spot" with a huge hole in the middle.
Make it modular
There are 3 use cases i have for this - the front door of my house, my garage/workshop and my van. Whilst I'm not expecting one PCB to manage all of these without modification, I want to be able to reuse most of it. My front door might need a H-bridge or stepper driver to drive motors. My garage might need a relay or transistor to "press" the button. My van might need CAN integration. These parts may need to live on external boards, but I want the main PCB to be the same.
Make it weatherproof
The locks I intend to use this for are all external. A weatherproof design would be useful. Using the PCB itself as the front panel should help me with this.
MSP430FR2633 with capacitive touch keypad
I picked an MSP430FR2633 as the brains because this allowed me to use capacitive touch buttons. Being part of the PCB these are inherently waterproof and if TI are to believed, they can cope with ignoring a bit of rain. I initially prototyped this with a development kit to let me get a feel for the buttons I'd be using. TI also provide quite a nice library for capacitive touch sensing and even a CapTIvate design center application which helps you get your software off to a start configured with the right button configuration, etc.
I ported some sample code for the TRF7970A NFC transceiver over to the FR2633 and connected up a booster pack. It was rough and ready, but I didn't want any nasty surprises such as the NFC code not fitting into the available flash or anything like that.
I set about designing the PCB in Eagle. A lot of the NFC reader schematic I took from an earlier design, which in turn was heavily influenced by the booster pack I used. Obviously a lot of it involved playing with the layout, but I'll described some of the key features I went with.
Previous designs I have seen used a PCB antenna around the 1uH mark. I also used a 1uH coil inductor as an antenna. I tried to make as small an antenna as I could whilst still sticking to the same ballpark. There are many calculators out there for estimating the inductance of a spiral PCB trace. The one I used was L_Calculate by TI, but I'm sure they all use the same formula anyway.
Capacitive touch buttons
I took the design of the capacitive touch buttons from TI's development kit (pictured above) but made them a little smaller and created an Eagle part to simplify adding a few of them to my PCB. They're simply a couple of concentric PCB traces on the front copper layer, with a ground plane on the back. Good documentation is essential to make a microcontroller useful, and its all there in TI's CapTIvate design guide.
Some uses of this (for instance my van) may not need the keypad, so I made sure that the keypad is at the top of the PCB and everything else below. It should be possible to cut off teh top of the PCB and still have the NFC reader, LED, etc. working. I did consider placing the LED at the top to make it more visible, but decided against it for this reason.
I needed a single RGB LED to show status, but I really didn't want a second PCB or a component spoiling the front of my design. I decided the best way to do this was to put a reverse mount LED on the back. Often these shine through a hole in the board but I decided to see how well it would shine through the translucent PCB substrate. I created another Eagle part with the copper and soldermask removed from both sides where i wanted the LED to shine through. I was a little worried that it would reduce the brightness of the LED and it might be difficult to see in daylight. Spoiler: I'm happy to report that it actually diffuses the LED nicely and gives no problem with visibility.
As there's a microcontroller on there, I need a debug header. I've previously used TagConnect. This allows a component-less header - all you need is a few pads and some tiny holes to locate the adapter. Whilst this doesn't quite fit with my weatherproof requirement, I figured that the holes were small enough to allow for a bit of ventilation (to reduce condensation) but small enough that rain shouldn't get in. To be honest it wouldn't be hard to plug or cover them if needed.
The finished PCB
It always takes longer than you thing, doesn't it? The endless tweaking. The adjustment to fit within the board house's requirements - in this case Seeed's $1 offer (plus $8 shipping of course). Then the wait for delivery. But it's all worth it in the end. The boards arrived and were swiftly toasted in the converted toaster oven. I'm very happy with how they look. Now to see if they work...