Skip to the content
PCBKitNew board
2 layers48 × 28 mmPir camper am312, the printed circuit board in 3D

PIR motion switch for Revotion NODE Ambient (AM312, PhotoMOS, KiCad)

Size
48 × 28 mm
Copper layers
2
Thickness
1.6 mm
Parts
28
Nets
18
Pads
68
Tracks, vias
160, 11
Pours
2
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
26 Oct 2026
Updated
26 Oct 2026

Overview

Pir camper am312 is an open-source printed circuit board by samba09, from the samba09/camper-pir-switch repository on GitHub, published under the MIT licence. It is a 2-layer board of 48 × 28 mm with 28 parts on 18 nets, routed with 160 tracks and 11 vias.

It is built around the AQY212S, TPS70933DBV and 1N4148W, with the BC847C, BC857C and MMBTA14 among its other parts. Its parts include 8 resistors, 5 capacitors, 4 transistors, 3 ICs and 2 diodes. It belongs with the sensors and measurement boards of this library.

Main components

6

README

README.md

PIR camper switch for Revotion

A small motion sensor board that switches the camper light through a Revotion NODE Ambient switch input. Motion closes a potential-free contact (AQY212 PhotoMOS) for an adjustable hold time of about 2 minutes, and a light sensor keeps it from triggering in daylight. It runs from the camper's 12 V supply and draws about 0.1 mA while idle.

AM312 board schematic

Variants

VariantSensorBuildDocumentation
AM312 SMD boardAM312 module in a socketKiCad PCB, ready for productionkicad/pir_camper_am312/
AM312 perfboardbare AM312 + Fresnel lens22 × 18 holes, no jumpersPIR_Camper_AM312.pdf
HC-SR505 perfboardHC-SR505 module18 × 14 holes, two jumpersPIR_Camper.pdf
HC-SR505 retrofitexisting HC-SR505 boardadds the off-delay to an already built board without delaylochraster_umbau_verzoegerung_*.svg

The HC-SR505 board is the first version; it was built and measured (hold time about 3 min). The AM312 boards replace it and add the light sensor. The PDFs (also as HTML) contain the full build guides: schematic, perfboard layout with every solder path, parts list, simulation results and test steps.

How it works

text
12 V ── reverse-polarity diode ── 3.0/3.3 V LDO ── AM312 PIR
                                                     │ 2.3 s pulse per motion
                                       light inhibit ┤ (LDR + trimmer, Q2)
                                                     ▼
                                   off-delay: C1 + R2 → Q1 (≈ 2 min)
                                                     ▼
                                   AQY212 PhotoMOS LED (≈ 5 mA)
                                                     ▼
                         potential-free contact ── NODE Ambient switch input
  • Off-delay: each motion pulse charges C1. When the pulse ends, C1 can only discharge through R2 into Q1's base, which keeps the PhotoMOS on. New motion recharges C1 and restarts the timer.
  • Light inhibit: in daylight, the LDR divider turns on Q2, which shorts the sensor pulse so it cannot charge C1. A running timer is not cut off.
  • Lamp-on override: the lamp's own light would otherwise block retriggering. Q3 senses the PhotoMOS LED current and, through Q4, holds Q2 off while the output is on, so motion keeps the light on.
  • Output: the AQY212 contact (60 V, about 0.5 A, AC/DC, no polarity) replaces the wall switch on the Ambient input. It is meant for that signal input, not for switching lights or pumps directly.

Connecting to Revotion

Terminal J1:

PinSignalConnect to
1+12Vcamper +12 V (fused)
2GNDcamper GND
3SW_A+12 V, or the left pin of the Ambient input if it carries 12 V (measure it)
4SW_Bright pin of the Ambient input (12 V = on)

Set that NODE Ambient input to switch mode ("Schalter"), not push-button mode ("Taster"). The sensor board and the Revotion system must share the same ground, which they do when both run from the camper's 12 V distribution.

Adjusting

BoardHold timeLight threshold
AM312 SMDtrimmer RV2: about 50 s to 3.5 mintrimmer RV1
AM312 perfboardR2/C1: 56 kΩ / 1000 µF ≈ 2 min (table in the PDF)trimmer RV1
HC-SR505R2: 20 kΩ with 2000 µF ≈ 2.3 min (table in the PDF)–

