Skip to the content
2 layers62 × 89.7 mmRatGDO OpenSource D1Mini ESP32, the printed circuit board in 3D

RatGDO OpenSource D1Mini ESP32

scottdube/my-rat-ratgdo

DIY local Security+ 2.0 garage control for Home Assistant — my rat-ratgdo (D1 Mini ESP32) variant: on-board LM2596, battery-backup tap, SHT3x temp/humidity, and a piezo buzzer.

Size
62 × 89.7 mm
Copper layers
2
Thickness
1.6 mm
Parts
25
Nets
46
Pads
91
Tracks, vias
101, 2
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
28 Jun 2026
Updated
20 Aug 2026

Overview

RatGDO OpenSource D1Mini ESP32 is an open-source printed circuit board by scottdube, from the scottdube/my-rat-ratgdo repository on GitHub, published under the MIT licence. It is a 2-layer board of 62 × 89.7 mm with 25 parts on 46 nets, routed with 101 tracks and 2 vias.

It is built around the LM2596S-5.0 and AO3400A. Its parts include 8 resistors, 8 connectors, 3 transistors, 1 IC and 1 fuse. It belongs with the home automation and IoT boards and the ESP32 and ESP8266 boards of this library.

Main components

2

README

README.md

my-rat-ratgdo

Personal fork — not the upstream project. Derived from Kaldek/rat-ratgdo (open source). This is my customized build of the D1 Mini – ESP32 variant, with added board mods: I2C temp/humidity header (SHT3x), 12 V piezo buzzer driver, battery-backup tap + fuse, and an on-board LM2596 buck. Original license retained in LICENSE; all credit for the base design goes to Kaldek.

my-rat-ratgdo — assembled board, Fusion 360 3D view

What I changed — and why

Customizations over stock rat-ratgdo

I started from Kaldek's D1 Mini – ESP32 variant and added four things aimed at making the board a self-sufficient, locally-controlled garage controller that keeps working through a power outage:

  • SHT3x temp/humidity sensor (I²C, addr 0x44, SDA GPIO18 / SCL GPIO19). Garage climate in Home Assistant for free — freeze/heat alerts, humidity logging — with no second device. Brought out on a JST header to a remote breakout so the sensor isn't skewed by board or enclosure heat.
  • 12 V piezo buzzer driver (2N7002 on GPIO17). Local audible feedback — door-left-open nag, closing warning — that doesn't depend on phones or speakers.
  • Battery-backup tap + fuse (1206). Taps the opener's existing 12 V backup battery (fused) so the controller keeps reporting state and accepting commands during a mains outage.
  • On-board LM2596 buck (12 V → 5 V). Puts the buck on the PCB instead of a flying module, so the whole thing is one board fed straight from the battery tap.
  • Function-labeled pass-through terminals (WALL · L-EYE · R-EYE · GDO). The wall panel and both obstruction eyes re-land on the board with clear labels and horizontal wire entry (enclosure-slot friendly), replacing the stock single 3-pole block.

Everything else — the ESP32, the Security+ 2.0 serial tap, the RX/TX MOSFET level-shifters, the obstruction sense — is stock rat-ratgdo and behaves exactly as upstream intended.

Schematic

D1 Mini ESP32 schematic — my modifications

Build / reproduce

  • KiCad project: kicad_files/D1 Mini - ESP32/ — self-contained (project-relative libs + 3D models, paths via ${KIPRJMOD}).
  • Fab outputs: gerbers + drill in that folder's Gerber Files/ (JLCPCB, 2-layer, default rules). The exact design that was fabricated is git-tagged rev-A.
  • Firmware: flash the ESPHome ratgdo v2.0 ESP32 D1 Mini image. Door pins TX GPIO16 / RX GPIO21 / OBST GPIO23; plus SDA GPIO18 / SCL GPIO19 (SHT3x) and GPIO17 (buzzer).

Want to do the same, or riff on it?

This is meant as an idea-starter, not a finished product — issues and ideas are welcome, and if you build a variant I'd like to hear about it. For the canonical board and commercial options, go to Kaldek's upstream and Paul Wieland's ratgdo (buying from Paul rewards the original creator).


rat-ratgdo (upstream README follows)

RAGE AGAINST THE RATGDO

Generate Gerber and PCB Files

Credit and inspiration for this work goes to @rlowens to let me know that there are other technical folks out there who needed this other than myself.

Overview

This is an open source schematic for the ratgdo, based on the v2.5 ratgdo PCB and code but installed using the ESPHome fork of ratgdo. This project was created to allow people who need a ratgdo solution for their garage door opener but either cannot, or choose not to, source the solution from Paul Wieland. It also ensures that the PCB can be recreated as and when the project maintainer gives up on the project (much like Chamberlain themselves might do with their MyQ Cloud Service) and stops selling PCBs.

