NFC Login 2.1

image

This should be the final revision. Just a few minor tweaks. The regulator is now a TPS77533 rather than an incorrectly footprinted TPS77333. Corrected the bi-colour LED wiring. Move to a smaller 4MHz crystal for the USB side of things. Shrunk it a bit as I’m no longer expecting to find any PCB bugs. Dropped the 0.1″ pin header as the TagConnect worked fine.

The most obvious change is the small capacitive touch sensor PCB on the front. The previous version searches for a tag a couple of times a second. This works fine but I don’t like the idea of all the 13.56MHz EM noise pollution. This will poll for touch frequently and if it senses a touch it will poll for tags rapidly for a few seconds. In theory it could be more responsive too. Not had a chance to code this yet though.

There’s is also a Login NFC the way to another implantee. I’d recommend you check out Hans Peter’s embryonic.dk blog.

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.

NFC login (version 1.0)

After my experiments with NFC readers I felt it was time to actually create something useful to work with my NFC implant. At work I need to make sure that my PC is locked whenever I leave my desk. It’s not that I work with anything really sensitive, it’s just that given half a chance my colleagues will certainly send an email on my behalf admitting to unusual sexual inclinations or offering to buy everyone biscuits.

I decided the easiest way to do this was with keyboard emulation. It doesn’t require me to have any privileged domain access, modify the PC or install anything that compromises security. Plus, it should all be possible using a MSP430F5529.

The launchpad, booster pack and antenna.

The launchpad, booster pack and antenna.

My proof of concept involved a MSP430F5529 LaunchPad and a . I made sure that I could emulate a USB keyboard, implement a USB CDC serial port and read my tag id.

The USB side of things was adapted from some of TI’s example code. The NFC stuff was a little trickier. The Booster Pack is sold bundled with either the G2 or F5529 Launchpads. However the sample code is surprisingly complicated and only supplied for the MSP430G2553. Porting it over to the MSP430F5529 should have been fairly simple – just changes to some in assignment and clocking. It somehow took me ages but I managed it in the end. I must publish my ported code to save other people the same trouble.

I combined them all together to implement the following:

  • A USB CDC serial port allows me to set the password (but not read it). It’s stored in the microcontroller’s flash so persists when powered down.
  • Pressing one button on the launchpad send Windows-L to lock my PC. (Not actually easily accessible in its current form.)
  • It scans continuously for NFC tags and if it sees mine it sends Ctrl-Alt-Del{password}Enter

The 2 part 3D printed case for my NFC login

The 2 part 3D printed case for my NFC login

Hardware wise for version 1.0 I went with the setup from my previous including a DLP coil antenna and a cheap bit of U-FL to SMA cable from eBay. I don’t intend that the final version will be using a dev board and booster pack. It’ll be a custom etched PCB, but I decided to take the same approach as with Agile software development – produce a minimum viable product first and improve later. If I don’t ever get round to a nice neat version 2.0 then at least I can actually log in with my implant.

A view showing the installed boards and antenna

A view showing the installed boards and antenna

I 3D printed a case that allows the launchpad, booster pack and antenna to slot in. It comprises two parts that clip together and a couple of magnet to hold it firmly against the PC case on my desk. The case is 3mm thick but only 1mm thick by the antenna coil so it reads fairly easily.

OK, it just looks like a plain yellow box

OK, it just looks like a plain yellow box

The final version looks a little dull. It’s a plain box that was almost done in black, but I happened to have yellow filament in the printer. All that happens when I successfully scan my tag is that a red LED shows through the case for 5s whilst scanning is temporarily disabled and my PC unlocks.

I’ve got a little bit of tidying of the code before I include it. As it’s evolved from two different lots of sample code in different styles it’s a little bit messy. I’ll also attach the STL files for the case – designed once again in my 3D modelling package of choice OpenSCAD.

Source code (still messy) and STL files (under files folder) are now available at https://bitbucket.org/fredmurphy/public/src/127c1b2f26305bd8b2b2184084927da72457f9e5/LoginNFC/?at=master

Freewheeling Friday

What a totally random Friday I just had. If you’re a fan of Ross Noble then you might have seen his series Freewheeling where he responds to random stuff on Twitter and heads off round the country on his motorbike. Well, he’s currently busy filming for series 2 and when he tweeted this I thought I’d mention my NFC implant.

I am looking to feature the following on freewheeling.
Ventriloquism
Taxidermy
Alternative people(tattoos body mods etc)
Can u help

The film crew in my garden

The film crew in my garden

A few messages back and forth with his production team and he turns up with a film crew to have a chat. We spent about 20 minutes or so in my back garden chatting about the back door to my garage / workshop which has an NFC-enabled lock. My wife also had a chat about how she wanted nothing to do with implanting it for me. She pretended to be all aloof about having a celebrity popping round, but when it looked like she’d be out before they turned up, she managed to cancel her other engagement!

Me, and a firmly shut garage door

Me, and a firmly shut garage door

I also showed him the Fisher Price records and the laser. We chatted for a bit about motorbikes while the crew sorted out the next destination – a taxidemist who stuff mice in positions reading the newspaper, etc.

Adam (two and a half) was too shy to join us.

Adam (two and a half) was too shy to join us.

He seemed to be a really nice genuine guy. And whilst it looks like a bit of fun it seems like really hard work to make it look that way. They do 2 weeks solid filming morning to night 3 times. Each week turns out to be a single episode. My older boy Adam is motorbike obsessed and loved his KTM SuperDuke. Ross even said he could sit on the bike, but a bout of shyness meant that he wouldn’t.

All in all, a fairly unusual day. Then off for a stag weekend…

Oh yeah – it should be on around the end of the year. I’ve no idea how much footage they take or how likely I am to make the final cut. It’s a great series though. Watch it anyway.

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!