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.


CNC mill upsize

I’m very fond of my Proxxon MF70. I converted it myself and its what got me into the whole world of CNC. It’s great but the size does limit what it can do.
Since getting a new workshop I’ve been thinking of what to fill it with. Actually, that’s not quite true. I had an idea of some things to fill it with before it was even built. I just couldn’t buy them.

Sieg X3

I didn’t go for a Sieg X3

I’d been keeping an eye out for a bigger CNC mill for a while. Whilst I did consider a “proper” mill like a Sieg X3, these are really heavy, expensive and needed a lot spent on CNC conversion. To be honest, whilst it’s nice to be able to easily mill large chunks of metal I knew I wouldn’t be doing it all that often.

I’d learnt from tinkering with my CO2 laser cutter that cheap Chinese machinery is good value if you’re prepared to improve their shortcomings. The popular eBay CNC3040 or CNC6040 machines definitely fall into this category. It’s more of a router than a mill, but is apparently capable of machining aluminium if you’re careful.

I’d been watching for a while and some went for silly prices near the £1000 or so new price, so I was happy to snap one up for £615 including a few upgraded controller components. It had a slightly damaged table no doubt from some missed Z steps. slowly ramping the  endmill into it. It had the older blue (total junk) controller box which I was going to replace with a Gecko 540 I had hanging around for just this sort of thing. It has the older Huanyang VFD to drive the water cooled spindle but it seems this is easier to control using Mach3 than the newer Nowforever ones.

The new mill dwarfs the old one

The new mill dwarfs the old one

It arrived and I unpacked it. It’s so much bigger than my old mill. The spindle alone is about as big as the old table!

I was a little disappointed to find that the table was a bit worse than it looked in the photos, but I carefully filed it down so it was at least flat and turned the T-slot pieces around so the damage wasn’t in the centre. The bigger shock was the badly stripped threads on the main gantry assembly and the horribly bodged limit switch wiring. Oh well – nothing a little time and care wouldn’t sort out.

I fired it up using the blue box. One axis tended to freeze in one direction. It seemed to be the controller board rather than the stepper drivers. Switching to another of the 5 channels helped but it still missed steps occasionally. Moving from 16 to 8 microsteps helped again, but then it started really misbehaving. Time to ditch it and go Gecko. I’m not going to waste any more time putting lipstick on the pig that is the electronics. I’ll replace all the wiring with shielded stuff too.

NFC reader for the xNT (part one)

I’ve had my xNT NFC implant for a few months now and I’m very happy with it. The main thing I’ve used it for is opening my garage door. It was great to use it with an existing piece of commercial kit and get used to it, but I always wanted to build some custom things to use with it.

Some NFC readers

Some NFC readers.

The simplest way to get started was to find an existing NFC reader that I can interface with a microcontroller. A scratch-built reader will come in time, but for now this is the first step. I tried a few reasonably cheap NFC readers hoping that I’d find a gem amongst them. The ones that I tried are shown. There’s the (red) DLP Design DLP-7970ABP booster pack for the MSP430. This suits me as I’m a MSP430 user and may well use the TRF7970A to base my custom reader on. Next is the (blue) RC522 based reader I found on eBay. This was chosen just because the RC522 is a commonly used chip so there’s lots of sample code out there. Third the (green) YHY502. This is just something I found on eBay from China sorting by price. Lastly the (black) ID20-MFIA. I chose this as I’ve used the company’s ID-20 125kHz reader.

OK – so if you’ve stuck with me this far you will probably want to know how they fared! To be honest they were all fairly similar. They all required the implant to be right over the PCB antenna trace (not in the centre). The alignment had to be right so without rotating my hand or the reader it worked along two sides of the trace. Whilst the ID20-MFIA didn’t have a visible trace it behaved similarly. It was also more of a pain to use too. I tried to get a quantitative measurement of range but it was tricky. They could all just about read through a piece of 3mm acrylic. Just. In practice you would want to be closer than that. Ideally with as little as possible between you and the PCB. Not as good as I’d hoped.

However, two things give me hope that we can do better. Firstly, my Samsung Ezon SHS-2320 lock seems better than that. I generally place my implant right against the reader but it seems to read well and consistently. I’ll have to do a teardown soon.

Secondly there was this post by Mathieu Stephan on Hackaday. As you can see Mathieu’s made far more progress than me. He was also happy to share his results, including schematics and the values that worked for tuning his antenna. What an awesome guy.

