-1

I have an RDM6300 RFID writer/reader. It can read RFID Tags and it sends the data via UART to a microcontroller. So far I worked with multiple Microcontrollers from which ones the STM32F04 had the most UART "ports" (8 transmitters and receivers). The Arduino has got a few, but it is not enough.

I want to have 25 RFID readers (that are reading almost at the same time), but I can't find a way to send data from all the readers to one microcontroller.

Is there a way how can I connect 25 readers to ONE microcontroller?

gre_gor
  • 6,669
  • 9
  • 47
  • 52
szilard1996
  • 47
  • 2
  • 6
  • 2
    If they will be transmitting at the same time, you need enough pins and processing power to handle all of that. Perhaps the easiest way would be to use multiple small microcontrollers that will buffer each individual connection, and then go through them one by one to aggregate the results. – Bartek Banachewicz Feb 13 '19 at 13:35
  • If I understand right the RDM6300 uses ttl level uart signals so unless you have 25 of these next to each other you are likely going to need RS232 or other say RS485. LIkely going to want an mcu next to each and then a central place to combine/check the tags. something like RS485 or CAN or something like that can be used to connect all of the readers plus this central controller together. – old_timer Feb 13 '19 at 15:15
  • if you simply want 25 uarts then you may struggle with that and a single mcu, you can daisy chain a bunch of i2c uarts perhaps off of an mcu but can you service them fast enough? will still need mcus next to each rfid reader. So something multi-drop is the goal, ethernet even, stick some iot boards next to each one, RS485, CAN, etc... – old_timer Feb 13 '19 at 15:17
  • You can use a software uart implementation to implement more uart ports than you have in hardware. Depending on the uart speed and RFID communication frequency you will not be able to do a lot of other tasks on the controller because of high processor load. – A.R.C. Feb 14 '19 at 07:03

1 Answers1

1

You have 25 things transmitting at 9600 bps. You have an MCU running at 180 MHz with 8 UARTS and lots of timer capture channels (32 channels, 30 of them usable on the 100 pin STM32F427VITx). 8 of the 25 inputs are taken care of by the UARTS, 17 needs to be processed by other means. Connect them to timer capture channels.

The MCU runs at 180 MHz, the inputs change state at 9600 Hz, that means 18750 clock cycles between events. Should be way more than enough to process all of them, if you don't use HAL.

  1. read the timer status register, check for capture events and clear them
  2. check pin state, low means start of a frame
  3. store the capture register value for that channel
  4. keep checking for capture events
  5. if there is one, clear it
  6. read the capture timestamp, subtract the stored value from step 3 from it
  7. calculate the number of bits received with identical state
  8. keep doing it until you have 9 bits (start bit + 8 data bits) and high input on the pin

Do the above in parallel for all 17 channels. You need a suitable prescaler for the timers so they won't overflow while reading a full frame (9*18750=168750 cycles)