arduino project hub
Today we are going to use an M FRC 522 RFID module that is connected to a relay module to turn a desktop computer on or off last cow. The code is basically taken from an RFID door, lock tutorial that I saw a couple of days ago. I just made some tweaks here and there for it to publish my goal. So here are the things that we need: a bunch of male to female jumper cables. An RFID module relay module, an RFID card in an RFID key, an arduino uno board, a 9 volt DC barrel, jack cable and a 9 volt battery and last, but not the least a screwdriver. Let me just get these things out of the way before you do anything else, download the EM FRC 522 library, if you haven’t, downloaded it yet and make sure that the pin headers of your RFID module is already soldered. The link for the library and project file, including the visual wiring diagram that I made, is in the description below after downloading the file and installing the library we need to connect the RFID module to the Arduino. First then connect the relay now for the wiring part. Here’S, a visual wiring diagram that I made using photoshop, so let’s connect the 3.3 volts of the RFID module to the 3.3 volts of the Arduino rst to p9 of the arduino or anywhere from pin 2 to pin 13 GND or ground of the RFID module to The GND of the arduino irq we’ll leave it blank miso is connected to pin 12 ma c is connected to pin 11 SC k is connected to pin 13 and SDA is connected to pin 10.
Now that the first module is all wired up and connected to the board, let’s open up the arduino ide software do some tests and get the new ID of the part, because we will need that later. Music click on file examples find the M, FRC, 522 library and dump info to get the UID of the cart Music, just to make sure that the library is properly installed. Let’S click on sketch then manage libraries, Music, then search for em FRC 522. There. It is it says here that the version one point three point six is installed. Also, we can see on the code that it has a serial print line, so let’s open up the serial, monitor tube, just click on Tools, then serial monitor, but make sure that the board is connected to the computer too. Music Applause, Music click, the check symbol to validate the code, then the right arrow to upload it to our board then place your RFID card near the module for about 10 seconds to get the info there. It is that’s what we need now let’s test. The key fob Music and there the code is working and we installed the library and wires properly after testing the code, end module close the IDE program and open a new one Music. Then click file and new then open and find a project file that you downloaded. Oh and yeah, we need to connect the relay module to the board Music.
So here is the code. These are the two you IDs that we got earlier from the dump info. They will perform certain actions together with the relay, depending on which one we placed here. The RFID module just like before click the check to validate then right arrow to upload now let’s test our code Music and there you go it’s working properly Music. Once you are contented with the delay, count connect the ground or dark colored cable to the center terminal or cone Music. Then the bright colored cable to the normally open terminal, Music after testing let’s, remove the USB connection, connect the battery and test it again. Music, all righty. Now we just need to remove the side panel of the desktop computer and turn off the power supply. Jeez. Look at that fails on the filter, Music, locate, the power switch pins that are connected to the motherboard Music. I think this is it Music, yep, power, SW or power switch remember how they are connected, in my case, it’s positive on the right indicated by the arrow symbol and negative on the left, disconnect the cables from the switch and connect the ones that are connected to The relay the right colored one is positive in dark colors one is negative after that connect the 9 volt battery to the Arduino and turn on the power supply. Music. Okay, here is the RFID card place the card near the RFID module and tada Music to turn it off.
We will use the RFID t a word of caution. This key fob, shut down is just for demonstration. It is not safe to shut down your PCB screen. Music there we go let’s, try that again, Music. Now here it is connected to another power source. This time on an adapter. The board is placed inside a botched project box on top of the SSD and the RFID module is taped on the removable thingy for the hot swappable drives, and the relay module is just hanging there I’m going to turn the switch to turn on the Arduino board. Here is the part we can see a green colored LED. I was not expecting this apparently that green LED is from the Arduino and just being reflected by the LED bulb cover of the case that’s, where a now let’s turn it off again. A word of caution. This key fob shutdown is just for demonstration. It is not safe to shut down your PC this way, Music. There you go let’s, try that again and that’s all for now.
arduino project hub Video
[mam_video id=dfLldGzIo98]
[mam_tag id=1057]
arduino project hub news
-
Posted on Tuesday September 10, 2019
Training in Arduino basics for students The HinduThe Innovation Hub of the Regional Science Centre, Kozhikode, is organising a three-day workshop titled “Arduino for school students”, from September 13 to … … Continue Reading » -
Posted on Tuesday September 03, 2019
Lion cuts milk spoilage on Australian farms with IoT iTnewsLion, home to milk brands like Dairy Farmers and Pura, is using internet of things (IoT) technology to reduce milk spoilage on farms by remotely monitoring … … Continue Reading » -
Posted on Friday September 06, 2019
Maker Faire® Milwaukee – the “Greatest Show (& Tell) on Earth” – announces its Sept. 14 – 15 event schedule and there is something for everyone urbanmilwaukeeFamilies will be able to meet Maker exhibitors, participate in hands-on workshops and experience tech-inspired entertainment at the free admission Maker Faire … … Continue Reading »
arduino project hub Social
https://t.co/pZDoxD8HbF
https://t.co/uRqoTHY6lw
https://www.pinterest.com/pin/35465915794474667/
https://www.pinterest.com/pin/35465915794474666/
https://www.pinterest.com/pin/35465915794474664/
hay i don’t understand please send me code urgent
Entertainment dude, it’s in the description.
i have a problem in this case
What case?
if i reconnect power cable the relay automatically on
Please double check your wiring and code.
where from you
I can’t download the souce code..
Will you send me the code?
Here is my email address: [email protected]
https://create.arduino.cc/projecthub/Heathen_Hacks-v2/rfid-relay-rfid-door-lock-code-rfid-pc-switch-eee1d1?ref=user&ref_id=550502&offset=0
https://github.com/miguelbalboa/rfid
https://drive.google.com/file/d/1SIZKCLsNJgMqtxfzaIJA-Bh2E_7K0JwA/view
Why can’t you download it? It’s available for download, sir.
works perfect !!! thanks a lot. I use it for opening a gate with 200 users with entries countdown , when I’ll finish I’ll uploat my code and project
Oh, right! I forgot to mention that an ATMEGA328 chip can only store about 50-ish tags if I am not mistaken. I remember reading that somewhere.
it worked perfect for 40 tags with 30 entries, plus 10 master cards . ordered an Arduino mega rev 3 for it
I see. If all else fails, I think an SD card module would come in handy. That way, you could maybe store more than 200 entries. Not sure tho. Just a guess.
@HeathenHacks thanks for your answer! I thought about sd card, I should get one that I’v ordered in few days and I’ll give it a chance. Anyway, I alredy ordered the Mega so I’ll try both…
Great day !!!
You can also check out the arduino forums if you ever encounter some problem. Goodluck! 😀
Eut
Dude! For this project much better is arduino leonardo or other board based on atmega32u4 mcu and keyboard/mouse library 🙂
Here is begin of skech, rest is in your mind! Good luck!
#include
Keyboard.begin();
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press(KEY_LEFT_ALT);
Keyboard.press(KEY_DELETE);
Keyboard.releaseAll(); delay(200);
Hi,
Can I use Arduino Pro Mini instead of Arduino Uno ? Because I lack of room, If yes please what do I have to change to make it work ?
Thanks
Hi there, thanks for the comment! ♥ Sorry if my comment is delayed, I remember posting a response last night, but it didn’t came through for some reason.
Yes, you can definitely use a Pro Mini, I think.
I think think the only thing that you have to change is where the connections are.
Check this link for an example: https://www.circuito.io/static/reply/index.html?solutionId=5c485b8e1e2e250030e863f7&solutionPath=storage.circuito.io
There is compilation error occuring
Hi, Rama! Thanks for the comment! ♥ Can I know what kind of error was it? I mean, what does it say exactly?
@HeathenHacks’MFRC522′ file not found
@rama bindal Hmmm… Interesting… Have you downloaded the MFRC522 library? It’s located just below the code on my Arduino Project Hub Project. Here’s the link.
https://create.arduino.cc/projecthub/Heathen_Hacks-v2/rfid-relay-rfid-door-lock-code-rfid-pc-switch-eee1d1?ref=user&ref_id=550502&offset=9
hello i want to modify that the key fob is in contact it turns it on and is on until it’s touched again to turn it off where do I need to make the changes. PS great video
Hello Aku! Thanks for the comment! ♥
I compiled it and it did not have any problems, however, I am not sure if this is the code that you need.
First, remove this from the original code.
“void close_lock2() { // You can also just use the card to shutdown your PC. This is just for those moments that you really need to shut it down quickly.
//Use this routine when working with Relays and Solenoids etc.
digitalWrite(lock2, HIGH);
delay(5000);
digitalWrite(lock2,LOW);
}”
Then, replace this one.
” Serial.println(read_rfid);
if (read_rfid==ok_rfid_2) {
//ok, open the door.
close_lock2();
} ”
With these.
Serial.println(read_rfid);
if (read_rfid==ok_rfid_2) {
//ok, open the door.
digitalWrite(lock2, HIGH);
}
Serial.println(read_rfid);
if (read_rfid!=ok_rfid_2) {
//ok, open the door.
digitalWrite(lock2, LOW);
}
Hello! It’s me again. lol. Sorry for the delay.
I think I might have found the answer.
So, basically, just remove anything with “open_lock2”, “rfid2”, or “lock2” on the code and replace the delay on “void open_lock()” with 5000 and that’s it.
Please let me know it it worked. Thanks.
good video, I’m doing the same project with fingerprint, and I’d like to see your code, but you can not :(. Greetings from Barcelona
Hello, Sillithus! Thanks for the comment! ♥ The link for the code is in the Description. Hmm.. I guess, I should’ve made it more clear.
Anyway, go to this link to see and/or download the code if you want. 😀
https://create.arduino.cc/projecthub/Heathen_Hacks-v2/rfid-relay-rfid-door-lock-code-rfid-pc-switch-eee1d1?ref=user&ref_id=550502&offset=0
Thanks for posting this tutorial. It is a good overview of the different components one might want to use, not necessarily in that order, in order to turn on or off certain equipment.
Hello, Emanuel! Thanks for the comment! ❤️
Ginawa ko po yang project nyo pero yung relay di okay diko alam gagawin siguro sa codes kasi pag gumamit ako ng ibang code gumagana naman yung relay
Hi Heathen Hacks..!!
Can you give a valid link for Project File + Visual Wiring Diagram… Because, i cant proceed the following procedure for Relay.. Please reply Asap.
Hello, Danesh! Thanks for the comment! ♥ Please just use the Arduino Project Hub link that is in the description. The Project File + Visual Wiring Diagram are also there. Thanks.
@HeathenHacks the link you have attached is not working.. please check.. I need the RFid Relay file… Thank you
It’s working on my end. I even checked it on a mobile device.
@HeathenHacks sorry for disturbing you.. is there any other link for the project file? or can you please email it to me at [email protected]
Hello, Danesh. The project file is just a code. If you copy the code on my project hub link, you can just paste that code on your Arduino IDE.
Or, you can even download it from there by clicking the download button.
Here is the link that will direct you to the code:
https://create.arduino.cc/projecthub/Heathen_Hacks-v2/rfid-relay-rfid-door-lock-code-rfid-pc-switch-eee1d1#code
If you want to see the wiring diagram, just scroll down a little.