Mathieu’s work on inductor-based readers got me poking around a bit and I stumbled over this ferrite antenna also from DLP Design. Whilst I intend to etch some boards and try out Mathieu’s design, I’m fairly time-constrained by two young sons. I thought it’d be worth seeing if this off the shelf antenna would do the trick.

Adding u.FL connector

Adding u.FL connector

Cutting PCB trace

Cutting PCB trace

There were a couple of things I needed to do to get this working. I had to cut the trace to the PCB antenna on the rear of the board. It’s a 4-layer board so lucky it wan’t on an internal layer. I also had to add the unpopulated SMT u.FL connector to the board (marked CN1).

DLP 7970ABP and FANT

DLP 7970ABP and FANT

Finally one cheap eBay u.FL to SMA (note not RP-SMA) cable and we’re sorted! So – how did it perform? Not too bad.

I don’t think it was ever possible to get a huge read range, but it’s definitely better. It will now just read through 5mm of acrylic and whilst it still operates better if oriented correctly with the implant it’s not quite as fussy. It’s a worthwhile improvement and if you’re making your own board it would definitely be worth basing it on a coil rather than PCB antenna.

There are some differences between the DLP’s and Mathieu’s designs. There’s still the Ezon to take apart. So I’ll keep going in my search for the perfect reader. Also, it might still be possible that the right (i.e. smaller) PCB trace is even better. I’m also working on the code for my first xNT project, so stay tuned…

My NFC implant

For quite a few years now I’ve wanted to get a RFID implant. The main use for one I suppose is as a key that you can’t lose. RFID readers are readily available and it’s not too hard to add a microcontroller and get it doing what ever you want. The main reason I didn’t get one is that the last few places I’ve worked (and a friend’s holiday house) have used the proprietary Paxton RFID entry system. Whilst this works using a 125kHz carrier like most standard systems, it’s deliberately incompatible with the standard EM4100/EM4200 125kHz tags that are available in implantable form. Very annoying. I did contact Paxton to see if it would be possible ot create an implantable Paxton tag, but unsurprisingly they said it wasn’t. It would be annoying having a RFID implant that I could almost use every day!

Well, everything changed when I spotted a crowdfunded campaign for a NFC based implantable tag. It was run by someone I recognised from his work with EM4200 tags – Amal Graafstra. NFC is similar, but it works using a high frequency 13.56MHz frequency. It’s pretty much high frequency RFID with a few protocols on top. The big plus is that reading NFC is supported by things like smart phones. I decided to go for it. Here it is.

It was a particularly well run campaign. (Much better that the Agent watch I’m still waiting for.) A few months later and my ready to implant tag arrived!

Ready to implant

Ready to implant

On to the next step – getting it implanted. This proved a little trickier. Some people have done it themselves and I’m not too squeamish about these things, but you really need two hands and as it’s going to be stuck into one of them, you only have one free! My wife’s a GP and would definitely be capable of doing it, but she refused. Not for any medical or ethical reason – just because she said it was “weird, geeky and creepy and if I wanted something daft like that done she wouldn’t help”. Fair enough I suppose. I went to a few piercing / tattoing studios but they all felt it was outside of what they were comfortable with. Eventually Kalima were recommended and I popped along. They were really friendly, helpful and professional. I can’t recommend them highly enough. It wasn’t cheap (£100) but I’d checked out the quality of their other work and was impressed – especially with things like ear reconstruction which must be far more complicated that this!

Anyway, with detailed instructions from Dangerous Things and Quentin’s experience with implanting neodymium magnets and stuff, it al went well. Anyway, enough of the waffle. You probably just wanted to see some gory photos!

X marks the spot

X marks the spot

In it goes

In it goes

Just checking the position is right

Just checking the position is right

A bit of bleeding

A bit of bleeding

I’m also glad to say it works really well unlocking both my Nexus 5 phone and the Samsung Ezon SHS-2320 lock on my workshop. I’ve currently got my contact vCard on it so can give my details to someone just by touching their (NFC enabled) phone against my hand. That would have been much more useful before I was married!

Further PCB improvements

I’m glad to report I’m getting even better result with my PCB etching. Results do seem a bit up and down each time I get back to it but I feel I’m narrowing it down and getting more polished.

One. I’ve started using Ziplock vacuum bags to evenly press the transparency against the PCB. A really nice cheap substitute for a vacuum light box! I can thoroughly recommend them.

Etching underway

Etching underway

