Smart-mailbox

by JensBonnier in Circuits > Raspberry Pi

1861 Views, 4 Favorites, 0 Comments

Smart-mailbox

IMG_20190614_193957.jpg
IMG_20190614_193858.jpg
IMG_20190614_193937.jpg
IMG_20190616_140501.jpg

I usually read the newspaper in the morning at breakfast. This is delivered every day in the mailbox. But it sometimes happens that I've to walk in the cold or in the rain over our driveway to the mailbox to see that there's no newspaper delivered yet.
This made me think about creating a smart mailbox that keeps track of when mail has been delivered to your mailbox. This way you can easily see from your mobile phone whether the mail has already been delivered or not.

So the smart letterbox means:

  • Keep track of whether there is mail in the mailbox.
  • You can monitor when mail has been delivered and when the letter box has been emptied.
  • You can open the mailbox with an RFID card instead of a normal key

Collecting Materials

rpi.jpg
echo.jpg
lcd.jpg
magnSensorpng.png
RFID.jpg
servo.jpg

IoT stuff (min. € 45 estimated costs):

  • Raspberry Pi 3 Model B +
  • Servo motor SG90
  • Distance sensor HC-SR04
  • RFID module RC522
  • Magnetic contact sensor
  • 16x2 LCD display
  • A bunch of cables

Items for the housing (min. € 30 estimated costs):

  • Wooden plank
  • Hinges
  • Small sliding lock
  • Screws

Tools used for the project:

  • Visual Studio (front-end development)
  • Pycharm (backend development)
  • MySql Workbench (database)
  • Various woodworking tools (for making the housing)

Test the Sensors Separately

IMG_20190524_160117.jpg
IMG_20190528_150334.jpg
IMG_20190610_123750.jpg

You best start by testing the sensors separately so that you know what the sensors can do. And what they can do for the project.

Housing Sketch

behuizing.png
IMG_20190506_185938.jpg
received_448427162390294.jpeg

Once you know what your sensors can do. You can start designing your case. So I made a "prototype" out of cardboard so that I could clearly see the size of the mailbox

Make Complete Circuit

breadbordschema_bb.jpg
elektrischschema_schema.jpg

Note: to make it clearer, I placed the components separately in the diagrams. So in the final version they are indeed linked to 1 Raspberry Pi.

Write Code and Create Website

IMG_20190606_152309.jpg

Now that you have your entire circuit, you can actually start writing all the code for the functionality of the smart mailbox.

Make Housing

IMG_20190608_111302.jpg
IMG_20190611_193527.jpg
IMG_20190611_193517.jpg

Collect all the necessary materials for your letterbox, and start working on the housing.

Implement Circuit in Case

IMG_20190611_193452.jpg
IMG_20190611_193457.jpg
IMG_20190611_193508.jpg
IMG_20190610_201146.jpg

Put the circuit in the case and mount all sensors and actuators in the right place.

Database Structure

db.png

Code

How Did I Proceed?

  1. Brainstormed about what exactly I wanted.
  2. Test all the sensors I was going to use and see how they work exactly.
  3. Made the complete circuit and then programmed the backend.
  4. Made the frontend (HTML & CSS) and linked it to the backend
  5. Made the housing.
  6. Mounted everything in the housing.

Demo of My Final Version

Demo of smart-mailbox