Freetronics RFID Door Lock Shield and Priority 1 RFIDREAD-mRW-125

Control electric door locks and strike plates using your Arduino and an RFID module. Serial interface for an external RFID reader, and a switched output for door strike control. [Product page]
User avatar
HyperX
Posts: 2
Joined: Sun May 10, 2015 3:29 pm
Location: Florida for now.

Freetronics RFID Door Lock Shield and Priority 1 RFIDREAD-mRW-125

Post by HyperX » Sun Jun 14, 2015 8:14 pm

I am looking to build a RFID door lock based on the Freetronics RFID Door Lock Shield and the supported RFIDREAD-mRW-125 by Priority 1 Design. Being a total noob to Ardunio and not up to speed on serial, TTL, SPI, I2C etc. I am hoping the good ppl here in the Forum can point me in the right direction to make this project a success. My questions are….

1. Is the RFIDREAD-mRW-125 by Priority 1 Design directly compatible with the pin headers on the Freetronics RFID Door Lock Shield or will I have to incorporate a front end chip in my design to make this work?

Door Lock Shield I/O ---- mRW-125 I/O
--------5v-------------------- Pin 8 - 5v
--------TX-------------------- Pin 6 - TX
--------RX-------------------- Pin 5 - RX
-------GND ------------------ Pin 7 – GND

2. Just needing a basic setup, I had planned on using the sketch from PA, RFID Access Control Single. Is this sketch good as is or will I need to change some parameters to make this work with my setup?

3. I also wanted to incorporate an electric deadbolt along with the standard strike plate. Could this be wired in parallel off the I/O on the shield or would it be better to set this up as a different function using different pins on the Arduino and a relay board.

Thanks for your help folks…. Go easy on this old man… it’s not easy being old and retired… the Brain Fade sets in on the day you retire…. So watch out… it sneaks up on you fast… Lol.

andrew
Freetronics Staff
Freetronics Staff
Posts: 978
Joined: Sun Jul 14, 2013 7:06 am
Location: Melbourne, Australia
Contact:

Re: Freetronics RFID Door Lock Shield and Priority 1 RFIDREAD-mRW-125

Post by andrew » Tue Jun 16, 2015 10:55 pm

1) You don't need a chip in between, just match the wires with the shield
2) Everyone has different needs. Try the example sketches to become familiar with how it works, then you can modify as required.
3) Separately with a relay etc.

User avatar
HyperX
Posts: 2
Joined: Sun May 10, 2015 3:29 pm
Location: Florida for now.

Re: Freetronics RFID Door Lock Shield and Priority 1 RFIDREAD-mRW-125

Post by HyperX » Wed Jun 17, 2015 2:51 am

Precise and to the point… Thanks johnb!

No programming background here… so that is where my biggest challenge will be… as stated… total noob to Arduino, a few weeks at best… so far I have picked up on some things.. others are going to require a lot of digging, reading and messing up code… :? … but it should keep this old brain stimulated.

Great place here… stay cool everybody… don’t let the electrons bite! Or let the magic smoke out… that stuff is too hard to get back in those little components… :roll:

dukman83
Posts: 17
Joined: Fri Jun 19, 2015 4:16 am

Re: Freetronics RFID Door Lock Shield and Priority 1 RFIDREAD-mRW-125

Post by dukman83 » Mon Sep 14, 2015 2:06 pm

Hi guys,

I was wondering if anyone's had trouble interfacing the mrw-125 with the Arduino?

I've created the circuit, loaded the sketch and tried scanning the EM4100 tag with it without success... In fact, before even getting to the read section of it, I have found that the debug lines that are printed when the Etherten starts up are garbled. The "Serial.println("RFID reader starting up");" line is printed as a garbled mess, and no tag reads are recognised or printed. I've tried changing the baud rate to various different frequencies and that only altered the garbled output. I know that the code is executed (only to that point), as adding more print statements prints more garbage...

Additionally, I've spoken with the lovely people at Priority1 design, whom I've purchased the reader and tags from, who have told me that the EM4100 is not a default tag set to be recognised by the mrw-125, and that there will be forums out there who would be able to help me, as the software provided on their site will not work in programming the tags and reader - so here I am :D