Set the light threshold on site: in the light where the sensor should just stop reacting (for example at dusk), turn RV1 until motion no longer switches on. Without the LDR the board simply ignores daylight.

The end of the hold time is a slow fade, so real parts vary: the HC-SR505 board measured about 3 min where the simulation gave 2.3 min. The PDFs explain which part tolerances cause that.

AM312 SMD board

kicad/pir_camper_am312/ holds the KiCad 7 project:

FileContent
pir_camper_am312.kicad_sch / .kicad_pcb / .kicad_proschematic and routed PCB
pir_camper.kicad_sym, pir_camper.pretty/project library (AM312 module socket)
fab/pir_camper_am312-gerbers.zipGerbers and drill files for the PCB maker
fab/pir_camper_am312-bom.csv, -pos.csvparts list and pick-and-place positions
fab/pir_camper_am312-1to1.pdf1:1 print to check the footprints
fab/reichelt_warenkorb.csv, reichelt_warenkorb_info.txtparts order at Reichelt for 2 boards (about 42 EUR, checked 2026-10-02) plus the parts to get elsewhere
drc.rptdesign rule check: no errors, 2 warnings for locally modified connector footprints

Main parts: AM312 module, TPS70933 3.3 V LDO, AQY212S PhotoMOS (SOP-4), MMBTA14 Darlington for the timer, BC847C/BC857C, Bourns 3314 trimmers, Phoenix MC 3.81 mm terminal, and a JST XH socket for the optional LDR.

Regenerating the files

Everything is generated by the Python scripts in tools/:

ScriptOutputNeeds
gen_schematics.py, gen_am312_schematic.pyschematic SVGsschemdraw
gen_ltspice.pyLTspice files (*.asc, *.cir)–
gen_simplots.py, gen_am312_sim.pysimulation plots and *_results.jsonngspice
gen_perfboard.py, gen_retrofit.pyperfboard layout SVGs–
build_doc.py, build_am312_doc.pyHTML and PDF build guidesGoogle Chrome or Chromium (headless, for the PDF)
gen_kicad.py, pcb_kicad.pyKiCad schematic, placed PCB, Freerouting .dsnKiCad 7 (pcbnew Python module)
route_kicad.pyrouting, GND pour, DRC, Gerbers, BOMKiCad 7 kicad-cli, Freerouting + Java

For example, the AM312 perfboard guide:

text
pip install schemdraw
python3 tools/gen_am312_schematic.py
python3 tools/gen_ltspice.py
python3 tools/gen_am312_sim.py
python3 tools/build_am312_doc.py

Files

FileContent
PIR_Camper_AM312.pdf / .htmlbuild guide, AM312 perfboard
PIR_Camper.pdf / .htmlbuild guide, HC-SR505 perfboard
schaltplan_am312.svg, schaltplan_mit_verzoegerung.svgschematics (AM312, HC-SR505)
lochraster_am312_*.svgAM312 perfboard, top and bottom view
lochraster_mit_verzoegerung_*.svgHC-SR505 perfboard, top and bottom view
lochraster_umbau_verzoegerung_*.svgretrofit of the HC-SR505 board without delay
ltspice_am312.asc, ltspice_mit_verzoegerung.asc / .cirsimulation netlists (LTspice, also run in ngspice)
am312_sim_*.svg, sim_*.svg, *sim_results.jsonsimulation plots and results
kicad/AM312 SMD board, see above
tools/generators for all of the above

"Schaltplan" is German for schematic, "Lochraster" for perfboard, "mit Verzögerung" for "with delay" and "Umbau" for retrofit.

Revotion and NODE are trademarks of REVOTION GmbH. This project is not affiliated with REVOTION.

License

MIT, see LICENSE.

Parts

