DIY

Door for a cat, with outdoor temperature control and magnetic lock

Door for a cat, with street control temperature and magnetic lock

If you have a private house and have a cat or dog, then you need read this article. In the article, a homemade master presents his work – a door for a cat. The door is equipped with an electromagnet and weather sensors. If the weather is bad outside, the door is locked. The door can also be locked by the user.
The master uses Raspberry Pi as a control device.
Tools and materials: -Raspberry pi; -Resistors; -Breadboard; -Wires;
-Power supply;
– Transistor BC337;
-Diode;
-Potentiometer; -Photoresistor; -DS18B20 temperature sensor; -Rain sensor; -RFID reader RC522 – 2 pcs; -MCP3008 microcircuit; -PCF8574 microcircuit;
-Electromagnet;
– LCD display;
-Wood materials;
-Carpentry glue; -Glue gun; -Cable ties; -Seed paper; -Drill; -Screwdriver;
-Fasteners;
-Soldering iron; -Folding door for cats;
Step one: setting up the Pi
The first step in this process is preparing the pi.
First you need to download the image and the software to burn it.
The image can be downloaded here: www.raspberrypi.org
The software is here: sourceforge.net
Next, you need to write the image to the SD card. After recording, you need to configure.
Go to the SD-card, find a file named “cmdline.txt” and open it.
At the end of the line, add “ip = 192.168.168.168” and save this file.
Create in the same place an empty file with no extension named “ssh”.
Now you need to install the SD card in the Raspberry Pi and connect using putty via “192.168.168.168/22”.
Putty link: latest.html
Default: User: pi, Password: raspberry.
To get root rights, write:

  sudo -i wpa_passphrase & # 34; ssid & # 34; & # 34; password & # 34; & gt; & gt; /etc/wpa_supplicant/wpa_supplicant.conf  

Configuring a wireless network card:

  wpa_cli -i wlan0 reconfigure  

For updates when connected to Wi-Fi:

  sudo apt-get update sudo apt-get upgrade  

MariaDB Database:

  sudo apt-get install mariadb-server  

Apache2 Web Server:

  sudo apt install apache2  

For Python:

  pip3 install flask-cors pip3 install flask-socketio pip3 install mysql-connector-python pip3 install gevent pip3 install gevent-websocket  

RFID library rc522:

  sudo pip3 install spidev sudo pip3 install mfrc522  

Reboot at the end:

 sudo reboot  

Step two: schematic diagram
The device is mounted according to the diagram.
 Door for a cat, with outdoor temperature control and magnetic lock Circuit_Schematic.pdfCircuit_Breadboard.pdf
Step Three: Database
You will need mysql software to install the database.
Now you need to install the Smart Hatch database.
Door for a cat, with outdoor temperature control and magnetic lock Step four: door
The hatch itself can be purchased or made yourself. The master uses a purchased door made of acrylic, and makes the spoil from wood.
< img class = "aligncenter" alt = "Door for a cat, with outdoor temperature control and magnetic lock" src = "https://usamodelkina.ru/uploads/posts/2021-08/1628922540_1-4.jpg"/> The dimensions of the hatch are 30 mm x 30 mm x 10 mm and it is made entirely of wood.
Door for a cat, with outdoor temperature control and magnetic lock Door for a cat, with outdoor temperature control and magnetic lock Door for a cat, with outdoor temperature control and magnetic lock Door for a cat, with outdoor temperature control and magnetic lock Door for a cat, with street control temperature and magnetic lock  A door for a cat, with outdoor temperature control and a magnetic lock Door for a cat, with street control temperature and magnetic lock  Door for a cat, with outdoor temperature control and magnetic lock Door for a cat, with street control temperature and magnetic lock Door for a cat, with outdoor temperature control and magnetic lock Step five: interface
The interface is simple and has four tabs: “Manual”, “Cats”, “Weather” and “Statistics”. You can download it here, or develop your own.
Door for a cat, with outdoor temperature control and magnetic lock Door for a cat, with outdoor temperature control and magnetic lock Door for a cat, with outdoor temperature control and magnetic lock Door for a cat, with outdoor temperature control and magnetic lock Step six: setting SPI and I2C
Before than to use MCP3008, RFID and LCD, you need to enable SPI and I2C bus.
To enable SPI:

  sudo raspi-config 5.Interfacing Options SPI  

Enable I2C:

  sudo raspi-config 5 .Interfacing Options I2C  

Enable SPI 1:

  sudo nano /boot/config.txt & # 34; dtoverlay = spi1-3cs & # 34;  

Door for a cat, with outdoor temperature control and magnetic lock Step Seven: Code
Now you need to do it, load the code. You can download it here.
A door for a cat, with outdoor temperature control and a magnetic lock Door for a cat, with outdoor temperature control and magnetic lock Door for a cat, with outdoor temperature control and magnetic lock  Door for a cat, with outdoor temperature control and magnetic lock And finally, we cut the hatch into the front door and connect the power to the Raspberry Pi. You need to hang a programmed RFID tag on the cat or cat. When the animal approaches the door, the tag will be read and, depending on the scenario, the door will open or remain closed.

Source:

usamodelkina.ru

Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button