Introduction: 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.
- Raspberry Pi 3 model B (SD card 8GB or more)
- LCD 16x2
- pressure sensor
- motion sensor
- sound sensor
Step 1: The Setup
The setup of the pi :
We need 2 things for this step:
- disk imager win32: https://sourceforge.net/projects/win32diskimager/...
- our image on: https://www.raspberrypi.org/downloads/raspbian/now...
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
- username: pi
- password: raspberry
- 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"
- type :
Step 2: The Database
Install the mariaDB on the PI
- "sudo apt install mariaDB-server"
- 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 :
- Build,Execution, 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.