-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReadUidMultiReader is not working #191
Comments
@giddel: it is working for me quite well on more Arduino boards (Uno, Leonardo, Nano). Please post your changes (actually the full setup will be better). Please post the readers' versions also (read them after LE The library version will be also interesting. |
@giddel I suggest wrong pins for both |
The pins are: @lmmeng: which "library" do you mean? I use the lib here from this project. I will rebuild the complete layout on the board and come back then. |
I was meaning the library's version, but as long the sketch is compiling, I suppose is OK. |
So. But: nothing changed. The one reader works, the other reader works, both together don't work. I'm using the latest library version from the repo here: 1.1.8 |
Hello @giddel, |
|
I'm having a similar issue as giddel. When I call the versions of 2 connected RFID readers, I get 146 (in hex: 0x92) for the zeroth reader, and 0 for other. When I hook up 6 readers, I get 146 again for the zeroth and 0s for all the rest. When I hook up 10 readers I get 0s on all of them. Occasionally one of them will read chip UIDs, but sporadically. Hooking one up alone works every time. @lmmeng please describe the setup you used to comm with 2 boards. Does SPI not travel well across 1-2 ft of typical 18 gauge single-core wire? I'll have my oscilloscope tomorrow to check for signal issues. I'm daisy chaining everything except Slave Selects (which are all in separate Arduino Uno I/O pins 3-9 and 17-19). Yet somehow I'm not connecting to most of my boards. @Rotzbua I tried leaving reset pins unconnected and also connecting to hardware reset, both resulted in all 0s for VersionReg's |
Hmm just tried 6 readers again and got 146 for the first 4, 0s for the last 2. Not sure what's changing between these trials? I'll check for loose breadboard connections again... continuity test showed all wires successfully daisy chained, but maybe the readers are sensitive? I tested all 10 readers one at a time with the example code DumpInfo. All cards read out 0x92 version 2.0 and successfully read the same chip with correct data output. |
May try: |
Hello @dgriggs, I hope I could help a little. |
@lmmeng no permission to view files at that forum. I tried making a login but for some reason the site will not accept my email address :/ This is all helping, thank you for the timely response! @Rotzbua I believe a longer startup time is helping, but with all 10 it still fails (all 0's). I'll keep toying with it and see what I come up with. |
I agree with @lmmeng, the example works with arduino or esp8266 and two readers. Here a pic of esp: 10 readers is a lot. |
Thanks! I figured the code wasn't meant for 10+ readers, no surprise there. I'm at a point where I'm at least getting non-zero VersionReg values from all 10 readers, but only the last one read 0x92, the others were one 0x82 and eight 0xEE's... not sure what to make of that. I'll try slowing down the SPI, although I'm not experienced in manipulating libraries (as you can see from my problems with yours hehe). |
For now i'd like to at least get my Uno working with 2 of em... I have 0x92 from both readers, but one of them won't read my chips, only one. |
Hi, sorry for (not being able to view) the picture. I'm always connected, never knew the pictures are hidden. But you lost nothing, is probably an example of how the things shouldn't be done.
with something slower
|
Didn't seem to help, same results of one VersionReg being weird (0x82 instead of 0x92) with no card reading capability, and the other working just fine. Plugging in a common RESET pin to pin2 of the Uno fixes the VersionReg weirdness, but still only one reader reads. I should mention, all I want are the UIDs of 10 cards that could come near, match them to the correct 10 readers to unlock a puzzle. I may even be able to manually communicate with the readers perhaps? Instead of using SPI? Maybe I don't need this library at all if there's a simpler way to do what I want (since I don't need 95% of what the library does)? Dunno if I have time to make that happen though, if not I'll just buy 10 Pro Micros or something to avoid the whole issue. |
Sorry, except the @Rotzbua's idea to check the supply I don't have any other. And maybe the communication levels. The MFRC522 is 3.3 V supplied and theoretically a level converter (3.3V <-> 5V) on the SPI signals is also needed. |
Did you resolved this? |
@giddel Hi. Did you found a solution? Or a more detailed bug description? |
I never found a solution with your library. The solution is to use multiplexers for each arduino pin: SCK, MOSI, MISO, then bring every card's SDA pin to GND so they are all selected. Then you initiate just one class object, and start it for each card in turn. That way you can have as many RFID readers in communication as you want, limited only by the multiplexers. Works great, but slows down a bit above 16 readers. I read somewhere that the slave select pins are somehow not actually functional, as if the manufacurer screwed up and they cannot reliably be used as normal serial slaves. |
In my experience, it seems like the slave select pins are indeed kinda useless. I've solved this in my own way. My technical requirements concerning this problem were, at the time, different - 5 readers, separate RESET and CS pins, only one reader needed to scan for a tag at a time (RFID tag test jig). My solution to this problem was, in short, like this:
If I needed to scan all of the readers simultaneously, I'd use something like 74HC125 to buffer the SCK line on CS signals and not let the SCK signal pass through to the reader until the reader is the one selected. MISO might need to be buffered, too. |
I've got 5 readers working by manually setting the Slave Select in the Setup method. |
I've tried the Ino with minimal changes (other pins).
As long as 2 readers are physically plugged, nothing works.
But if one reader is removed physically from the breadboard, the other works fine.
It does not matter, which reader is plugged. Both are working fine with this Ino if they are the only reader. All tags get regognized.
Nothing goes if both readers are wired. I've checked the wiring more than once. I have no more idea. Any hints?
The text was updated successfully, but these errors were encountered: