

OpenCatFlap
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
6EM4095HMS
SOIC-16_3.9x9.9x1.27PSOIC-16 RF Transceiver ICs ROHSEM Microelectronic-Marin SARF Transceiver ICsBC546BBK
TO-92-55℃~+150℃ 1 NPN 100mA 15nA 200 300MHz 500mW 5V 600mV 65V NPN TO-92 Bipolar (BJT) ROHSDIOTECBipolar (BJT)NE555D
SOIC-80℃~+70℃ 10mA 4.5V~16V SOIC-8 555 Timers / Counters ROHSTexas InstrumentsTimers / CountersLM1117DTX-3.3/NOPB
TO-252-20℃~+125℃ 1 1.2V@(800mA) 15V 3.3V 5mA 75dB@(120Hz) 800mA Fixed Over Current Protection、Over Temperature Protection Positive TO-252-2 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSTexas InstrumentsVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsBSS138L
SOT-23-55℃~+150℃ 1 N-channel 1.5Ω@10V 1V 2.2pF 25pF 400mA 417mW 60V 650pC@4.5V 9.7pF N-Channel SOT-23 MOSFETs ROHSElecSuperMOSFETsIL-G-2P-S3T2-SA
插件1 1x2P 2 2P Through Hole 插件 Wire To Board Connector ROHSJAE ElectronicsWire To Board Connector
README
README.mdOpenCatFlap
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:
- Easily managable via an API and/or WebUI/MQTT
- Powered by battery OR power plug!
- Easy install via AP/Wifi
- Motion detection on both sides of the flap to check on where a cat is and where it moves to
- Light barrier that detects into which direction the flap got opened
- Light barrier in both sides of the "tunnel" to check into which direction the cat moved
- Independent control of mechanic in and out control. (My cats outsmart SureFlap by letting each other out/in)
- Two RFID sensors to detect cats on each side and possibly both!
- 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:
- Set pets as "outdoor only"
- Quickly and more easily set specific per-cat permissions
- 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:
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.crtFuture 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
Parts
104| Qty | Value | Footprint | References |
|---|---|---|---|
| 11 | 10kΩ | Resistor_SMD:R_0603_1608Metric | R3, R4, R5, R6, R7, R8, R9, R10, R11, R14, R15 |
| 8 | 100nF | Capacitor_SMD:C_0603_1608Metric | C16, C17, C18, C19, C24, C25, C26, C27 |
| 6 | 10nF | Capacitor_SMD:C_0603_1608Metric | C20, C21, C22, C23, C36, C39 |
| 6 | 1nF | Capacitor_SMD:C_0603_1608Metric | C11, C12, C31, C32, C37, C40 |
| 6 | 33kΩ | Resistor_SMD:R_0603_1608Metric | R17, R18, R19, R20, R24, R25 |
| 5 | S3B-PH-K-S LFSN | OpenCatFlap:CONN_S3B-PH-K-S_JST | P4, P5, P6, P9, P12 |
| 4 | 10uF | OpenCatFlap:CAP_CL31A_SAM | C1, C2, C4, C5 |
| 4 | 22pF | Capacitor_SMD:C_0603_1608Metric | C13, C14, C29, C30 |
| 4 | BC546BBK | Package_TO_SOT_THT:TO-92L_Inline | U4, U8, U9, U14 |
| 4 | BSS138L | OpenCatFlap:BSS138L | Q1, Q2, Q3, Q4 |
| 4 | Bohrloch | OpenCatFlap:Bohrloch | Pad_gge19202, Pad_gge19226, Pad_gge19274, Pad_gge19274 |
| 4 | S2B-PH-K-SLFSN | OpenCatFlap:CONN_S2B-PH-K-S_JST | P1, P7, P8, P11 |
| 3 | 10k | Resistor_SMD:R_0603_1608Metric | R12, R23, R32 |
| 2 | 1.5nF | Capacitor_SMD:C_0603_1608Metric | C15, C28 |
| 2 | 100nF | Capacitor_SMD:C_1210_3225Metric | C3, C6 |
| 2 | 100uF | Capacitor_SMD:CP_Elec_6.3x7.7 | C9, C10 |
| 2 | 12pF - 60 pF | OpenCatFlap:VCAP_GKGXXX15_SGM | C8, C33 |
| 2 | 27Ω | Resistor_SMD:R_0603_1608Metric | R21, R22 |
| 2 | 560Ω | Resistor_SMD:R_0603_1608Metric | R13, R16 |
| 2 | 82 | Resistor_SMD:R_0603_1608Metric | R28, R31 |
| 2 | EM4095 | OpenCatFlap:EM4095 | U11, U12 |
| 2 | NE555D | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U5, U13 |
| 2 | S4B-PH-K-S_LF__SN_ | OpenCatFlap:CONN_S4B-PH-K-S_JST | P2, P3 |
| 2 | TPS22810DRVR | OpenCatFlap:DRV0006A_NV | U6, U7 |
| 1 | 11.2k | Resistor_SMD:R_0603_1608Metric | R27 |
| 1 | 118kΩ | Resistor_SMD:R_0603_1608Metric | R1 |
| 1 | 12uH | OpenCatFlap:LBM2016TI20J | L1 |
| 1 | 16.5k | Resistor_SMD:R_0603_1608Metric | R30 |
| 1 | 22.1kΩ | Resistor_SMD:R_0603_1608Metric | R2 |
| 1 | 3.3k | Resistor_SMD:R_0603_1608Metric | R26 |
| 1 | 4.7k | Resistor_SMD:R_0603_1608Metric | R29 |
| 1 | 4.7uF | Capacitor_SMD:C_1206_3216Metric | C7 |
| 1 | ARDUINO_NANO | OpenCatFlap:Arduino Nano ESP32 | U1 |
| 1 | IL-G-2P-S3T2-SA | OpenCatFlap:CONN_S2B-PH-K-S_JST | P10 |
| 1 | LM1117DTX-3.3/NOPB | OpenCatFlap:LM1117DTX-3.3NOPB | U2 |
| 1 | LMR54410DBVR | OpenCatFlap:U_SOT-23_TEX | U3 |
| 1 | SENSOR MOTION SPOT 5V BLK LENS | OpenCatFlap:AMN33111 | U10 |
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 mm

- 2 layers58.5 × 30 mm

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 mm

- 2 layers75 × 99.1 mm

- 2 layers92.7 × 65.1 mm

Rfid em
harsha-2-006/134khz_Rfid_Reader
Low-frequency 134.2 kHz RFID reader using EM4095 and ESP32
21 parts1MIT - 2 layers85 × 55 mm

- 2 layers153 × 61.5 mm

- 2 layers64 × 51 mm

Rpirfid
rpiEHC/rpi-rfid-2
A new RPI RFID project based on the old designs from https://github.com/MakerPulse
40 parts