You are expected to know how to create the described circuit using your own prototyping skills. That is, this project is for people who can solder well and know how to read schematics

The basic PCB schematic shown here in the Readme does not describe any circuitry other than the serial line garage door control and obstruction sensor. All other optional features provided by ratgdo can be reverse engineered as needed, or may already be solved by one of the schematics the community has uploaded!

As of January 2023, there are now multiple sources for commercially sold ratgdo boards. However if you want to buy a pre-made ratgdo setup, we recommend purchasing one from Paul Wieland so as to reward the original creator.

PCB Link Simple basic schematic for a Wemos D1 Mini based module

See images of a working breadboard prototype and the subsequent soldered prototype using a D1 shield. Both of these prototypes are using 2n7000 MOSFETs exclusively, but that is because they are prototypes and whether a 2n7000 will work for TX will depend greatly on who manufactured your 2n7000. See the section below on needed components for context.

Components needed for basic functionality

The basic schematic shown above assumes the use of through-hole components. If you wish to use SMD components, please refer to the FAQ, and you can also check out the community-provided schematics, which include SMD-based designs.

For this basic design, aside from the obvious requirement of a supported ESP-32 or ESP8266 board flashed with the ESPHome version, you will need:

  • 3x 10 kohm (kilo-ohm) resistors
  • 1x 2n7000 MOSFET for the RX pin
  • 1x AO3400A (soldered to a SOT23 to DIP adapter board) for the TX pin.

It is also recommended you aquire a suitable 3-post screw terminal and some red, white, and black wire for connecting to the door opener. These connections are very low current, so you can get away with fairly thin wire.

Note: You may try to use a 2n7000 MOSFETs for both RX and TX, however depending on the manufacturere of your 2n7000 and its production batch, it might not be 100% reliable for the TX circuit because the ~3v switching signal from the ESP8266 may not be enough to trigger the gate of the 2n7000. There are many examples working using the 2n7000 however, so it might work. If you have reliability issues for sending commands, we can only recommend you use the AO3400A SMD MOSFET, soldered to a SOT23-to-DIP adapter board.

INSTALL REQUIREMENTS

For both this basic schematic shown here in the Readme and how they it is laid out, you must use the ESPHome fork of ratgdo and - for ESP8266 based boards - select the "ratgdo v2.5x" image on the ESPhome web installer page. For ESP32 based boards the above does not currently apply and you must use the v2.0 installer and follow our basic ESP-32 schematic we provide in the Supported Boards page.

For the ESP8266 based boards, if installing using Paul Wieland's native ratgdo installer and you install for a v2.0 board, you must wire your TX to D4 (GPIO2) rather than D1 (GPIO5).

Having a PCB printed

You may use the files from the schematics folder to have your own PCB printed. Shown is an example 3D render of an ESP32 based board using a Wemos ESP32 D1 board.

3D render of printed PCB An example of the D1 Mini ESP32 Wide Format

Here is an example of a printed PCB with a raw ESP8266 and an LM2596 module, for being powered by a GDO with the battery backup capabilities. Printed PCB using ESP8266 and LM2596 An example of a PCB using a bare ESP8266 and LM2596 module

Schematic options

The community has provided a few options of schematic files suitable for sending to a PCB printing company.

If you just want to try ordering a board from somewhere like PCBWay, then check out the most recent build artifacts

How the ratgdo circuit works

The ratgdo circuitry which we cover in this project consists of two sections; Garage Door control and obstruction sensors.

Garage Door Control

Description of the Chamberlain configuration

The Chamberlain garage door control circuit is a two-wire setup consisting of a Ground, and a combined +12v power and serial data line. The serial data line is held at 12v unless data transmission is occurring. Data transmission is performed by pulling the 12v line down to GND for each data bit. The benefit here is that a single wire can be used for providing power to door control panels and data transmssion on a single wire. The use of appropriately sized capacitors in door control panels means they do not switch off during data transmission.

How ratgdo interfaces with the Chamberlain wiring

The ratgdo taps into the red control wire and uses this single wire for transmission of commands onto the serial bus, and for receiving data from the serial bus. As it is a single wire protocol and operates half-duplex, the ratgdo circuitry uses N-channel MOSFETs wired in a manner which allows the ESP8266 to never transmit when the serial line is already low.

In operation, this means that the ratgdo is mostly listening to the serial bus to ensure it is keeping track of the state of the door. For example, if the door is manually opened (or opened by use of the MyQ app even), these events are broadcast onto the serial bus by the door controller. ratgdo is therefore able to know that the state of the door has changed. In turn, this means that when controlling ratgdo via Home Assistant, the status of the door in HA is always up to date.

Wiring to Garage Door

Obstruction sensor

