Arduino and NFC
-
Haha! I'm an idiot - all my issues were caused by not installing the PN532 libraries as seperate libraries.
Nice! How's it working with the ring?
Basically I just need to find a module/antenna that can read the ring reliably through a somewhat thin layer of ABS plastic. Since I'm making the enclosure with my 3d printer, I have flexibility in terms of thickness, but obviously, thicker is better to ensure it can take some abuse. -
Now that I've actually done the right thing with the libraries I've had a pay around with the example files and the reader works perfectly with the rings every time. The only one it has minor issues with is the Alpha with the slightly dodgy carbon fiber that John ended up replacing. That one needs to actually contact the top of the board before it will make a good read. Every other inlay reads within 15mm or so. It's worth noting that the elechouse board reads best from the top where all the SMD components are mounted so any covering layer will need to be thin to get a good read.
-
Yeah, now that it's working and I'm happy with it again it seems to be a really solid little unit. I'm not sure if you noticed, but the Arduino Uno next to it is actually a microduino unit. I'm going to see if I can set it all up as minimalistically as possible with just the reader, microduino core and a latching relay or two for the car engine start. If that works out well I'll see about adding a second reader for the driver's door!
It wont work as nicely in my skyline as it will eventually in my dodge because of the steering lock though. Has anyone ever seen an aftermarket electric fail-open latch that would work in a steering column? -
Nice, thanks! I doubt I will go any thicker than 2mm, so seems like I would be good with that one. I have a SainSmart and SeeedStudio module that should be here Thursday. I really like the form-factor of that one though.
-
Shield number two:
RC522, from ebay. Currently working with mifare cards only - I haven't been able to find much online at all for these, certainly not as much as for the other reader/writer.A pic with the Elechouse module for size/layout comparison.
-
I've seen a few of these modules based on the MFRC522 around, haven't seen any that said they support NTAG.
I should have taken one last look at your list before I ordered. One of the modules I ordered is nearly identical. [url=http://www.amazon.com/gp/product/B00E37T2F0/ref=oh_details_o00_s01_i00?ie=UTF8&psc=1:2aw9qudf]SainSmart RC522[/url:2aw9qudf]btw, I have 3 of these itead pn532 modules that I can't seem to get working with my ring. If you're interested, I wouldn't mind sending one your way to play around with.
-
Yup, same device with a different colour eh. I hadn't found any reference to 'em being capable with the ntag203 but I figured I'd give it a shot and see what happened.
It's interesting, the rings don't even trip the reader off at all, so I guess the chip simply doesn't support them. I did see something regarding firmware higher than 1.6 for ntag203 but closed the page out of reflex and can't seem to find it again.You... like the itead colours or something mate? I certainly won't knock back the offer, thanks.
-
Ah, yes. That'll happen hey! The best laid plans of mice and men...
I'm well practiced at that one!
So outta curiousity, which units have you ended up going with for the plans? I have to say I'm likely to get more of the Elechouse/clone whatsis NFC module v3. I'm thinking 2 for the house and 2 for the car to start with. And maybe an extra one for the 2-way radio.
I'm going to have to think of more things than need NFC. -
Yup, same device with a different colour eh. I hadn't found any reference to 'em being capable with the ntag203 but I figured I'd give it a shot and see what happened.
I had big plans and didn't consider incompatibility when I ordered them all those months ago. :mrgreen:
-
My rc522 is working with the ring. It practically has to touch the board to read it, but it does work!
[url=https://drive.google.com/file/d/0B5f9BUaIGPfgV3ZSX2tURjdKTFk/edit?usp=sharing:sre0fxji]Video[/url:sre0fxji]
[url=http://www.sainsmart.com/sainsmart-mifare-rc522-card-read-antenna-rf-rfid-reader-ic-card-proximity-module.html:sre0fxji]module[/url:sre0fxji]
[url=https://github.com/miguelbalboa/rfid:sre0fxji]lib[/url:sre0fxji]I've got a few of the Elechouse modules on the way. Definitely needs some more ideas for NFC! Unlock computer via NFC?
-
And I am more of a programmer! I would have tested the seeed nfc shield already, but i soldered one of the headers on in the wrong direction :P Now I get to practice desoldering, hopefully the shield will survive.
-
Wahey! Nice one. I'll try out that library on mine and see if it does anything differently!
Pretty much anything that you can trigger with a high/low or talk to via serial should work eh, as long as you're up to the task of coding for it! (I hate that part, I'm more a hardware guy)
-
lol, damn man. Desoldering from those boards really sucks at times. Just don't get it too hot ;-)
-
lol, damn man. Desoldering from those boards really sucks at times. Just don't get it too hot ;-)
How did you end up getting that lib for the elechouse working? This shield has pretty much the same one. I put all 4 pn532 folders and the ndef folder in the arduino libraries folder.
In file included from iso14443a_uid.pde:16: C:\Program Files (x86)\Arduino\libraries\PN532_SPI/PN532_SPI.h:6:28: error: PN532Interface.h: No such file or directory In file included from iso14443a_uid.pde:16: C:\Program Files (x86)\Arduino\libraries\PN532_SPI/PN532_SPI.h:8: error: expected class-name before '{' token iso14443a_uid:20: error: no matching function for call to 'PN532::PN532(PN532_SPI&)' C:\Users\Mike\Documents\Arduino\libraries\PN532_SPI/PN532.h:61: note: candidates are: PN532::PN532(uint8_t) C:\Users\Mike\Documents\Arduino\libraries\PN532_SPI/PN532.h:59: note: PN532::PN532(const PN532&) iso14443a_uid.pde: In function 'void setup()': iso14443a_uid:42: error: 'class PN532' has no member named 'setPassiveActivationRetries' iso14443a_uid.pde: In function 'void loop()': iso14443a_uid:58: error: no matching function for call to 'PN532::readPassiveTargetID(int, uint8_t*, uint8_t*)' C:\Users\Mike\Documents\Arduino\libraries\PN532_SPI/PN532.h:65: note: candidates are: uint32_t PN532::readPassiveTargetID(uint8_t)
-
Yeah that's one of the errors I was getting before I sorted it out - you've put each one seperately in there along with the ndef folder and whatever other libraries you have installed, then you've restarted the arduino program?
-
Well, whaddayaknow... the RC522 unit did a full dump from the Alpha ring using that library you found.
The one I had was a branch from that and must have been doing something odd.It wont work with my normal ring, and it refuses to play nice with the old-style carbon fiber, but it does read that one alpha inlay, and does a full content dump.
-
Yeah that's one of the errors I was getting before I sorted it out - you've put each one seperately in there along with the ndef folder and whatever other libraries you have installed, then you've restarted the arduino program?
yeah, each of the folders are in the arduino lib folder separately, including ndef.I eventually got it to compile by fixing the errors one by one. Now it is not detecting the pn532. Not sure if the board is toast from desoldering that one header or if my "fixes" didn't really fix it. Giving up on this one for now. It has an external antenna. I tested in on my itead module and the read distance was horrid on regular tags, nothing with the ring.
-
That's weird, it's pretty much what happened to me the first time around - I ended up reinstalling the arduino sdk and starting again on the home computer after which it worked properly.
My laptop on the other hand has done the same thing and nothing I do seems to sort it out. That said I've got two versions of that particular library installed and I think that it might be making the sdk confused because of that.
The boards shouldn't fail that easily - got a picture man? I don't know how experienced you are with a soldering iron, but best is to have the iron set high and make contact with the solder/wick only briefly each time and give it time to cool in between hits. -
Oh also, depending on the interface if you mix up MISO/MOSI or SDA/SCL then it'll fail to detect.
-
I think the board survived. Not much in the area, no apparent signs of too much heat, and I'm pretty sure that header is just a pass-through. Re-installing the SDK is probably a good idea. I just need to find some time to take a closer look at things. I have my family visiting this weekend and friends the following weekend, so busy getting my place in shape. The shield is plugged directly into my uno, so hopefully no issue there, but i will pull up the schematics when I get time and make sure everything is kosher with the lib.