Intro: EAL-Embedded-Strongbox With RFID and LCD Screen
Arduino project with RFID scanner and LCD.
To conclude our course with micro controllers, more specifically the Arduino Mega which we have been using. We have been tasked with making a project that includes our Arduino Mega, other than that its up to us to decide on what to make with it. Since we haven’t had that much time to this project, we decided on a RFID scanner with a lock. This has been made a million times already, so we decided to add an LCD display to it. Which makes this project a little more unique. Although this has been done before as well, we decided that it would be fun anyway.
The first thing we did was check if we had all the necessary components to make this a reality, luckily we did. We decided that instead of making it a door lock, like you would traditionally, we decided it should be a lock to a strongbox or safe if you will. To do this, we made a wooden box, this was done with a laser cutter. We drilled and cut out holes and such for the components to fit in, that way it looked more realistic and a lot easier to manage all our wires and such. After we had made the box ready we simply put all our hardware and wires in, just plug and play basically. Since we had already tested and connected it beforehand. When its all connected and set up, all you need to do is ready a master key. This is done with the default chips you get with your RFID scanner, you simply load up the program and it will ask you to make a master key. When done so, you can choose to give access to other key’s. When you have all the key’s you wish to have access to your strongbox, you simply exist the setup with master key. Now when you scan your key, you can see on the LCD display whether, or not you have access. When you haven’t scanned any key’s, the LCD displays a text “Scan ID KEY”. When you scan a key and you don’t have access, it displays “Access Denied”, or if you have access it displays “Access Granted”. This is very simple and you can always write something different in the code, if you so desire.
Here’s the following components we’ve used in our project:
- RFID Scanner (3.3 V)
- LCD Screen 16x2 (5 V)
- Arduino Mega 2560 R3
- 12 V DC Solenoid
- 1x Blue LED
- 1x Red LED
- 1x Green LED
Step 1: Fritzing Diagram
Here’s a diagram over how to connect the components in our project.
Step 2: The Code
Here is the code for the project:
If you're having issues with scanning your ID key's;
If you're having issues with scanning your key's, It may be due to your EEPROM being full. This means that you don't have anymore bits free to use for your ID keys. You should only get this issue If you have used your EEPROM before. In our code we do have a step to wipe the EEPROM, but unfortunately it does not work as intended. Therefore you have to use Arduino's default EEPROM reset, its in the default libraries.
LCD issue with text not appearing as intended;
In our code we have an issue with our "IF" statment, which declares what text appears on the LCD display. When you have access and the LED is Green, it should write the following; "Access Granted". etc. It only displays when the Blue LED is on or the Red LED, this could be because its not in a "while" statment, so it doesn't check at all times, therefore it only fulfills some of the conditions. Unfortunately we haven't been able to solve this issue yet :(.
We have fixed the LCD issues with the text not appearing as intended, there shouldn't be anymore problems with the text not appearing correctly on the LCD display.
Step 3: Preview of the Project
Here you can see, how to add and remove the tag.
One of the tags is the Master key, with this you can change how many tags you want to have access to the strongbox.
Remove a tag, the same way you add a tag.