The ratgdo monitors the real-time state of the obstruction sensors directly. We assume this is because obstruction status is not broadcast in real time by the door controller, and safety is paramount. It allows you to set up real-time alerts in Home Assistant for any time the door is obstructed. The ratgdo taps into the obstruction sensor power wire which also acts as a communication bus, however the signalling is only an ongoing status of whether the obstruction sensors are working and whether there is an obstruction.

Contributing

This is a fully open repo, in that we welcome any and all additions for all sorts of Edge Cases. If you come up with something and would like it to be available to the community, raise a Pull Request and we'll work with you to get it published!

Parts

25
QtyValueFootprintReferences
610kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R2, R3, R5, R6, R8
4MountingHole_5mmMountingHole:MountingHole_5mmH1, H1, H1, H1
11AFuse:Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolderF1
11kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR4
1220Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR7
12N7002Package_TO_SOT_SMD:SOT-23Q3
12N7002Package_TO_SOT_SMD:SOT-23_HandsolderingQ1
1AO3400APackage_TO_SOT_SMD:SOT-23_HandsolderingQ2
1Batt InConnector_Phoenix_MC:PhoenixContact_MC_1,5_2-G-3.5_1x02_P3.50mm_HorizontalJ6
1GDOConnector_Phoenix_MC:PhoenixContact_MC_1,5_3-G-3.5_1x03_P3.50mm_HorizontalJ1
1LM2596ratgdo_custom:LM2596J7
1Obst LeftConnector_Phoenix_MC:PhoenixContact_MC_1,5_2-G-3.5_1x02_P3.50mm_HorizontalJ3
1Obst RightConnector_Phoenix_MC:PhoenixContact_MC_1,5_2-G-3.5_1x02_P3.50mm_HorizontalJ8
1Piezo 12VConnector_JST:JST_EH_B2B-EH-A_1x02_P2.50mm_VerticalJ5
1SHT4x_I2CConnector_JST:JST_XH_B3B-XH-A_1x03_P2.50mm_VerticalJ4
1Wall SwitchConnector_Phoenix_MC:PhoenixContact_MC_1,5_2-G-3.5_1x02_P3.50mm_HorizontalJ2
1mini_esp32ESP32_mini:ESP32_miniU1

Similar boards

  • 2 layers150 × 130 mmSTM32-Automotive BCM Development Board, the printed circuit board in 3D

    STM32-Automotive BCM Development Board

    Akinlatauto19/STM32-Automotive-BCM-Development-Board

    Automotive Body Control Module (BCM) development board designed around an STM32 microcontroller, featuring relay-based automotive outputs, power management, protection circuitry, and a custom KiCad PCB.

    89 partsCERN-OHL-S-2.0
  • 4 layers110 × 122.3 mmWalking spider robot, the printed circuit board in 3D

    Walking spider robot

    DziadekMateusz/Walking_spider_robot_PCB

    Custom control board for a spider robot. Based on the STM32F103C8T6 microcontroller. Features dedicated 5V power supplies for eight servo motors, USB-C programming, Li-Po 2S power input, onboard protection circuits…

    146 parts
  • 2 layers99 × 90 mmHomeyPCB, the printed circuit board in 3D

    HomeyPCB

    jadam3k/Homey

    Home Asistance/Industrial PLC

    99 parts
  • 2 layers96.4 × 100.4 mmMushroom pcb, the printed circuit board in 3D

    Mushroom pcb

    karenquezada/MushROOM

    57 parts
  • 2 layers100 × 100 mmCarrier, the printed circuit board in 3D

    Carrier

    moinsen-dev/open-bed-climate

    Open-source, local-first bed climate system: water-cooled/heated mat, standard parts, DIY kits, Home Assistant. Design phase.

    126 partsApache-2.0
  • 4 layers61.3 × 61.7 mmBio thing, the printed circuit board in 3D

    Bio thing

    noahalam77-code/TheraPatch

    82 partsMIT
  • 2 layers24 × 63 mmCremini backplane lm2596, the printed circuit board in 3D

    Cremini backplane lm2596

    nicklasfrahm/mykilio

    Mykilio is the proposal for a new Living Standard with the goal to reimagine infrastructure management and monitoring.

    24 parts1MIT

Questions

How big is the RatGDO OpenSource D1Mini ESP32 PCB?

It measures 62 × 89.7 mm and has 2 copper layers, 1.6 mm thick.

What parts does the RatGDO OpenSource D1Mini ESP32 use?

25 parts, built around the LM2596S-5.0 and AO3400A. 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 RatGDO OpenSource D1Mini ESP32 KiCad files?

From the scottdube/my-rat-ratgdo repository on GitHub, at the commit this page was made from: the board is kicad_files/D1 Mini - ESP32/RatGDO-OpenSource-D1Mini-ESP32.kicad_pcb and its schematic kicad_files/Bare ESP8266 USB/goatgdo.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the RatGDO OpenSource D1Mini ESP32 design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).