Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years ago.
Problem to read from 2 RFID devices simultaneously
Hello,
I need to read RFID tags from 2 separate ID-12 reader. But this does not work when both rfid readers are connected !! No chars go out both ID-12 The code read well when only one rfid reader is connected (+5v disconnected on the other, not only Rx). One or the other work well, but not both simultaneously.
To do so, I connect 2 ID-12 respectively on rx pins 10 and 14. The code is : Print RFID tag numbers
include "mbed.h" include "ID12RFID.h" ID12RFID rfid1(p10); serial1 rx ID12RFID rfid2(p14); serial2 rx int main() { printf("test twin simultaneous RFID ID-12 devices \n"); while(1) { if(rfid1.readable()) { printf("RFID Tag number : %d\n", rfid1.read()); } if(rfid2.readable()) { printf("RFID Tag number : %d\n", rfid2.read()); } } }
I have suspected various hypothesis :
- not enough 5V supply (ID-12 require 30 mA, VU fall to 4,2V when both ID-12 are connected), but nothing better with and external power supply :-(
- devices may be too near from each other (RF could perturbate ?). Adding a long cable to have a 2 meter distance don't solve the problem :-((
- to see if there is RF influence, I tried 2 ID-12 but with 2 separate MBED : both work fine but separately :-(((
Anyone could suggest me what is wrong ?
Thanks in advance. Dominique