Skip to content

Design: Door Controller

Timo Sariwating edited this page Nov 19, 2026 · 10 revisions

Status: idea (2026-11-19). Hardware ordered, nothing built yet.

A general door controller: our own firmware on a small relay board that opens locks and reports whether they are shut. Its first use is a locker function: a few small cabinet doors, each with its own lock. Later the same firmware can drive other doors.

The firmware is our own, written for Maker Connect. Deliberately not ESPHome or Tasmota. This changes the first plan in Door Access, where Home Assistant drove the hardware.

Lockers and doors are access (getting in), not machine permissions (who may use which machine). See Door Access.

The hardware

The board: Kincony KC868-A6

An ESP32 board with relays and inputs, ordered 2026-11-19 and not yet arrived. Its exact relay and input ratings are checked when it is in hand.

Plan: one relay per lock (opens it), one input per lock (reads its switch).

The lock: SARY XG-07C-12V

Electronic lock with feedback, metal, 12 V DC. We have 4.

Shop: Tinytronics: Electronic lock with feedback, metal, 12V DC

How it works:

  • Opening: 12 V on the red and black wires (polarity does not matter). The solenoid releases the hook, which springs out.
  • Feedback: when the lock is closed, the blue and white wires are connected by an internal switch (normally open). Open lock = open circuit.
Property Value
Model SARY XG-07C-12V
Supply 12 V DC (min and max)
Current while opening about 2000 mA (±10 % at 12 V)
Longest activation 0.5 s
Cooldown after each activation at least 10 s
Feedback switch physical, NO, closed when locked; lifespan 300,000
Size 73 × 58 × 13 mm, 148 g
Mounting M4 thread
Connectors power: JST-SM (compatible) male; switch: JST-SM (compatible) female
Wires 0.15 m
Operating range −20 to 40 °C, 5–90 % RH
In the box the lock and its hook

Rules the firmware must keep

These come from the lock's datasheet. A longer pulse burns out the coil.

  • Opening is a pulse of at most 0.5 s. The firmware enforces this itself. No setting, command or bug may hold a relay on longer.
  • At least 10 s between two pulses of the same lock. An open request inside that time waits or is refused with a reason. It is never sent through.
  • The switch is the truth. "Locked" means the blue/white circuit is closed. After a pulse the firmware reports what the switch says, not what it asked for.
  • At about 2 A per lock, the power supply must cover every lock that can be pulsed at the same time.

Open questions

  • Who may open which locker, and how: a badge, the website, or both?
  • What does the controller do when the hub cannot be reached?
  • How does the controller talk to the hub: like the agent, or its own link?
  • How many locks may pulse at once, and so how big is the power supply?

Clone this wiki locally