LF PowerGrid

Type to search devices, guides and classnames.

    Wiki
    Logic & Sensors

    Logic Gates

    AND, OR, XOR gates and Memory Cell for building automated circuits.

    Loading Logic Gates…

    Overview

    Logic gates are the core building blocks for automation in LF PowerGrid. They take two input signals and produce one output based on boolean logic. Combined with sensors and switches, they let you build anything from simple interlocks to complex automated systems.

    Specifications

    PropertyValue
    TypePassthrough
    Throughput Capacity100 u/s
    Self Consumption0 u/s
    Ports2 in / 1 out
    Is SourceYes (drives downstream loads)
    Weight1,200 g
    Class NamesLFPG_AND_Gate, LFPG_OR_Gate, LFPG_XOR_Gate

    Gate Types

    GateOutput ON when...Use Case
    ANDBoth Input 0 AND Input 1 are ONTwo-factor verification, safety interlocks
    ORInput 0 OR Input 1 (or both) are ONMultiple triggers for same action
    XORExactly one input is ON (not both)Exactly-one-input logic only; not a two-door airlock interlock by itself
    Memory Cell (separate device, 100 u/s)4 IN (input_0 power, input_1 toggle, input_2 reset, input_3 set) + 2 OUT (output_0 Q, output_1 ¬Q). TOGGLE forces ON while it receives a signal; SET/RESET change the latchLatching with SET/RESET; override with TOGGLE

    LED Indicators (3 LEDs)

    • LED 1: Input 0 status — green when receiving power
    • LED 2: Input 1 status — green when receiving power
    • LED 3: Output — green when gate is open and has input, red when gate is closed but has input, off when no input

    Wiring Examples

    Security Door (AND — two-factor)

    Remote Switch
    Motion Sensor
    AND Gate
    Door Controller

    Door only opens when someone toggles the remote AND is physically present.

    Multi-Trigger Alarm (OR)

    Motion Sensor
    Laser Detector
    OR Gate
    Ceiling Light (10 u/s)
    A real light load, not a speaker alarm

    A real 10 u/s light turns on if either sensor detects something; a speaker does not create an alarm tone by itself.

    Alternating inputs (XOR)

    XOR is ON when exactly one input is ON. It does not by itself guarantee an airlock interlock — each Door Controller controls one door.

    Toggle Light (Memory Cell)

    Use SET to latch the light on and RESET to latch it off. TOGGLE only forces ON while its signal is present.

    Chained Logic

    To combine three signals, chain two 2-input gates: feed the first AND output plus the third signal into a second AND gate (each gate has only 2 inputs and 1 output).

    The Memory Cell also needs continuous power on input_0: control is input_3 SET and input_2 RESET, with output_0 Q and output_1 ¬Q. SET/RESET alone do not replace that continuous input_0 power.

    Gate diagrams are partial views: any sensor or switch shown as an input is assumed to be already powered separately; the gate does not generate that power.

    Tips

    • Logic gates consume 0 u/s — they're free to use and don't drain your power budget.
    • They pass through up to 100 u/s. A splitter after a gate does not raise that 100 u/s limit — branch limits still apply upstream.
    • Use the Memory Cell's SET/RESET inputs for a persistent latch; TOGGLE is only an override while signalled.
    • Chain multiple gates to create complex conditions (3+ inputs).