PinSafe

by JustRobbsta in Circuits > Raspberry Pi

358 Views, 4 Favorites, 0 Comments

PinSafe

IMG_20190616_095947.jpg

This safe is mainly used for keys. And used for people with sleeping accommodations. When the hosts aren't home they can give them a Pincode that they activate on the site. When the code is inserted in the safe it gets deactivated.

Supplies

Electronics (included in BOM):
LCD display

  • 3*4 Membrane Keypad
  • PIR-Sensor
  • 2 x Hall-sensors
  • 3 x Led light
  • Speaker
  • RFID
  • Servo motor
  • Raspberry Pi
  • PCF8574
  • GPIO-extender
  • 9V power-adapter
  • 9 1kOhm resistors
  • 1 470Ohm resistor
  • Breadboard
  • Jumper wires

Other (Not included in BOM):

  • Magnetlock 4kg
  • 39cm hinge, 25,5cm hinge
  • 1 small door knob
  • 2 small magnets
  • plastic sliding lock
  • Nails
  • Multiplex
  • wood

Circuit

Project1SketchBreadboard_bb.png
Project1SketchElectricSchematic_schem.png

LCD:

  • VSS - GND
  • VDD - 5V
  • V0 - Trimmer
  • RS - GPIO16
  • R/W - GND
  • E - GPIO12
  • DB0 - GPIO25
  • DB1 - GPIO24
  • DB2 - GPIO23
  • DB3 - GPIO26
  • DB4 - GPIO19
  • DB5 - GPIO13
  • DB6 - GPIO6
  • DB7 - GPIO5
  • LED(+) - 5V
  • LED(-) - GND

RFID:

  • 3.3V - 3.3V
  • GND - GND
  • MISO - GPIO9 (MISO)
  • MOSI - GPIO10 (MOSI)
  • IRQ - GPIO27
  • RST - GPIO22
  • SDA - GPIO8 SPI_CE0_N
  • SCK - GPIO11 SCLK

3*4 Keypad + PCF:

  • Key 1 - P0
  • Key 2 - P1
  • Key 3 - P2
  • Key 4 - P3
  • Key 5 - P4
  • Key 6 - P5
  • Key 7 - P6
  • A0,A1,A3,GND - GND
  • VCC - 3.3V
  • SDA - GPIO2
  • SCL - GPIO3

Servo:

  • + - 5V
  • - - GND
  • pulse - GPIO18 PWM

Hall 1:

  • GND - GND
  • Vin - 5V
  • S - 1kOhm resistor - GPIO 21 - 1kOhm resistor - GND

Hall 2:

  • GND - GND
  • Vin - 5V
  • S - 1kOhm resistor - GPIO 4 - 1kOhm resistor - GND

PIR:

  • GND - GND
  • SDA - 1kOhm resistor - GPIO 20 - 1kOhm resistor - GND
  • Vin - 5V

Casing: Frame

IMG_20190611_184702.jpg
IMG_20190611_184716.jpg

Now that you have the electrical circuit you can start putting it in the case.

We begin by making the frame

  • The Height without the roof bit is 44.2cm
  • The Width is 31.2cm
  • The Roof frame height is 10.6cm

Casing: Door

IMG_20190611_184750.jpg
IMG_20190611_184756.jpg

The door is 25cm on 11cm

It has a door knob, a magnet for the magnet sensor, an iron plate for the magnetlock and a hole for the sliding bolt.

Casing + Component: the Lock + Magnet Sensors

IMG_20190611_194447.jpg
IMG_20190611_194457.jpg
IMG_20190611_194506.jpg
IMG_20190610_231006.jpg
IMG_20190610_230913.jpg
IMG_20190611_194453.jpg
IMG_20190611_194501.jpg

We make the box behind the door and the lock for it.

The lock is moved by the sensor with an iron string. There is a magnet attached to the bolt so the magnet sensor can detect it if closed. The servo part's width is 8cm.

One sensor is mounted in the frame thats pointed towards the door so it can detect the door magnet.

The other one is mounted under the lock. So it can detect the lock magnet.

Casing + Component: Roof + PIR

IMG_20190612_112854.jpg
IMG_20190611_184722.jpg

The PIR is mounted in the roof bit centrally. the PIR casing is 2.5cm on 2.5cm.

Components

IMG_20190616_095947.jpg
IMG_20190616_100222.jpg
IMG_20190616_100005.jpg
IMG_20190616_100215.jpg

The LCD is mounted next to the door.

The Keypad is mounted under the LCD with the cable through the small hole.

The Led lights are mounted inside the headlight above the door.

The RFID is mounted inside the casing so we can badge.

The Database

Screenshot 2019-06-16 at 12.24.53.png

Code (Github)

Finished Product

IMG_20190616_095836.jpg
IMG_20190616_100005.jpg
IMG_20190616_100010.jpg