Two. I’m now able to get even better exposure with 3.5 minutes under the UV box rather than using the fluorescent tube. Maybe my developer solution used to be too strong. Maybe ditching the glass in favour of the Ziplock helped. Regardless, I’m getting a really good result. Here’s the partially etched board showing great definition.

Three. I got some Tin plating solution. No idea why I didn’t do this before, as it’s really easy and gives a great finish. The instruction say to carefully clean the copper with an abrasive. However, I assumed that as I’d just removed the etch resist from the copper with acetone and it had to be just about as clean as it could be. I popped it straight in the tinning solution before I got fingerprints all over it.

Etched and soldermasked board

Etched and soldermasked board

Milled, drilled and populated

Milled, drilled and populated

I had to mess something up and I removed the protective layer on the soldermask before exposing. Some of it dulled a little on contact with the transparency. Oh well. Otherwise I’m very happy. The ridiculously small negative text even came out a little. Here’s the board before drilling and populating. It a simple MSP430 based alarm for when my two year old son opens the front door. He can now just reach the handle.

When I’ve got it all sorted (and have tried the via rivets too) I think I might do a proper write-up.

First etched surface mount PCB

Well, after experimenting with CNC milled PCBs I decided to give etched boards a ago. As I have a “UV exposure box” (i.e. a cheap eBay thing for drying dragons’ fingernails) for the soldermask, I decided to try photoresist board. Odd then, that I found this was far too stong for the PCBs. Even a minute would appear to give a good exposure when I started developing the, but it turned out to be so overexposed I stripped all the resist off the boards. An expensive way to end up with plain copper boards.

Etching the boards was also not as simple as I thought. Sodium Persulphate seemed useless. Using Freeic Chloride and a sponge seemed too rough for the delicate photoresist. Sloshing Ferric Chloride didn’t do much until I heated it up – by putting the containing (including PCB) in the microwave. Anyway, enough of my woes and failed attempts.


PCB after etching

When I eventuallly got a combination that worked this is what I came up with. This is the board post-etch. It’s not quite as good as I hoped but definitely good enough for the MPS430 microcontroller (TSSOP) and the 0805 LEDs, resistors and capactiors.

ImageAnd this is the end result after applying the Dynamask 500 solder mask that I’ve used before.

I’m hoping I don’t ruin it when I come to try surface mount soldering…

It’s time I had somewhere to put stuff


I’ve never been one for blogging. I’ve never been one for a vanity site with all “here’s my fascinating life” stuff. However, I keep finding that I need to stick up an image, document a project that someone else might find useful, or just have somewhere I can link to.

Why WordPress?

There was a time – not so long ago – where the first step would be to knock up a database in SQL Server (21012 of course) and a custom blogging system using ASP.NET MVC (4 beta of course). I’d spend a few weeks on it and make sure it worked well from mobile devices. It’d be pretty slick. I’d probably post two things and nobody would look at it. My time’s a bit more scarce these days, so I’ve done the sensible thing and used someone else’s wheel. If I actually use it then I’ll rewrite the infrastructure.

Also, Hackaday uses WordPress and I was impressed how it themed and worked well on an Android phone.

Why 0xFRED?

What’s the matter? Don’t you like it? Tough. I’m a geek and proud of it. I was typing in a some hexadecimal the other day like we all do. I think it was 0xFFED. Maybe it wasn’t. And it dawned on me that FRED is almost valid hex. If  we were all using duotridecimal (base 32) then I’d have been sorted.

See. I told you I was a geek


What am I going to put here? Well, it may be:

  • CNC milling on my recently converted MF70 mill
  • Microcontrollers – I’ve been playing around with Netduino, MSP430 and ARM stuff
  • Chillies – not strictly geeky but I grow chillies

What won’t be here?

The things that spring to mind as likely tags are the things that have been keeping me busy lately – with one exception. I’m unlikely to blog about my adorable son Adam. It’s not that I dont’ care. It’s not that I don’t talk about him. I just that if you know me in person then you’ll know him. That stuff’s presonal – both in that I don’t want to share with people I don’t know and that you’re likely to not be bothered about some random person’s family. Suffice it to say he’s great and I don’t mind that more time with him means less time on geeky stuff. I hope he inherits some of my geeky interests. My wife doesn’t.

General software development. My job is as a desktop  developer – C#, SQL, Java, Oracle – but I’m not sure there’s much I’ll post about that. Other people have that pretty much covered.

I’ve started getting some content up and decided to date it according to when it was done even though I only blogged it now. Hence the posts in the past. I hope that’s not too confusing.