Smart Dog House

Most pet owners are curious what their beloved dog has been doing in their absence.

In this instructable we will create a Raspberry Pi based Dog monitor. After a working day, you can check the app and see the time he spent in his ‘bench’ , how much noise he made and how active he has been.

Supplies:

Electrical:

  • Raspberry Pi 3 model B (SD card 8GB or more)
  • T-cobler
  • LCD 16x2
  • pressure sensor
  • motion sensor
  • sound sensor
  • resistors
  • jumperwires

Step 1: The Setup

The setup of the pi :

We need 2 things for this step:

The SD card setup:

  • go to the SD card's boot directory
  • open the file "cmdline.txt" and add ip=169.254.10.1. Make sure there is a space between what you type and what is already in the file
  • save it
  • create a file ssh with no extension in the same dir
  • take you SD card out (but safely)

Connection to the PI:

  • Power the PI and plug the LAN cable in your computer and your PI
  • install Putty from https://www.putty.org/put
  • put '169.254.10.1' in the IP boxselect SSH and port 22
  • open
  • username: pi
  • password: raspberry

Configuration :

  • type "sudo raspi-config"
  • Choose your wifi country via the localization category
  • download realVNC: https://www.putty.org/put
    • setup a connection to your PI
  • make a connection to your wifi
  • back to CLI( computer line interface) version
    • type :
      • "sudo apt update"
      • "update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1"
      • "update-alternatives --install /usr/bin/python python /usr/bin/python3 2"

Step 2: The Database

Install the mariaDB on the PI

  • Type
    • "sudo apt install mariaDB-server"
    • "mysql_secure_installation"
  • We have no root password yet so just press enter
  • Now we can setup a root password
    • Answer Y to all questions

Step 3: Electrical Wiring

Wire the components according to the 'Electric Scheme'

In attachment a practical example of my Breadboard wiring scheme

Attention because jumperwires don't stick that well, so make sure that eveything is well attached to the breadboard.

Step 4: The Case

Make the case

There are different possibilities :

  • you can use a lasercutter
  • or you can make it by hand

I used the lasercutter an I glued the 2 boxes together as in the picture above. The measurements are in the drawing if you would make it by hand.

If you want to generate lasercutter files, there is an easy site you can use. ( https://www.makercase.com )

Step 5: Python (the Backend)

For the backend I use Pycharm.

For the connection with your PI :

  • File
  • Settings
  • Build,Execution, Deployment
  • Deployment
  • Make the connection to your PI by adding your SFTP host
  • Go to second tab Mappings and make sure the local path is correct
  • Click OK

Download the code from GITHUB ( https://github.com/WoutDeBaere/Smart-dog-house )

Upload the code with right click and choose 'Upload to Rpi'

Run the script with right click and choose run (app.py)

Step 6: Html and Java(frontend)

Take the Front-End part, you downloaded in the previous step from GITHUB and upload it. I used Visual Studio to do the FE part, but up to you which environment you prefere to use.

Step 7: The Final Step

Share

    Recommendations

    • Games Contest

      Games Contest
    • Paint Challenge

      Paint Challenge
    • Sew Tough Challenge

      Sew Tough Challenge

    Discussions