Medicine Safe

by DSCodings in Circuits > Arduino

1901 Views, 21 Favorites, 0 Comments

Medicine Safe

Medicine safe

We created this project for MSReva as an assignment from school.

Supplies

Laser or print all parts (see githup):

printed parts:

1x: 14 lock pin sleeve large

1x: 15 lock pin sleeve smal

1x: 17 lock counter pin

1x: 18 pin shooter

14x: 19 tray shelf

4x: 22 leg mounting corners

4x: 22.1 mounting brackets instead of bolts

4x 23 mounting brackets 3 sides

2x: 24 fixing corners 2 sides

1x: 27 servo arm

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.)

1x: 25 door handle

1x 16 slot servo holder

Trays

Lasered parts(3mm thickness plate):

All 1x:

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

Step1.png

Make sure you arrange the inside back plate and inner side plate as on the picture above.

Step2.png

Build the plates together as shown above and search the bottom plate.

Step3.png

Put the construction on the base plate and search the cover plates.

Step4.png

Connect the cover plates as shown above and search the top plate.

Step5.png

Connect now the top plate and search the back plate LCD.

Step6.2.png
Step6.1.png

Put the plate on top of the construction and search the side plate and the side plate with RFID.

Step6.1.png
IMG_2279.jpg
Step6.2.png
Schermafbeelding 2021-05-31 om 17.09.00.png

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.

Step7.2.png
Step7.1.png

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

Step8.png

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

Stap9.2.png
Step9.1.png
Step9.png

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

Step10.png

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.

Step11.1.png
Step11.png

Place the lock on the 4 holes of the front plate and fix it with 4 M4 bolts and nuts.

Step12.2.png
Step12.1.png
Step12.png

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).

Step13.1.png
Stap13.png

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).

Step14.png

Now mount the remaining mounting points of the hinges to the front plate also with M4 bolts and nuts.

Step15.1.png
Step15.jpg

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.

Step16.1.jpg
Step16..jpg

Then screw it down like the pictures above with m4 bolts.

Stap17.png

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.

Step18.png

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).

Step19.png

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.

Step20.jpg
Schermafbeelding 2021-05-31 om 17.09.00.png

Then you solder everything on to a breadboard on top of the top plate as above. See connection on the picture above.

Step21.jpg
Schermafbeelding 2021-05-31 om 17.09.00.png

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.

Step22.png
WhatsApp Image 2021-07-01 at 18.42.23.jpeg

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.

step22.jpg

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).

Step24.jpg
Foto1.jpeg
Foto3.jpeg

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.

Step25.png

Then find the top plate and 3 bolts of M4 and screw it on like the picture below.

Installation

instalisation.png

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:

LiquidCrystal_I2C.h

MsTimer2.h

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.

Have Fun

Foto1.jpeg
Foto2.jpeg
Medicine safe