Smart Mailbox

by MatticeStruyve in Circuits > Raspberry Pi

359 Views, 0 Favorites, 0 Comments

Smart Mailbox

IMG_20210608_140423.jpg
Poster.jpg
Adafruit_1754_30133570-01.jpg
axirissensorc-web.jpg
display-elektronik-dem-16101-syh.jpg
KY-008_laser_transmitter_arduino_module.jpg
One Wire Waterproof Temperature Sensor DS18B20_1-1000x750.JPG
rain-drop-sensor-500x500.jpg
raspberry-pi-4-model-b-4gb_2.jpg
Solderless-Breadboard-Snap-Lock-830-Pro-Series.jpg
Tower-Pro-Servo-Motor-SG90-analog-Tower-Pro-SG90_b_0.JPG
31U4JA+4gVL.jpg

This is a little project I made for school. It's a mailbox that detects mail and measures the temperature and rain. Everything is saved in a SQL database and can be seen on the local Apache webserver. The door can be controlled from the webserver.

Code for door is can be setup at settings page.

Supplies

  1. Raspberry Pi (4 model B 2GB used)
  2. 16GB Micro SD Card (8GB works as well)
  3. Micro SD Card Adapter
  4. Breadboard
  5. RPi T-Cobbler
  6. LCD Display
  7. LDR
  8. Laser Emitter
  9. PIR Motion Sensor
  10. One Wire Temperature Sensor
  11. Raindrop Sensor
  12. Servo Motor
  13. MCP3008
  14. Potentiometer

  15. 1k & 4.7k Resistors

Fritzing

Fritzing Final_bb.jpg
Fritzing Final_schem.jpg

First things first, let's create the circuit. Make sure the 5V components(LCD, PIR & Servo) are connected to the 5V and the 3.3V components to the 3.3V

Database

Database Final.png

Step 2 is the database. I created a simple database that will save the history.

Raspberry Pi

vncviewer_1kTOq3wjdd.png

To get the RPi to work, you'll need to write an image on the SD Card, I use win32diskimager.

The image I used "Raspberry Pi OS with desktop".

Connect to the Pi via SSH or VNC and turn the right interfaces on.

The only interfaces we need are the SPI and One wire. Make sure to turn the others off because we are using their GPIO pins. SSH & VNC can stay turned on.

Coding

vscode.png

All code can be found on my Github repo.

The IDE I used is VS Code.

Housing

IMG_20210531_081640 (2).jpg
IMG_20210531_081633 (2).jpg

Housing is fully made out of wood and put together with silicone and screws. This is just a prototype, I don't recommend using wood if you are gonna use it outside.

Finishing Touch

fixed crop.jpg

To finish off the housing you can add some paint and branding, like I did.