Multiple RC522 over long distance is my target in short my target is to connect 10 RC522 with one Arduino mega board and that was success however in my final design the Arduino is about 10 meter far from the RC522 module and i can't connect each module with it's Arduino.
so how i can make that
Maybe put your existing setup where you want the RFID sensors and use 433Mhz modules to broadcast the results to a second Arduino 10 metres away located where you plan to do something with the results ?
Anything seems possible when you don't know what you're talking about.
@will is there any way to use wires and the 433Mhz module need an Arduino but i need to use one Arduino board not many ones
You'd probably need some kind of booster(s) to get that kind of range from a wire, which would mean more power sources and components. I have no idea what that might do to timing of the signals.
I've never used wires for anything more than a couple of feet, so I'll defer to somebody with more experience.
Anything seems possible when you don't know what you're talking about.
yes i think so that's what i'm looking for some kind of booster
Mmmmmm...... Any one can help plz ASAP
You can communicate to it through UART and use an RS-485 module on both ends. TX would be MISO and RX would be SDA(I believe it is only for addressing but I would have to read further). It senses what logic it is using based on the levels it receives so you might need to make sure the board you have does not have any components in circuit with those pins. Look at table 5 in the datasheet. UART is 8.1.3
RS485 modules are fairly cheap and the main go to when sending data over longer distances. Your module is RS232(well, RS232 compliant) but it can be converted to RS485 for the longer distance. It would be over CAT 5 or at least a twisted pair. I would test it out without the RS485 first and if it is successful, then move to RS485.
You would have to find a way to address it. Or if that was the only one ran that way you wouldn't have to worry about it. If you have the space, you can keep the others on I2C. Unfortunately I do not have enough information to add to this. All I know is that you are using a Mega and 10 RC522 modules. I have no idea what pins you have open(and in this case there are a lot choose from). I don't know what the conditions are that prevent a separate micro from being on the modules end.
I do know there are I2C boosters but when I did a quick search, I only found a few ICs. Not to mention that is not the intended application for them. They are meant for going from one equipment panel to the next(or close to that).
I have no idea what pins you have open(and in this case there are a lot choose from)
The project i'm working on is still on going so all the pins are free.
I don't know what the conditions are that prevent a separate micro from being on the modules end
* First the cost I'm from Egypt all this staff here is so expensive
* Then the space i have limited space for the project
My project is a door control and electricity control so to enter the room u need access key after that you will leave the key in the other reader so you can use the electricity when you remove the key the electricity will go off
Hi @blackghost,
I think @madmisha has provided some good hints as to how it could be achieved. It is probably feasible, but may require wiring chips directly, and obtaining the chips may be difficult.
However, I am left wondering if a mechanical keyswitch arrangement, in which the key can only be removed in the 'off' position would be simpler, and assuming this project is about maintaining safety, also easier to show it meets the requirements without worrying about software bugs, etc.
Of course, that may not meet your other requirements.
As to the question of how to make RS485 work with 10 of the RFID modules. If you only have one out of range then you could keep the others on I2C and after polling them just poll the other with the UART.
I did find a I2C extender(kinda) module. https://www.adafruit.com/product/4756 It does not work how I would have thought and personally I wouldn't trust it. But I had some better google foo and found this amazing thing but it unfortunately is retired! That is a shame because it would be really nice to have an easy I2C to ethernet cable.
Edit: Ok, I did find this Endpoint. You would put one of these on each side and they even have one that would go in middle.
My project is a door control and electricity control so to enter the room u need access key after that you will leave the key in the other reader so you can use the electricity when you remove the key the electricity will go off
Then I presume that the 10 RFID readers are to allow up to 10 people to get through the door and use the room "electricity".
If all you need is to allow the door to open when somebody "new" enters their card, then you only need one control line OUT to the electronic door lock. You can tell when a new card is read by continuously polling the readers and noting when a card is found in one that was previously empty. Then you'd trigger OUT to the door lock to allow it to open.
If all you need is 1 or more person(s) remaining in the room to leave the "electricity" on, then all you need is 1 control line to trigger the electricity.
So, you'd only need 2 pins out of the uController. So, you can leave the controller and RFID readers near the door and just trigger an SSR or relay to power the door unlocked and, similarly, one control line to enable the room electricity.
No need to run long leads to the RFID readers.
Anything seems possible when you don't know what you're talking about.
My project is a door control and electricity control so to enter the room u need access key after that you will leave the key in the other reader so you can use the electricity when you remove the key the electricity will go off
Then I presume that the 10 RFID readers are to allow up to 10 people to get through the door and use the room "electricity".
If all you need is to allow the door to open when somebody "new" enters their card, then you only need one control line OUT to the electronic door lock. You can tell when a new card is read by continuously polling the readers and noting when a card is found in one that was previously empty. Then you'd trigger OUT to the door lock to allow it to open.
If all you need is 1 or more person(s) remaining in the room to leave the "electricity" on, then all you need is 1 control line to trigger the electricity.
So, you'd only need 2 pins out of the uController. So, you can leave the controller and RFID readers near the door and just trigger an SSR or relay to power the door unlocked and, similarly, one control line to enable the room electricity.
No need to run long leads to the RFID readers.
the project for 5 rooms etch room have 2 RFID one for the door and the other for Electricity and all controlled by one Arduino board mega
OK, that helps clear things up. However, I'm curious why you need two RFIDs per room. Do you allow people in but deny them electricity or possibly turn on the electricity but refuse to let them open the door ?
Why not just 1 RFID per room and that does both: unlocks the door and turns on the electricity. When the card is removed turn off the electricity and re-lock the door ?
By the way, what happens if somebody enters their card, then goes into the room and while they're in there burning up the electricity someone else comes along and takes their card (thereby leaving them alone in a dark locked room) ?
Anything seems possible when you don't know what you're talking about.