Medicine Safe
We created this project for MSReva as an assignment from school.
Supplies
Laser or print all parts (see githup):
4x: 22.1 mounting brackets instead of bolts
4x 23 mounting brackets 3 sides
3x: 26.2 hinge 0.2mm clearance or 26 hinge 0.2mm clearance
(If your printer is very accurate the 0.2mm would not be a problem, if you want to be sure use the 0.3mm.)
Lasered parts(3mm thickness plate):
20 tray partition: you can choose how many times you lazer it, it comes between the trays as a partition, you can lazer a total of 7x5(35).
parts:
1X: rfid-RC522 + batch/card
1X: arduino uno
1X: Servo SG90
1X: 1602 LCD I2C
1X: buzzor
4X buttons (14x20 round hole 12mm)
1x ac/dc adapter (6v)
Cables
1x breadboard (You can also make it without, but only makes it easier.)
The Start of the Built
Make sure you arrange the inside back plate and inner side plate as on the picture above.
Build the plates together as shown above and search the bottom plate.
Put the construction on the base plate and search the cover plates.
Connect the cover plates as shown above and search the top plate.
Connect now the top plate and search the back plate LCD.
Put the plate on top of the construction and search the side plate and the side plate with RFID.
You connect the cables from the RFID(on the IRQ comes no cable) to the Arduino, through the provided hole. You can find the electrical diagram here and above, you screw it on with m3 nuts on the inside and bolts on the outside and place the RFID inside.
Place the side plates as shown below. Make sure the plate with the logo is placed on the right.
Search the front plate.
Starting With the Door
Place the 4 buttons (14x20mm, hole 12mm), You can adapt the size of the holes if you want to use your own (github.) and solder the wires to the buttons and place it into the front plate.
LCD
Take the LCD and bend the headers as shown in the picture above.
Place the LCD in the rectangle (fix it with the M3 nuts and bolts and spacers so that the lcd is straight and flush with the front plate).
Lock
Build the construction as showen above with the servo, servo arm, servo slot holder and pin. First screw the arm to the servo, then insert the pin into the holder and place the servo with the arm through the protruding loop. Fix the servo with screws.
This will be used as lock. Make sure the servo is at 90 degrees.
Place the lock on the 4 holes of the front plate and fix it with 4 M4 bolts and nuts.
Now find the door plate, door handle, pin sleeve small/large, shooter pin and a spring. Mount the small pin sleeve and the doorknob to the outer holes, but on opposite sides (make sure the slanted side of the sleeve is on the outside, with M4 bolts and nuts). Insert the spring into the large sleeve and then the striker pin with the beveled side out and the protruding cylinder into the slot of the sleeve. Mount the large sleeve to the middle 2 of the door on the same side as the small sleeve (put the shooter into the small sleeve as well, also with M4 bolts and nuts).
Find the hinges and mount them to the door with M4 bolts and nuts (place the hinges on the outside of the door (make sure the button of the hinge is pointing outwards).
Now mount the remaining mounting points of the hinges to the front plate also with M4 bolts and nuts.
Place the front plate like the picture above: also find the fixing corners 2 sides and with a little glue attach the nut of m4, you do this 2 times.
Then screw it down like the pictures above with m4 bolts.
Take the 4 3-sided connecting angles and 12 M4 nuts, place the nuts in the indentations of the angles and secure them with a bit of super glue.
These corners hold the cabinet together at these 4 points with flathead M4 bolts (for now, attach them to the sides you have already assembled with the 3rd side pointing out).
You attach the Arduino with 3 nuts of M4 and bolts to put it at the right, put 3 bolts of m4 under the Arduino. make sure the usb input of the Arduino is in the front hole and the power adapter input is from below. use spacers of 10 mm hight.
Then you solder everything on to a breadboard on top of the top plate as above. See connection on the picture above.
Then you plug the cables into the Arduino. It’s possible that you have too few 5V ports, it depends on Arduino uno, then you must solder the 5v ports together. See electrical diagram above on how to connect it.
After this, you take (a jar) and an M3 (countersunk bolt), screw it down along the outside with a corner piece with the M3 bolt. You do this for both sides of the front plate. Use the mounting brackets instead of bolts (shown in white) instead of nuts, these will be tapped in when you screw in the bolts.
Do the same with the back plate (use a little glue to hold the connecting corners in place when the back plate is in place).
Then you take the layering for the benches and put them in place, you can't stick the layering wrong.
now you can put the trays with the partitions inside the safe.
Then find the top plate and 3 bolts of M4 and screw it on like the picture below.
Installation
First you go to github and download the program or installation.
than you connect a USB cable from the computer to the Arduino. When connected then you open the Arduino program and go to line 240-250 than see you like the picture above.
Fill in the master badge RFiD code in (e.g.: char masterCard[] = “9 160 86 233”) and for card1 the patient RFiD card. If you're not sure what the code is, you can always check that when you upload the code reader to the Arduino.
You can add more by:
char Card2[] = ""; If you want one for the patient, you use it to add a badge/card.
sleutelsPatienten.voegSleutelToe(Card2);
If you want one for the nurse, use this one to add a badge/card.
sleutelsVerpleger.voegSleutelToe(Card2);
or you can add and RFiD badge/card in the menu when it is on, you will be able to use that to.
If you get an error that the library is not found, then you need to add them:
RFID.h (you can find it in GitHub.)
Then you can upload it to the Arduino. Remove the USB and connect the power. And you see you can open the safe with your batch.