Skip to the content
PCBKitNew board
2 layers95 × 60 mmOpenCatFlap, the printed circuit board in 3D

Smart cat flap using Wifi+HTTP to work without a cloud.

Size
95 × 60 mm
Copper layers
2
Thickness
1.6 mm
Parts
104
Nets
82
Pads
305
Tracks, vias
642, 100
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
3 Jun 2023
Updated
30 Jul 2026

Overview

OpenCatFlap is an open-source printed circuit board by Alex-ala, from the Alex-ala/OpenCatFlap repository on GitHub. It is a 2-layer board of 95 × 60 mm with 104 parts on 82 nets, routed with 642 tracks and 100 vias.

It is built around the EM4095HMS, BC546BBK and NE555D, with the LM1117DTX-3.3/NOPB, BSS138L and IL-G-2P-S3T2-SA among its other parts. Its parts include 37 capacitors, 32 resistors, 14 ICs, 12 connectors and 4 transistors. It belongs with the radio and wireless boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

6

README

README.md

OpenCatFlap

Work in progress...

Being fed up with SurePets cat flap requiring cloud connection to properly work, I decided to design my own flap. The 3D model is intended to fit into the SurePet adapter already installed.

I want my flap to have at least these features:

  1. Easily managable via an API and/or WebUI/MQTT
  2. Powered by battery OR power plug!
  3. Easy install via AP/Wifi
  4. Motion detection on both sides of the flap to check on where a cat is and where it moves to
  5. Light barrier that detects into which direction the flap got opened
  6. Light barrier in both sides of the "tunnel" to check into which direction the cat moved
  7. Independent control of mechanic in and out control. (My cats outsmart SureFlap by letting each other out/in)
  8. Two RFID sensors to detect cats on each side and possibly both!
  9. Modular design to easily remove the cover, the electronics and the mechanical parts without having to unscrew screws from the outside.

In addition to that the software should be capable of everything SureFlap is capable of, plus:

  1. Set pets as "outdoor only"
  2. Quickly and more easily set specific per-cat permissions
  3. Manually "unlock once" option for each direction

Current state:

Hardware:

It is bases on an ESP32 (Arduino Nano ESP32 for development) with various sensors and two servos to lock/unlock. The 3D model is ready to be tested and a printed version is already in use to debug the code. Slight adjustments to the antenna design will be done in future.

Used vital parts:

  • 2x PIR (motion detection): Panasonic AMN33111, testing with cheaper options
  • 2x light barrier for flap detection: TCST 1103
  • 2x light barrier for tunnel passage: IR LED + NE555 and TSOP1838 and TSOP1856
  • 2x RFID reader: EM4095
  • 2x Servo: DSM44

Software:

The software runs a main process that handles global configs and aggregates events reported by the two state machines. After the last hardware overhaul, quite some work is to be done to update sensors and reading RFID from EM4095 instead of WL-134

State machines

The locking and unlocking logic is split up into two independent state machines, one for each direction of travel. One state machine handles the PIR, RFID and Servo on one side of the cat flap.

This way the flap can idependently unlock for ougoing or incoing cats without acidentally opening the other direction aswell, allowing false passages.

Roughly speaking there are 3 states: Idle (only PIR active to wait for motion), Reading (RFID enabled when motion is detected) and unlocked (when a correct RFID is read).

Wifi

If no Wifi is configured, the flap acts as an AP opening an open "OpenCatFlap" wifi. One can either use this wifi for full control via api, or send credentials to connect to an existing wifi.

MQTT

MQTT can be configured to connect to an existing MQTT server. The flap will then send events to topics opencatflap/<flapname>/<type>. Configuration via MQTT is planned.

Webserver

Current means to configure the flap is via http. There is a webserver running on :80 that takes requests to configure wifi, mqtt, lock allowance and cats, aswell as getting some status information.

How to configure (for now): Wifi: curl -H "Content-Type: application/json" http://192.168.4.1/api -d '{"command": "wifiConfig", "ssid": "Bockenburg", "passphrase": "", "ntpServer": "ip preffered, hostname possible"}' MQTT: curl -H "Content-Type: application/json" 'http://10.5.0.60/api' -d'{"command": "mqttConfig", "server": "mosquitto.ahome", "port": 8011, "ssl": true, "logActivity": true}' MQTT Certificates:

text
curl -H "Content-Type: text/plain" 'http://10.5.0.60/api/certs?name=key' --data-binary @/home/alex/trash/opencatflap.key
curl -H "Content-Type: text/plain" 'http://10.5.0.60/api/certs?name=cert' --data-binary @/home/alex/trash/opencatflap.crt
curl -H "Content-Type: text/plain" 'http://10.5.0.60/api/certs?name=ca' --data-binary @/home/alex/trash/ca.crt

Future Improvements:

  • NE555 is too inconsistant due to 5% tolerance capacitor with bad temperature coefficient
  • Tuning condensators for EM4095 have to be bigger to allow more jiggle-room when building an antenna
  • Condensators to configure EM4095 need to have better tolerance and temperature coefficient to get as close to required frequency as possible. Current ones allow reading big chips, small tubes and implanted ones need a lot of hugging the antenna.
  • Cheaper connectors for the PCB and external sensors
  • Battery backup circuit
  • ESP32 directly onboard

schematics pcb pic1 pic2 cat approved

Parts

