» Electronics » Arduino »RFID Tag Open Stash

RFID Tag Cache

RFID Tag Cache

Greetings to all readers and amateurs to do do it yourself something useful (or not very) and beautiful (how to get it). I have long wanted to make myself a personal cache. Hide something valuable there or put aside for the purchase of a robot vacuum cleaner. In general, use cases can come up with a ton. However, as well as options. Starting from the cache inside the system unit (cache from the hard or CD-ROM), continuing with the cache in the form of a book and of course the version with a cache in the wall. I have a box with a nice engraving, it is large enough. It stands on a shelf, not particularly attracting attention. Here we are going to make a cache out of it today. To embed a small lock in a box is an activity for wimps. My casket will open the rfid tag. The brain will become, as usual, Arduino. Let's start collecting everything you need:

- A casket or something like that
- Galvanized sheet
- Arduino (any compatible board, better smaller, for example, Arduino Pro Mini)
- RFID module RC522 13.56MHZ
- Keychain for this module
- Servo SG-90
- connecting wires
- Battery compartment 4 x AAA or battery
- Double sided tape
- Hammer
- Soldering iron and everything to it
- Scissors for metal
- drill
- Metal drill 2.8 mm
- Hot glue

Step 1 Basis of the cache.
So, a large number of caskets or boxes are suitable as a basis for a cache. I’ll take a wooden box, which comes off by moving the lid up or down, like a “slide”. The dimensions of the casket are 18 x 16 cm and a depth of 5.5 cm. True, part of the space will be occupied by electronics and a latch, but 18 x 10 cm will remain for the cache. I think that’s enough. If you want to repeat exactly my cache - you just need to order a similar box. You can also make it yourself, there is nothing particularly complicated about it, you only need 6 mm thick plywood, a jigsaw and patience.

Step 2 Making the latch.
The most time-consuming and complicated is the manufacture of a latch for a casket. This latch is suitable for any cover that slides. We will make a latch from a galvanized sheet. But first you need to transfer the next scan to the paper. A scan is much easier to spread on paper than on a galvanized sheet:


Dimensions are in mm, sweep width 40 mm. Cut this rectangle out of paper. I use double-sided tape to glue a scan to galvanize:


We take scissors for metal (now it is better to put on gloves so as not to cut ourselves on sharp edges) and cut out the rectangle first. Then we make incisions along solid lines, and we will bend along dashed lines.Where the part is folded in half, it should be properly flattened with a hammer. Also in the drawing, crosses mark the places (only two), where you need to make holes of 2.8 mm. The result should be the following:



This is the first part of our latch. We pass to the second. We also deal with it, first we make a drawing on paper:


Then, using double-sided tape, glue it to galvanize:


As well as the previous time, we first cut out, and then bend the part. There are also two holes with a diameter of 2.8 mm:


After all that has been done, both parts should be filed to remove sharp edges and burrs. Parts are assembled together using a nail of a suitable diameter:



The latch turned out to be of insufficient height, so we cut out rectangles of 5 x 4 cm from plywood, it is necessary to choose so that the upper part of the latch reaches the cover. Lining should be like this:


In the upper right corner of the box we glue the required number of pads, on top, I use self-tapping screws or the same hot-melt adhesive, we fasten the latch. It is also necessary to install a spring in front of the latch, so that the latch rises up:


We go further and now take a servo in our hands. We need to set the servo to 90 degrees. You can do this by putting a lever on it, and gently turn it so that the stoppers on the main gear are in the middle. Be careful using this method, it is likely to damage the plastic gears. The second way to install the servo is to fill in the sketch in Arduino, which will set it to the position of 90 degrees, this method is longer, but safer. After the operations done, we put on the servo a small lever that comes with it, so that the lever is parallel to the servo, we screw in the screw so that the lever does not pop off:


The prepared servo is latched. The lever should go from the center of the latch to the edge:


Thus, at a position of 90 degrees, the lever does not touch the latch; when turned through 170 degrees, the lever raises the edge of the latch. In this way, the latch is lowered and we can open the lid.

Now we take 3 mm thick plywood or fiberboard and cut out a 18 x 5 cm rectangle. This will be the partition separating the mechanism from the cache space:


Install it as shown in the photo:


In order for the latch to fix the cover in the closed position, you must install the counterpart on the cover. The reciprocal part will be a 1x4 cm rectangle cut from 1 cm plywood. The counter part can also be made of plywood a little less thick or cut from a suitable board. Or glue a galvanized corner.

Step 3 Electrician.
As I said before, Arduino will manage everything. I have a big box, so I'll take the Arduino Uno. You can take any compatible fee. In my opinion, the Arduino Pro Mini is best suited here. It is the smallest of inconveniences - you will have to use USB-TTL to upload the sketch to it.

We connect the RFID module RC522 13.56MHZ module according to the following scheme:


Please note that RFID modules work from 3.3 V.
For power we will use 4 AAA “pinky” batteries. We supply power from the compartment with these batteries to the Arduino pin Vin. The servo drive is powered from the battery compartment, and the signal wire from the servo is connected to the D8 Arduino. We place everything inside a place specially designated for electricians and latches:


Step 4 Prepare and fill the sketch.
First, go to Arduino official website

And download the Arduino IDE. Unpack the archive with this program or install using the installer. The sketch uses several libraries. “Servo” - used to control the servo drive:

Download

The second library we need is MFRC522. Download the archive with this library:

Download