28
QtyValueFootprintReferences
2100nFCapacitor_SMD:C_0805_2012MetricC4, C5
21N4148WDiode_SMD:D_SOD-123D1, D2
2BC847CPackage_TO_SOT_SMD:SOT-23Q2, Q4
2M3MountingHole:MountingHole_3.2mm_M3H1, H2
11.8kResistor_SMD:R_0805_2012MetricR4
1100kResistor_SMD:R_0805_2012MetricR7
110kResistor_SMD:R_0805_2012MetricR5
112V GND SW_A SW_BConnector_Phoenix_MC:PhoenixContact_MC_1,5_4-G-3.81_1x04_P3.81mm_HorizontalJ1
11MResistor_SMD:R_0805_2012MetricR8
11MPotentiometer_SMD:Potentiometer_Bourns_3314G_VerticalRV2
11µF 25VCapacitor_SMD:C_0805_2012MetricC2
12.2kResistor_SMD:R_0805_2012MetricR3
12.2µF 10VCapacitor_SMD:C_0805_2012MetricC3
122kResistor_SMD:R_0805_2012MetricR2
1330µF 6.3VCapacitor_SMD:CP_Elec_6.3x5.4C1
1470Resistor_SMD:R_0805_2012MetricR1
147kResistor_SMD:R_0805_2012MetricR6
150kPotentiometer_SMD:Potentiometer_Bourns_3314J_VerticalRV1
1AM312 modulepir_camper:AM312_Module_SocketU2
1AQY212SPackage_SO:SO-4_4.4x4.3mm_P2.54mmU1
1BC857CPackage_TO_SOT_SMD:SOT-23Q3
1LDR GL5528 (optional)Connector_JST:JST_XH_S2B-XH-A_1x02_P2.50mm_HorizontalJ2
1MMBTA14Package_TO_SOT_SMD:SOT-23Q1
1TPS70933DBVPackage_TO_SOT_SMD:SOT-23-5U3

Questions

How big is the Pir camper am312 PCB?

It measures 48 × 28 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Pir camper am312 use?

28 parts, built around the AQY212S, TPS70933DBV, 1N4148W and BC847C. 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 Pir camper am312 KiCad files?

From the samba09/camper-pir-switch repository on GitHub, at the commit this page was made from: the board is kicad/pir_camper_am312/pir_camper_am312.kicad_pcb and its schematic kicad/pir_camper_am312/pir_camper_am312.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Pir camper am312 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).

Similar boards

  • 2 layers130 × 45 mmTG Control V3, the printed circuit board in 3D

    TG Control V3

    PA3AEF/HP8562A-Tracking-Generator

    Homebrew tracking generator for base-band, 6cm, 3cm and 12mm bands

    146 partsMIT
  • 2 layers51 × 71 mmOTThing, the printed circuit board in 3D

    OTThing

    Phunkafizer/OT-Thing

    A compact universal OpenTherm WiFi Interface

    111 parts28
  • 2 layers168.5 × 58.8 mmGruvin9x, the printed circuit board in 3D

    Gruvin9x

    gruvin/gruvin9x

    Automatically exported from code.google.com/p/gruvin9x

    261 parts7
  • 2 layers58 × 100 mmFullBoardChargePumpCapMult, the printed circuit board in 3D

    FullBoardChargePumpCapMult

    z2amiller/pedalfx

    Replaces the Panasonic MN3102 (clock generator for MN3204/05/07/08/09 BBDs) with a CD4047B plus four passives. Two ways to use it:

    40 parts7
  • 2 layers40 × 99.5 mmMIDI Tangle IO, the printed circuit board in 3D

    MIDI Tangle IO

    GuavTek/M2IDI_TANGLE_HW

    A multiplexer module for the M2IDI system

    118 partsCERN-OHL-W-2.0
  • 4 layers75 × 90 mmVehiclePrecharge PCB, the printed circuit board in 3D

    VehiclePrecharge PCB

    nsm81/VehiclePrecharge_PCB

    The precharge board contains the precharge resistors, precharge relay, main relay drivers (with economisers), and a controlling micro.

    56 parts
  • 2 layers80 × 60 mmIRIS C5 RevC, the printed circuit board in 3D

    IRIS C5 RevC

    Benv-B/photo-frame-hardware

    Open hardware carrier for an AirDrop ChLCD color e-paper frame: XIAO ESP32-C5, NFC wake, KiCad, schematic, BOM and Gerbers. CERN-OHL-P-2.0.

    66 partsCERN-OHL-P-2.0