So I guess to clear up the clutter, my questions would be:

1. Is the code suitable for this application, or is there something missing?
The code I'm referring to is here: https://github.com/practicalarduino/RFI ... Single.pde

2. Is there a way to read and program the EM4100 tags to work with the kit?

The circuit works and was built using a diagram in Practical Arduino and http://www.practicalarduino.com/schemat ... c-v1.1.pdf It's been successfully tested in every way with the exception of the RFID functionality, for obvious reasons.

Could I please ask for some help regarding this, as no one on the interwebs seems to have come across this scenario (and published it). :)

Sincere thanks,

Alex

P.S. Does your 7805 voltage reg. run too hot to touch??

**Update** So it turns out with point 1, it was the VS 2013 Visual Micro plug-in that wasn't printing the correct values for some reason - even though it worked perfectly for all other projects. The code works as advertised using the Arduino IDE, so point 1 is no longer the issue, now I'm just wondering if there is a way to program the mrw-125 using the Arduino via TTL or any other means?

dukman83
Posts: 17
Joined: Fri Jun 19, 2015 4:16 am

Re: Freetronics RFID Door Lock Shield and Priority 1 RFIDREAD-mRW-125

Post by dukman83 » Thu Sep 24, 2015 10:52 am

Have I picked an inactive thread?

User avatar
jonoxer
Freetronics Staff
Freetronics Staff
Posts: 298
Joined: Sat Oct 15, 2011 11:31 am
Location: Melbourne, Australia
Contact:

Re: Freetronics RFID Door Lock Shield and Priority 1 RFIDREAD-mRW-125

Post by jonoxer » Sun Sep 27, 2015 9:51 pm

Could you please clarify what specific reader you're using? The Priority1 Design site shows this one:

http://www.priority1design.com.au/rfidread-mrw.pdf

According to that spec sheet that particular reader supports EM4100, so perhaps you have a different model.

Starting on page 8 of that PDF is a guide to the commands accepted by the module. I've used a few uRW modules myself and never had to adjust their settings, but if your module isn't configured correctly perhaps you need to send it commands to enable EM4100 support.

dukman83
Posts: 17
Joined: Fri Jun 19, 2015 4:16 am

Re: Freetronics RFID Door Lock Shield and Priority 1 RFIDREAD-mRW-125

Post by dukman83 » Mon Sep 28, 2015 12:10 am

Hi Jon,

Thank you so much for getting back to me!

Sorry, I didn't realise I missed that pertinent bit of information. I'm using the mrw-125 because of its versatility, I thought you used it in your superhouse video too.

I've also spoken with Robert at priority1, who had advised me that although compatible with the EM4100, the mrw-125 is not set to recognise the tags by default, but that a simple command of "SD0$0D" should do the trick.

The apparent problem became evident when trying to send the command to the reader via the arduino using the software serial library.

After sending the command, the reader still failed to recognise the transponders, and after putting in a few print statements in the loop provided in your code to see what was being returned, I realised that the reader was never reporting to be available and not getting past the RFID.read() condition check.

To bypass this, I just put in a print statement outside that condition check to see what the reader was constantly doing and it was returning a "-1", indicating its not receiving anything.

I've then disconnected everything and shorted the tx and rx pin to send in one pin and print on the other, but had no success in receiving the message.

I've done a bunch of troubleshooting since then and apologise if I've omitted pertinent information, but this is where I'm at at the moment - not sure if the arduino is actually sending and receiving the messages as it should using the software serial library.

I've also trawled through the arduino forums and whatever site could be helpful but have had no success.

I'd really appreciate any help, and thanks again for getting back to me!

User avatar
jonoxer
Freetronics Staff
Freetronics Staff
Posts: 298
Joined: Sat Oct 15, 2011 11:31 am
Location: Melbourne, Australia
Contact:

Re: Freetronics RFID Door Lock Shield and Priority 1 RFIDREAD-mRW-125

Post by jonoxer » Mon Sep 28, 2015 2:13 am

Yes, I think you have the same module as me :-)

