Need Help on EM-18 reader module and arduino ||Want to read RFID continuously/ periodically
-
@salmanfaris ok, lemme try
-
@kowshik1729 yup. I had seen it somewhere
-
@kowshik1729 i am working on it. When vcc is reconnecting the module re-reads the card. It take about 1 seconds maximum to read it.
-
@shahidpk There we go. Now rapidly power off and power on the module to continously read the card data.
Now I would like to tell a mistake which everyone does commonly whenever I tell to rapidly switch off and on the board. The first thought that gets in your mind is to connect the VCC of the Em-18 board directly to the Arduino's any of the digital pin and toggle that pin at a delay. Right?
It is a bad thing to do so. Because we do not know how much current does EM-18 reader module sucks from power supply while powering on. So, if it sucks more than 40mA from the Arduino's digital pin then there is a huge chance that the board can get damaged and eventually your USB port too. So, what is the work around in this case?
The best practice I would suggest is to "Take a MOSFET, and connect the Gate terminal to the digital pin of arduino. On the drain pin connnect the power supply and on the source pin connect the EM-18 module's VCC pin. This is how you will be able to short the Drain and source gates by giving Gate voltage from the arduino."
In this way you can protect the EM-18, Arduino as well. So, please do try this method, as far as I thought this would do the job.
-
@salmanfaris i have tried in all my ways... when power on in the absence of card. Shows no card. And led connected to indicate it is low(set by program on arduino pin 3). When card is placed it reads card and led light up. BUT it stay on always till power off. And once the card is placed. Then there is any change if card is removed. I noticed that by placing an led on tx pin of module, there is always a high signal from module. And when card is placing a small blink is seen. I think data stream.
-
@kowshik1729 a simple npn transistor such as BC547 is enough for this.No need of MOSFET. EM-18 module draws 50mA current. I already tried it. But, No luck. I think, any changes are needed in my code.
-
@shahidpk I see. Can you please share the code?
-
@shahidpk I think switching power on/off is not a good option, instead of that, you can try to set Flag for a particular ID and check ID in a time interval and run you task that time interval. Did you check that?