104
QtyValueFootprintReferences
1110kΩResistor_SMD:R_0603_1608MetricR3, R4, R5, R6, R7, R8, R9, R10, R11, R14, R15
8100nFCapacitor_SMD:C_0603_1608MetricC16, C17, C18, C19, C24, C25, C26, C27
610nFCapacitor_SMD:C_0603_1608MetricC20, C21, C22, C23, C36, C39
61nFCapacitor_SMD:C_0603_1608MetricC11, C12, C31, C32, C37, C40
633kΩResistor_SMD:R_0603_1608MetricR17, R18, R19, R20, R24, R25
5S3B-PH-K-S LFSNOpenCatFlap:CONN_S3B-PH-K-S_JSTP4, P5, P6, P9, P12
410uFOpenCatFlap:CAP_CL31A_SAMC1, C2, C4, C5
422pFCapacitor_SMD:C_0603_1608MetricC13, C14, C29, C30
4BC546BBKPackage_TO_SOT_THT:TO-92L_InlineU4, U8, U9, U14
4BSS138LOpenCatFlap:BSS138LQ1, Q2, Q3, Q4
4BohrlochOpenCatFlap:BohrlochPad_gge19202, Pad_gge19226, Pad_gge19274, Pad_gge19274
4S2B-PH-K-SLFSNOpenCatFlap:CONN_S2B-PH-K-S_JSTP1, P7, P8, P11
310kResistor_SMD:R_0603_1608MetricR12, R23, R32
21.5nFCapacitor_SMD:C_0603_1608MetricC15, C28
2100nFCapacitor_SMD:C_1210_3225MetricC3, C6
2100uFCapacitor_SMD:CP_Elec_6.3x7.7C9, C10
212pF - 60 pFOpenCatFlap:VCAP_GKGXXX15_SGMC8, C33
227ΩResistor_SMD:R_0603_1608MetricR21, R22
2560ΩResistor_SMD:R_0603_1608MetricR13, R16
282Resistor_SMD:R_0603_1608MetricR28, R31
2EM4095OpenCatFlap:EM4095U11, U12
2NE555DPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU5, U13
2S4B-PH-K-S_LF__SN_OpenCatFlap:CONN_S4B-PH-K-S_JSTP2, P3
2TPS22810DRVROpenCatFlap:DRV0006A_NVU6, U7
111.2kResistor_SMD:R_0603_1608MetricR27
1118kΩResistor_SMD:R_0603_1608MetricR1
112uHOpenCatFlap:LBM2016TI20JL1
116.5kResistor_SMD:R_0603_1608MetricR30
122.1kΩResistor_SMD:R_0603_1608MetricR2
13.3kResistor_SMD:R_0603_1608MetricR26
14.7kResistor_SMD:R_0603_1608MetricR29
14.7uFCapacitor_SMD:C_1206_3216MetricC7
1ARDUINO_NANOOpenCatFlap:Arduino Nano ESP32U1
1IL-G-2P-S3T2-SAOpenCatFlap:CONN_S2B-PH-K-S_JSTP10
1LM1117DTX-3.3/NOPBOpenCatFlap:LM1117DTX-3.3NOPBU2
1LMR54410DBVROpenCatFlap:U_SOT-23_TEXU3
1SENSOR MOTION SPOT 5V BLK LENSOpenCatFlap:AMN33111U10

Questions

How big is the OpenCatFlap PCB?

It measures 95 × 60 mm and has 2 copper layers, 1.6 mm thick.

What parts does the OpenCatFlap use?

104 parts, built around the EM4095HMS, BC546BBK, NE555D and LM1117DTX-3.3/NOPB. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the OpenCatFlap KiCad files?

From the Alex-ala/OpenCatFlap repository on GitHub, at the commit this page was made from: the board is cad/opencatflap/opencatflap.kicad_pcb and its schematic cad/opencatflap/opencatflap.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the OpenCatFlap design in my own project?

Its repository states no licence, so its author keeps all rights: ask Alex-ala before reusing the design.

Similar boards

  • 8 layers160 × 100 mmETH1CLCR1, the printed circuit board in 3D

    ETH1CLCR1

    BehrensG/ETH1CLCR1

    751 parts
  • 2 layers58.5 × 30 mmPower board fixed regulator, the printed circuit board in 3D

    Power board fixed regulator

    rct4/Autonomous-Soil-Monitoring-Rover

    The autonomous soil monitoring rover is a project that aims to assist commercial farmers and personal gardeners by introducing an automated solution to monitoring soil data.

    14 parts
  • 2 layers27.9 × 66.2 mmRfid, the printed circuit board in 3D

    Rfid

    NFQ-Makers/rfid-reader

    A simple 125KHz rfid reader based on a ATMega8

    61 parts7GPL-2.0
  • 2 layers75 × 99.1 mmEsp32rfid, the printed circuit board in 3D

    Esp32rfid

    nykloo/esp32rfid_pcb

    ESP32 rfid reader/writer using the EM4095 chip

    32 parts6
  • 2 layers92.7 × 65.1 mmRfid em, the printed circuit board in 3D

    Rfid em

    harsha-2-006/134khz_Rfid_Reader

    Low-frequency 134.2 kHz RFID reader using EM4095 and ESP32

    21 parts1MIT
  • 2 layers85 × 55 mmNestbox, the printed circuit board in 3D

    Nestbox

    o16s/anisca-bird

    Perch-based automated population monitoring for birds.

    150 parts1GPL-2.0
  • 2 layers153 × 61.5 mmReader, the printed circuit board in 3D

    Reader

    Computer4062/RFID-keyChain

    My KiCAD files

    63 parts
  • 2 layers64 × 51 mmRpirfid, the printed circuit board in 3D

    Rpirfid

    rpiEHC/rpi-rfid-2

    A new RPI RFID project based on the old designs from https://github.com/MakerPulse

    40 parts