Browse over 10,000 Electronics Projects using the Page Numbering provided at the bottom of each Page.

Serial Port combiner for RFID station

Serial Port combiner for RFID station

I have a project where the HMI (Human-Machine Interface – ie the touch screen PC) is situated 20M from the station. Normally I would move the screen but this time it was not possible.

The station has a printer and 2 RFID readers which are activated when a packing crate with an RFID tag embedded in it comes into contact with its cradle. As we have two positions we also need to know which station the reading was sent from. I also need to send a command to a box printer to change the lot number and product name printer on the boxes being packed.

If the station was close I would normally use an RS232 reader on different COM ports. (I cannot use USB as I don’t easily know which RFID port is which), however RS232 is really only good for 10M at 9600 baud especially in industrial areas where there is a lot of noise so I needed a way of doing this.

Our solution to this is below (link to project is here)

Two serial RFID readers, are connected to the circuit board which provides power to them and also reads whatever they send. On receival of an RFID tag code (a 10 char string with a header and trailer char) the system appends an “A” or a “B” to the serial string, removes the header and trailer and replaces the trailer with a CR LF and sends it to the PC over RS485 which is good for very long distances and speeds through noisy environments.

Data sent from the PC is passed though to the printer serial port and on to the label printer. however by embedding a command sequence at the start of the string we can also turn on or off the 4 relays, sound an alarm or request a re-transmission of the RFID tag numbers.

By having it on a micro controller we can reduce the complexity of the PC code and achieve a better reliability as well as achieving our goal of extending the distance.

The prototype is shown below (warts and all), the wiring changes were put in so that the RFID signals can trigger an external interrupt which improves the reliability of the soft modem. the project EDA files have all the modifications in for the second version

prototype

The Current MPLABX XC8 code for the PIC is here => main.c

Note the code is work in progress so check back for updates, most of it works but its not been tested under pressure, however it should give a feel for what the system does.

The only change I would make in a future version would be to use a switching regulator like an LM2596 which requires an additional 100uH inductor and a diode but then gives proper industrial power supply tolerance. My circuit is running off 9v as it supplies the RFID’s their power so the LDO gets warm when all the relays are engaged and it pulls 250mA peak, however I am only using 1 relay here so max current is <100mA and there is no reason for me to fix this.

 

Top




Shares