Multiple RFID reader network
mhewett737
Posts: 4
I have a large O scale model train layout that is controlled by a PC using CTI Train Brain software and hardware network. It controls, engines, switch track and accessories for automatic or manual control from the PC/ touch monitor..
The lay out uses various photo/infrared sensors to provide feed back to control operations. The problem has always been how to determine which engine is over what sensor. This CTI hardware contains modules in a rs232 daisy chained net work. These individual modules can control relays, motors and feed back sensor data or any combination depending on the module. I have developed Stamp software that allows me to insert a BS2 stamp hardware into the network and emulate any one of these modules without interrupting the network..
This network outputs and receives data back to the PC at about 80 times per second.
I have purchased small RFID R6630 modules from China that output serial TTL . The modules have small (2") antenna loops that are placed under the road bed of the track.
I have used the BS2 Stamp to successfully capture RFID data from a small round tag placed under the railroad /engine/car. . As the train car passes over the antenna the RFID reader sends a 10 byte data string to a SERIN pin on the stamp which in turn outputs a value that represents a specific train into the CTI Train Brain network to be used for controlling that specific train..
The problem is that as every one knows the Stamp does not have interrupt capability. Using SERIN with a time out I can capture the RFID data about 50 % of the time while the Stamp is off trying to emulate the CTI module requirements of inputting and outputting serial data. involving the other CTI modules.
So I have solved this problem by using a second Stamp to handle the RFID data capture ., It creates a byte that represents the appropriate engine/car and sends that byte string to the other Stamp (in the CTI network) continuously for a time period that gives me 100% capture rate.
Works great no matter what speed (reasonable speed) the car moves over the sensor.
What I need now is a way to have multiple RFID modules read. I realize I could assign individual RFID readers to specific pins on the stamp and write anti collision software to handle it, but It creates a wiring nightmare(for me anyway). I would like to use a RS 485 network and just one serial input to the Stamp.. I know there are RS485 to serial TTL converters available. Does any one have experience using a stamp to control a RS485 net work? If so , these particular read only RFID modules only output RFID TAG data. It does not output its own ID. How do I handle the fact that the RFID does not have an address to identify it in the rs485 network protocol??
I am a bit over my head on RS485 !
Any specific suggestions , alternative approaches or a place to look for info would be appreciated.
Mike
The lay out uses various photo/infrared sensors to provide feed back to control operations. The problem has always been how to determine which engine is over what sensor. This CTI hardware contains modules in a rs232 daisy chained net work. These individual modules can control relays, motors and feed back sensor data or any combination depending on the module. I have developed Stamp software that allows me to insert a BS2 stamp hardware into the network and emulate any one of these modules without interrupting the network..
This network outputs and receives data back to the PC at about 80 times per second.
I have purchased small RFID R6630 modules from China that output serial TTL . The modules have small (2") antenna loops that are placed under the road bed of the track.
I have used the BS2 Stamp to successfully capture RFID data from a small round tag placed under the railroad /engine/car. . As the train car passes over the antenna the RFID reader sends a 10 byte data string to a SERIN pin on the stamp which in turn outputs a value that represents a specific train into the CTI Train Brain network to be used for controlling that specific train..
The problem is that as every one knows the Stamp does not have interrupt capability. Using SERIN with a time out I can capture the RFID data about 50 % of the time while the Stamp is off trying to emulate the CTI module requirements of inputting and outputting serial data. involving the other CTI modules.
So I have solved this problem by using a second Stamp to handle the RFID data capture ., It creates a byte that represents the appropriate engine/car and sends that byte string to the other Stamp (in the CTI network) continuously for a time period that gives me 100% capture rate.
Works great no matter what speed (reasonable speed) the car moves over the sensor.
What I need now is a way to have multiple RFID modules read. I realize I could assign individual RFID readers to specific pins on the stamp and write anti collision software to handle it, but It creates a wiring nightmare(for me anyway). I would like to use a RS 485 network and just one serial input to the Stamp.. I know there are RS485 to serial TTL converters available. Does any one have experience using a stamp to control a RS485 net work? If so , these particular read only RFID modules only output RFID TAG data. It does not output its own ID. How do I handle the fact that the RFID does not have an address to identify it in the rs485 network protocol??
I am a bit over my head on RS485 !
Any specific suggestions , alternative approaches or a place to look for info would be appreciated.
Mike
Comments
Thank you for the response. . I am not all that knowledgeable about the propeller chip. I believe it does have interrupts , however wouldn't I still have to wire every RFID reader to it in order to know which reader the data came in on? Or is this a inexpensive enough chip to put at each RFID reader and then put on a serial bus to the stamp with ID and tag data?
I am looking at 20 or more RFID readers that's a lot of wire to run. That's why I was hoping for some help with a RS 485 type of solution..
Mike
Perhaps you could connect several RFID readers to a few propellers to reduce the wiring to a more manageable level, and then connect them to an RS485 bus or directly to each other and the Basic stamp. If that is not practical there are quite a few small chips available near the $1.00 mark that could be used for your application as long as you are willing to write the software.
I could write the software to buffer rand handle possible data collisions. How far do you think I can run a wire from the output of the RFID to the stamp SERIN pin??
I do know for sure that the propeller chip can handle 8 simultaneous serial I/O's, and see no reason why it could not be expanded to 16, 20, or even 24 inputs.
As to how far the TTL serial data can be sent from the RFID to the receiver, it depends on how electrically noisy the trains are and how fast the data is sent. I have sent TTL level serial data at 1200 baud about 16 feet over a twisted pair with no problems. If noise/distance is a problem placing an RS422/485 transmitter at each RFID and a receiver at the other end of the wires will solve that.