Both archives should be unpacked into the “libraries” folder, which is located at the Arduino IDE installation location.
Before final assembly, it is better to fill in a test sketch in Arduino:

Download

Enter 90 in the port monitor first, thereby instructing the servo-driver to turn the lever 90 degrees. Then enter 170 the servo should rotate to a position of 170 degrees and open the latch.
After making sure that the latch works normally, does not jam and the servo drive lowers the latch enough, you can fill in the sketch necessary for the cache to work:

Download

Cache Rating
Total Voters: 10
10
10
10

Add a comment

    • smilesmilesxaxaokdontknowyahoonea
      bossscratchfoolyesyes-yesaggressivesecret
      sorrydancedance2dance3pardonhelpdrinks
      stopfriendsgoodgoodgoodwhistleswoontongue
      smokeclappingcraydeclarederisivedon-t_mentiondownload
      heatirefullaugh1mdameetingmoskingnegative
      not_ipopcornpunishreadscarescaressearch
      tauntthank_youthisto_clueumnikacuteagree
      badbeeeblack_eyeblum3blushboastboredom
      censoredpleasantrysecret2threatenvictoryyusun_bespectacled
      shokrespektlolprevedwelcomekrutoyya_za
      ya_dobryihelperne_huliganne_othodifludbanclose
13 comments
My opinion is that the battery compartment needs to be made with a lid on the outer wall, then in the event of a low battery, you can simply change them without breaking the box. And the second point: it’s not so secret, you can open by inserting a thin blade into the gap between the lid and the box, sliding the latch, you really need to know where to put it))).
Author
You are right about the sketch. I mixed up the sketches and archived one of the Rfid library examples. I took this example as a basis. How to get laid out normal
Sorry, I became really bad. I see that Uno, that 4 batteries.
I did not find the original code for your homemade article, maybe I just didn’t see it either.
Author
Good afternoon. The manual says, "For power we will use 4 AAA" pinky "batteries.". If somewhere it is indicated that 3 batteries are a typo, indicate it - I will fix it

Yes Arduino gluttonous. I am going to add an output for connecting external power, in case the batteries run out. I’m also working on a new version of the sketch, it will enable sleep mode, this will increase the battery life. How to add-lay out
Author
Good afternoon. Comrade miguelbalboa wrote a library for working with Rfid. I used parts of the code from examples of this library for my sketch. All original page links on GitHub are saved in both the library and the sketch.

As for my sketch, I’ll check, maybe I mixed it up and uploaded the wrong file.

As written in the instructions I used Arduino Uno:


This can be seen in this photo. I specifically highlighted where the Arduino Uno lies. It lies sideways, but there you can clearly see the size and power socket, which is not in the Arduino Nano

It is not necessary to order exactly the 3.3v version, you just need to add a 3.3 volt stabilizer for Rfid to the circuit.
Supply from 230 volts via a transformer. Or learn to use sleep modes. There is no need for the constant operation of this system. You need some kind of button so that the RFID, along with the arduino, woke up on demand (interruption).
Well, yes, the voltage changes three times, which means that the power supplied changes three times, and the capacity drops three times. Day means this work will work.
Eig
Three batteries in series ... the capacity of one pinky battery is 1200 mAh. Three batteries, respectively, 3600mAh
Capacity will be no more than that of the most frail batteries in the circuit! yes
And what should the Author do? Although I’m not an Arduino, but ...
Pin vin y Arduino Nano is designed to be powered from 5 volts. Three batteries in series are 4.5 volts. It is better to put at least 4 batteries to get 6 volts.
The maximum capacity of one pinky battery is 1200 mAh. Three batteries, respectively, 3600mAh. The power consumption of the Chinese Arduino Nano is 20 mA at 5 volts, about the same as the RC522. We divide 3600 by 40 and by 24 hours, we get a maximum of four days your box will live. This is without taking into account the short-term operation of the servomotor.
Do you think that the code of comrade miguelbalboa should be substantially simplified for your case? It uses three LEDs that signal the status of the door. He also uses a relay instead of a servo motor, and the code for the latter is commented out. Is your code somewhere that really suits your homemade product ???
Well, if you already use someone else's code, the rules of good form tell us that it is worth at least to mention the author of the original idea and thank him.
It is also written that you use Arduino Uno. I see the Arduino Nano.
Also, the Arduino Pro Mini does not have 3V3, you will have to order a specific version with 3.3-volt logic.
Well conceived, well done.

Mounted a number of such hiding places. True, they were opened either with a magnet, or with a key to a memorial key, or with a 433 MHz radio alarm key fob.

Some were further protected by an acoustic repeller, similar to what I posted on this site.

https://enm.imdmyself.com/15713-akusticheskij-otpugivatel-alkashej-narkomanov-vorishek-i-prochih-nezhelatelnyh-gostej.html

Some were also equipped with a light-shock device based on flash lamps IFK-120 and even IFK-500.
A good idea ...
He suggested that one acquaintance make a built-in safe with a secret lock in a niche. In a new apartment (brick) with niches. So he told me that he knows how to - a banking cell in a bank. And in a niche, he put a vase with fake flowers from a grave. derisive The design is cool. Wait, every third is a disagner.
Then he came in somehow, and he tells me that he was robbed by a repairman. Which he invited to the apartment for finishing linoleum and so on. He pulled money from his purse (in the hallway) and washed off. I did not remind him of the built-in safe ... Cho was upset just like that.

We advise you to read:

Hand it for the smartphone ...