PDA

View Full Version : RFID - sharing I/O pins?



xanatos
01-12-2012, 11:39 PM
Just wondering... If I need four RFID modules running in a project, that will be read at random but non-simultaneous times, can they share I/O lines?

Thanks,

Dave

Mike Green
01-13-2012, 03:09 AM
Each RFID reader has to have its own /Enable line. The data line can be shared. You could save a pin by using a 1 to 4 selector that takes one out of four lines low with a two select bits and an /enable line.

SRLM
01-13-2012, 03:27 AM
Each RFID reader has to have its own /Enable line. The data line can be shared. You could save a pin by using a 1 to 4 selector that takes one out of four lines low with a two select bits and an /enable line.

Couldn't you save two if you were ok with one reader being always on? You can gate type decoder such as the one below to control the enable lines. And for one more pin you can have 8 readers.

wiki image (http://en.wikipedia.org/wiki/File:Decoder_Example.svg)

Mike Green
01-13-2012, 03:39 AM
SRLM,
The kind of device I was suggesting is similar to what you showed except that 3 of the 4 lines are high (rather than low) and the 4th line is connected to the /enable line using 2 bits (a0 and a1) to select which line to connect to the /enable line. It's called a decoder rather than a selector and the 74HC139 is a dual version of it.

xanatos
01-14-2012, 12:12 AM
This is helpful, thanks. Looks like I will still need to scrimp on pins from another place. As usual, I need to control and monitor an entire small country with only 16 pins! :-)

Thanks,

Dave

nicorosen
03-13-2012, 12:58 PM
Hi, I read what you have post, and I though that would work fine but couldn't get the modules to transmit the serial data.

I've bought four RFID Readers Modules (#28140) and I'm trying to use them all in the same circuit, but one at time, by multiplexing the |CE (Chip Enable) of each module and parallel wiring of the Serial Output of all the modules into the same TX bus.
Everything works well with one module on the TX bus. As soon as I place the second module in the same TX bus, I can't get the serial transmission with the microprocessor.
Have you got any idea on how to wire 4 modules, to be controlled by 1 microprocessor with only 1 uart?
I'm attaching an image of the schematic.
Waitin anxiously for your help.

Best regards,

Nicolas Rosencovich

90557

Mike Green
03-13-2012, 02:46 PM
You can't multiplex the RFID reader the way you've shown it. The serial outputs idle at logic 1 (Vcc) and the Schottky diode gate you've shown does an OR operation. You need an AND operation. The diodes need to be reversed and you need a pull-up resistor to Vcc on the common side (PIC_TX). You want a 1 output from that gate whenever all the inputs are a 1 and a 0 output whenever any one or more inputs are a 0.

nicorosen
03-13-2012, 11:14 PM
Mike, thanks a lot for your help!!! I understood exactly what you suggested and I'm going to do these changes to see if the communication problem is solved.
By the way, could you suggest which reverse diode to use and which value of pull up resistor would be better?
Again, I'm very grateful for your explicative and fast response.

nicorosen
03-14-2012, 10:38 PM
Mike, works great! thnxx a lot!