What I'd do in this situation is try to eliminate any possible complications and reduce your setup to the minimum possible parts to get the reader working in the correct mode, then build it back up from there one step at a time.

So what I'd do is connect just the RFID reader to a computer using a USB-serial converter, such as a classic FTDI cable or some other device such as this if you already have one:

http://tron.cc/usbserial

If you don't have an FTDI cable or any other USB-serial converter, you can wire up your Arduino to do the job for you. Go into the Arduino IDE, and selection File -> Examples -> SoftwareSerial -> SoftwareSerialExample, and load it onto your Arduino. The top of that sketch includes some comments that explains the pin connections, and you'll probably have to change the baud rates configured in it. I think that RFID reader runs at 9600bps by default (from memory, you may need to check) so it's probably simplest to change both the hardware and software serial ports to 9600 in the sketch before you upload it.

Then connect GND, 5V, TX, and RX from the module to the matching pins on the Arduino, with the TX from the reader going to the software serial RX pin, and RX from the reader going to the software serial TX pin as defined in the sketch.

If you open the serial console now, you should be in a state where anything you send will go to the module, and anything the module sends will be displayed in the console. Try experimenting with the serial commands and see if you get a response. If you get the reader to talk to you with that minimal setup, you're well on your way and we can figure out the next step from there.

Oh yes, and something else to check is the line ending settings in the console. It's a long time since I've done anything with that RFID reader, but it may be finnicky about whether it sees a newline, or a carriage return, or both.

Please let me know how you go!

dukman83
Posts: 17
Joined: Fri Jun 19, 2015 4:16 am

Re: Freetronics RFID Door Lock Shield and Priority 1 RFIDREAD-mRW-125

Post by dukman83 » Mon Sep 28, 2015 5:20 am

Hi Jon,

Thank you very much for the comprehensive advice!

Unfortunately, I don't have a USB-serial converter, so I've adopted the Arduino connection method.

I've used the SoftwareSerialExample sketch, using pins 10 and 11 as Rx and Tx respectively and connected them to the mrw-125's Tx and Rx pins (6 and 5) respectively. I have connected the 5V to the power pin and GND to the ground of the reader.

After changing the baud rates to 9600 (sketch default was 54600) and uploading, I've checked the serial monitor. This had printed only the first string statement "Goodnight Moon!". I assume that it would have written "Hello World?" to the Tx pin also, but nothing was printed from the loop.

It was actually in this sketch that I've realised that the reader is not indicating that it's available according to that condition check.
To overcome this, I've commented out the "if (mySerial.available())" statement and changed "Serial.write(mySerial.read());" to "Serial.println(mySerial.read());" and all it kept returning was "-1", which according to the Arduino SoftwareSerial library means that no characters are available.

I've then even further stripped it down to nothing but the tx and rx pins on the arduino shorted and running the same code. I got the same results - (-1).

Thinking that it could be the Etherten itself at fault, I've tried it with another unit. The results were the same.

So, knowing it's not the Etherten issue, there's got to be something with how I'm using the SoftwareSerial library, but I can't, for the life of me, work out what the problem is. I mean, if copy/paste (and modify where required, e.g. baud rate etc.) of sample codes and the example sketch don't work, even and using a bare approach with nothing connected other than tx and rx shorted for self-interrogation, I don't know what else to do, I'm truly stumped. :? :oops:

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: Freetronics RFID Door Lock Shield and Priority 1 RFIDREAD-mRW-125

Post by angusgr » Mon Sep 28, 2015 6:33 am

The other thing that you could try is using the EtherTen's onboard hardware usb/serial adapter as your serial adapter:

- Flash the "Blink" example to the EtherTen so it doesn't try to use the hardware Serial itself. Wait until it's blinking away happily.
- Connect the "RX" pin (pin 0) on the EtherTen to the RX pin on the RFID reader.
- Connect the "TX" pin (pin 1) on the EtherTen to the TX pin on the RFID reader.

... now you can treat the EtherTen as if it was a USB/Serial adapter, using the onboard adapter chip. The main microcontroller (Atmega328p) doesn't do anything at all.

Hopefully that will get you a bit closer to isolating the problem.

Angus

Post Reply