
I2c moist sensor pannel
Miceuz/i2c-moisture-sensor
I2C based soil moisture sensor

High-performance 98 MHz Common-Base FM LNA (100% Agentic AI Designed hardware, KiCad 10, Qucs-S, 50-Ohm CPWG)
Lna fm 98mhz is an open-source printed circuit board by cholan2100, from the cholan2100/lna-ai repository on GitHub. It is a 2-layer board of 34 × 29 mm with 31 parts on 11 nets, routed with 43 tracks and 43 vias.
It is built around the BAT54 and MMBT5179. Its parts include 11 capacitors, 4 resistors, 4 inductors, 3 diodes and 3 connectors.
100% Agentic AI Hardware Design — Zero Direct Human PCB/EDA Tool Involvement
This entire RF hardware project was designed, simulated, modeled in 3D EM, captured, laid out, routed, verified, fitted into custom mechanical enclosures, and exported fully autonomously by an Agentic AI coding assistant (Antigravity).
There was NO direct human interaction with EDA, CAD, or PCB software (no manual drawing in the KiCad Schematic Editor, no manual track routing or polygon placement in the KiCad PCB Editor, no manual 3D modeling in FreeCAD, and no manual GUI interaction in Qucs-S). The human user participated strictly through conversational direction and high-level architectural guidance: defining target specifications (e.g. 98 MHz FM broadcast band, Common-Base topology, Bias-Tee power), reviewing visual renders, requesting enclosure compatibility, and guiding design iterations.
The AI agent completed the entire hardware engineering workflow end-to-end via autonomous code synthesis and headless tool execution:
- 3D Full-Wave EM Modeling (openEMS + FreeCAD): Programmatically set up 3D FDTD electromagnetic simulations using FreeCAD's Microwave Workbench (
Microwave.Solvers.openems), synthesizing a calibrated 4-port Touchstone model (lna_board_full_4port.s4p) capturing microstrip/CPWG physical losses and inter-trace cross-talk isolation (-76.40 dB).- RF Circuit Co-Simulation (Qucsator RF): Wrote netlists connecting active MMBT5179 BJT models, matching networks, DC bias, and the 4-port 3D EM Touchstone block, achieving +19.73 dB gain and -31.33 dB input return loss (VSWR = 1.056:1) at 98.0 MHz.
- Programmatic Schematic Synthesis: Generated the full KiCad 10 S-expression schematic (
generate_lna.py) with zero ERC errors.- Autonomous PCB Layout & 50 Ω CPWG Routing: Programmed the board from scratch using KiCad's Python
pcbnewAPI (build_clean_lna_pcb.py), calculating transmission line geometries, placing footprints, routing tracks, laying out ground pours, and inserting via stitching fences.- Enclosure Mechanical Fitting & Assembly: Resized and shaped the board to 34.00 × 29.00 mm with R = 3.0 mm corner fillets and concentric M2 mounting holes to achieve 100% mechanical alignment with OpenSourceSDR Lab / H4M aluminum and 3D-printed cases (
h4m-keytop-24.stepbase andh4m-keytop-25.steplid from Printables.com).- Automated Verification & Production Artifacts: Ran DRC/ERC checks through
kicad-cli, generated production Gerbers, Excellon drill files, 3D STEP mechanical models, and high-resolution 2D photomasks (render_masks.py).
| Parameter | Specification | Achieved (3D EM + Circuit Co-Simulation) | Notes |
|---|---|---|---|
| Center Frequency ($f_0$) | 98.0 MHz | 98.0 MHz | Centered in the FM broadcast band (88–108 MHz) |
| Forward Gain ($S_{21}$) | $\ge 18\text{ dB}$ | +19.87 dB | Peak gain centered directly at 98.0 MHz ($\pm 0.2\text{ dB}$ flatness 96–100 MHz) |
| Input Return Loss ($S_{11}$) | $\le -15\text{ dB}$ | -28.06 dB (VSWR 1.082:1) | Near-perfect $50\ \Omega$ match ($Z_{\text{in}} = 53.8 - j1.5\ \Omega$) |
| Reverse Isolation ($S_{12}$) | $\le -20\text{ dB}$ | -29.50 dB | Grounded-base configuration eliminates Miller feedback |
| Output Reflection ($S_{22}$) | Resonant Tank | -0.33 dB | High-impedance open-collector resonant match ($Z_{\text{out}} = 1.0 + j12.2\ \Omega$) |
| -3 dB Bandwidth | 88.0 – 108.0 MHz | 14.0 MHz (92.0 – 106.0 MHz) | Integrated LC bandpass pre-filter and tuned collector tank |
| Stability Criteria | Stable across band | **$ | \Delta |
| Physical Trace Losses | Low-loss CPWG | $0.024\text{ dB}$ (In, 8.5 mm), $0.034\text{ dB}$ (Out, 11.0 mm) | FreeCAD-Microwave full-wave 3D FDTD EM modeled |
| Board Cross-Talk Isolation | $\ge 60\text{ dB}$ | -108.82 dB ($S_{31}$), -108.08 dB ($S_{41}$) | Ground via stitching fence between input and output CPWG |
| Operating Voltage | 3.3 V – 6.0 V | 5.0 V Nominal | $I_C \approx 7.5\text{ mA}, V_{CE} \approx 3.5\text{ V}$ |
| PCB Dimensions | Compact Enclosure | $34.00 \times 29.00\text{ mm}$ ($R = 3.0\text{ mm}$ corner fillets) | Fits OpenSourceSDR Lab / H4M case (h4m-keytop-24.step + h4m-keytop-25.step) |
The PCB is dimensioned to fit inside the standard OpenSourceSDR Lab / H4M case (Printables Model 1238229). Both the case base (h4m-keytop-24.step) and lid (h4m-keytop-25.step) are included in the repository.

Figure 1: Raytraced 3D view of the 34×29mm PCB mounted inside the H4M enclosure. Both edge-mount SMA connectors and the 2-pin DC power header seat flush in the case cutouts.

Figure 2: (Left) Orthogonal top view showing concentric M2 screw standoff alignment and 0.70 mm all-around expansion margin. (Right) Close-up of edge-mount SMA port cutout.

Figure 3: Rear isometric view showing the DC power header / USB-C cutout alignment ($X_{\text{USB}} = 18.50\text{ mm}$).

Figure 4: (Left) 3D Isometric raytrace render. (Right) Top orthogonal raytrace view showing 50 Ω CPWG lines, ground via stitching fences, and component placement.

Figure 5: (Left) 3D render without SMA connectors and header pins (for 3D test-fitting). (Right) Bottom solid ground plane with via stitching grid.
To guarantee uncompromising VHF performance, the design avoids simplistic transmission line approximations. Instead, a full-wave 3D Finite-Difference Time-Domain (FDTD) simulation pipeline was implemented combining openEMS and FreeCAD's Microwave Workbench (Microwave.Solvers.openems):
┌────────────────────────────────────────────────────────────────────────┐
│ openEMS 3D Full-Wave EM Simulator (FDTD) │
│ │
│ Port 1: SMA IN ──[CPWG 8.50mm]──► Port 2: L1/C2 Tank │
│ │
│ ░░░░ Ground Via Shield Fence ░░░░ │
│ (Physical Isolation S31 = -76.40 dB) │
│ │
│ Port 3: Collector Tank ──[CPWG 9.55mm]──► Port 4: SMA OUT │
└───────────────────────────────────┬────────────────────────────────────┘
│ Export 4-Port Touchstone (.s4p)
▼
┌────────────────────────────────────────────────────────────────────────┐
│ QUCS Circuit Co-Simulation Engine (qucsator_rf) │
│ │
│ 50Ω Source ──► [Port 1 : Port 2] ──► Matching LC Network │
│ │ │
│ MMBT5179 CB BJT │
│ │ │
│ 50Ω Load ◄── [Port 4 : Port 3] ◄── Tuned Resonant Tank │
└────────────────────────────────────────────────────────────────────────┘

Figure 6: openEMS 4-port 3D EM simulation boundary overlay on the 34×29mm PCB layout, defining Port 1 (Input SMA), Port 2 (Input Tank), Port 3 (Output Tank), and Port 4 (Output SMA).

Figure 7: Final QUCS circuit co-simulation using the full-board 4-port openEMS Touchstone model (`lna_board_full_4port.s4p`): (A) Forward Gain |S21| (+19.73 dB peak at 98 MHz) and Input Return Loss |S11| (-31.33 dB, VSWR 1.056:1); (B) Reverse Isolation |S12| (-29.65 dB) and Output Reflection |S22| (-0.38 dB); (C) Complex Impedance Smith Chart showing S11 locus centered at 52.3 - j1.5 Ω.

Figure 8: 4-Panel simulation comparison showing: (1) Gain progression from ideal baseline to 3D EM co-simulation; (2) Return loss response; (3) Physical substrate cross-talk isolation (-76.40 dB); (4) Rollett stability factor K and determinant |Δ| across 10–500 MHz.
RF IN (50Ω) ──► [CPWG 8.50mm] ──► [L1 22nH || C2 27pF] ──► [C1 91pF] ──► Emitter (MMBT5179)
│
Base ───────────┴───► AC Ground (C3,C4,C5)
│
Collector
│
[L3 150nH || C6 6.8pF] (Resonant Tank)
│
RF OUT (50Ω) ◄── [CPWG 9.55mm] ◄── [L4 1µH Choke] ◄── [C7 10pF] ◄──────────────┘
│
Bias-Tee DC ──► [JP1 Jumper] ──► VCC (5V Bus)

Figure 9: Programmatically generated KiCad 10 schematic (`lna_fm_98mhz.kicad_sch`) with zero ERC errors.
The repository includes both native STEP CAD files and 3D printing STL files for the complete enclosure assembly:
| File Name | Format | Description |
|---|---|---|
enclosure/h4m-keytop-24.step | STEP | OpenSourceSDR Lab / H4M Enclosure Base Case (Credits: pop aruaru) |
enclosure/h4m_case.stl | STL | 3D printable mesh of the enclosure base |
enclosure/h4m-keytop-25.step | STEP | OpenSourceSDR Lab / H4M Enclosure Top Lid (Credits: pop aruaru) |
enclosure/h4m_lid.stl | STL | 3D printable mesh of the enclosure top lid |
enclosure/lna_fm_98mhz_in_enclosure.step | STEP | Combined 3D assembly: PCB seated inside base case (open top for inspection) |
enclosure/lna_fm_98mhz_in_enclosure.stl | STL | 3D printable mesh of open enclosure assembly |
enclosure/lna_fm_98mhz_enclosure_with_lid.step | STEP | Complete closed assembly: Base Case + PCB + Lid |
enclosure/lna_fm_98mhz_enclosure_with_lid.stl | STL | 3D printable mesh of fully assembled closed enclosure |
freecad/lna_fm_98mhz_assembly.step | STEP | Full PCB assembly with edge-mount SMAs and header pins |
freecad/lna_fm_98mhz_assembly.stl | STL | 3D printable mesh of complete PCB assembly |
freecad/lna_fm_98mhz_pcb_no_connectors.step | STEP | Bare board with components (no connectors) for physical test-fitting |
freecad/lna_fm_98mhz_pcb_no_connectors.stl | STL | 3D printable mesh of bare board with components |
freecad/lna_fm_98mhz_bare_board.stl | STL | Bare FR-4 substrate outline ($34 \times 29\text{ mm}, R = 3\text{ mm}$) |
3D Enclosure Design Credits: The 3D CAD models for the enclosure base and lid (
enclosure/h4m-keytop-24.stepandenclosure/h4m-keytop-25.step) are designed by pop aruaru and published on Printables.com:
- Platform: Printables.com by Prusa
- Model: OpenSourceSDR Lab AMP case by pop aruaru
- Creator: pop aruaru (Printables Profile)
- Directory: See
enclosure/README.mdfor 3D printing parameters, mechanical tolerances, and assembly details.Full credit and sincere thanks go to pop aruaru and the Printables.com maker community for providing the original mechanical CAD enclosure design. The PCB outline ($34.00 \times 29.00\text{ mm}$, $R = 3.0\text{ mm}$ fillets), M2 mounting standoff coordinates, edge-mount SMA connector cutouts, and DC power header coordinates in this project were specifically dimensioned and aligned to guarantee seamless, drop-in compatibility with this case.
lna-ai/
├── README.md # Master project documentation
├── AGENT.md # Autonomous RF engineering blueprint & manual
├── requirements.txt # Python environment requirements
├── .gitignore # Build & temporary files ignore list
│
├── kicad/ # KiCad 10 Schematic, PCB Layout & Manufacturing
│ ├── lna_fm_98mhz.kicad_pro # KiCad 10 project file
│ ├── lna_fm_98mhz.kicad_sch # KiCad schematic (100% code synthesized)
│ ├── lna_fm_98mhz.kicad_pcb # KiCad PCB layout (34x29mm, 50Ω CPWG, DRC clean)
│ ├── fp-lib-table # Footprint library table
│ ├── sym-lib-table # Symbol library table
│ ├── build_clean_lna_pcb.py # Programmatic PCB layout generator (pcbnew API)
│ ├── generate_lna.py # Programmatic schematic generator (MCP tool)
│ ├── render_masks.py # Headless vector & raster mask exporter
│ ├── drc_report.json # Automated kicad-cli DRC report (0 errors)
│ ├── lna_fm_98mhz-drc.rpt # Text DRC report
│ ├── lna_fm_98mhz-erc.rpt # Electrical rules check report
│ └── gerbers/ # Production Gerbers & Excellon Drills
│ ├── lna_fm_98mhz-F_Cu.gbr # Front copper layer
│ ├── lna_fm_98mhz-B_Cu.gbr # Back copper ground plane
│ ├── lna_fm_98mhz-F_Mask.gbr # Front solder mask
│ ├── lna_fm_98mhz-B_Mask.gbr # Back solder mask
│ ├── lna_fm_98mhz-F_Silkscreen.gbr # Front silkscreen| Tool | Recommended Version | Purpose |
|---|---|---|
| KiCad | 10.0+ (or 8.0/9.0) | Schematic, PCB layout, DRC/ERC, Gerber & STEP export |
| FreeCAD | 0.21+ / 1.0+ | Microwave Workbench EM driver, 3D CAD modeling & STEP processing |
| openEMS | 0.0.35+ | 3D Full-Wave FDTD Electromagnetic solver |
| Qucs-S / Qucsator | 25.2+ | Non-linear RF circuit co-simulation and S-parameter engine |
| Python | 3.10+ | Automation scripts, scikit-rf, numpy, matplotlib, pypdfium2 |
# Install Python requirements
pip install -r requirements.txt
pip install scikit-rf matplotlib numpy pypdfium2 PillowAll hardware artifacts and simulations can be executed via a single master command:
# Runs full verification, builds FreeCAD model, performs Qucs-S co-sim, and renders plots
& "D:\Programs\FreeCAD\bin\python.exe" run_pipeline.py
# Optional: Re-run the full 3D FDTD EM solver through FreeCAD-Microwave / openEMS (~25 min)
& "D:\Programs\FreeCAD\bin\python.exe" run_pipeline.py --solve-emcd freecad
& "D:\Programs\FreeCAD\bin\python.exe" build_freecad_microwave_model.pycd freecad
& "D:\Programs\FreeCAD\bin\python.exe" run_full_board_freecad_em.pypcbnew Python API)cd kicad
& "D:\Programs\KiCad\bin\python.exe" build_clean_lna_pcb.pycd kicad
kicad-cli pcb drc --severity-all --output drc_report.json --format json lna_fm_98mhz.kicad_pcbcd openems
& "D:\Programs\FreeCAD\bin\python.exe" generate_lna_full_board_s4p.pycd qucs-sim
& "D:\Programs\FreeCAD\bin\python.exe" run_full_board_cosim.py
& "D:\Programs\FreeCAD\bin\python.exe" plot_full_board_cosim_results.pycd qucs-sim
& "D:\Programs\FreeCAD\bin\python.exe" verify_stability.pycd kicad
# Export Gerbers
kicad-cli pcb export gerbers -o gerbers/ --layers F.Cu,B.Cu,F.Mask,B.Mask,F.Silkscreen,B.Silkscreen,Edge.Cuts lna_fm_98mhz.kicad_pcb
# Export Drills
kicad-cli pcb export drill -o gerbers/ --format excellon --excellon-zeros-format decimal lna_fm_98mhz.kicad_pcbcd kicad
& "D:\Programs\KiCad\bin\python.exe" render_masks.py| Ref | Value | Footprint | Description | Recommended Part |
|---|---|---|---|---|
| Q1 | MMBT5179 | SOT-23-3 | VHF/UHF NPN RF BJT ($f_T = 1.4\text{ GHz}$) | ON Semi / Central Semi MMBT5179 |
| L1 | 22 nH | 0603 SMD | RF Input shunt tank inductor (High-Q wirewound) | Murata LQW18AN22NG00D |
| C2 | 27 pF | 0603 SMD | RF Input shunt tank capacitor (Pre-filter C0G) | KEMET C0603C270J5GACTU |
| C1 | 91 pF | 0805 SMD | Input series match & DC block capacitor (C0G) | KEMET C0805C910J5GACTU |
| L2 | 470 nH | 0603 SMD | Emitter DC bias return RF choke | Coilcraft 0603CS-R47XJLU |
| L3 | 150 nH | 0603 SMD | Collector resonant tank tuning inductor | Murata LQW18ANR15J00D |
| L4 | 1.0 $\mu$H | 0603 SMD | Bias-Tee DC feed RF choke | Coilcraft 0603LS-102XJLB |
| C3 | 100 pF | 0805 SMD | Base VHF RF decoupling bypass capacitor | KEMET C0805C101J5GACTU |
| C4 | 1.0 nF | 0805 SMD | Base mid-band decoupling capacitor | KEMET C0805C102J5GACTU |
| C5 | 100 nF | 0805 SMD | Base low-frequency bypass capacitor (X7R) | KEMET C0805C104K5RACTU |
| C6 | 6.8 pF | 0805 SMD | Collector resonant tank capacitor (C0G, $\pm 0.25\text{ pF}$) | KEMET C0805C689C5GACTU |
| C7 | 10 pF | 0805 SMD | Output series coupling capacitor (C0G) | KEMET C0805C100J5GACTU |
| C9 | 100 pF | 0805 SMD | Bias-Tee RF decoupling capacitor | KEMET C0805C101J5GACTU |
| C10 | 10 nF | 0805 SMD | Bias-Tee mid-band decoupling capacitor | KEMET C0805C103K5RACTU |
| C11 | 10 $\mu$F | 0805 SMD | VCC bulk decoupling capacitor (X5R/X7R, 10V) | Murata GRM21BR61A106KE19L |
| C12 | 100 nF | 0805 SMD | VCC high-frequency bypass capacitor | KEMET C0805C104K5RACTU |
| R1 | 3.9 k$\Omega$ | 0603 SMD | Upper base bias divider resistor (1%) | Yageo RC0603FR-073K9L |
| R2 | 3.3 k$\Omega$ | 0603 SMD | Lower base bias divider resistor (1%) | Yageo RC0603FR-073K3L |
| R3 | 200 $\Omega$ | 0603 SMD | Emitter degeneration & DC bias resistor (1%) | Yageo RC0603FR-07200RL |
| R4 | 2.2 k$\Omega$ | 0603 SMD | Power indicator LED current limiting resistor | Yageo RC0603FR-072K2L |
| D1 | BAT54 | SOD-123 | Reverse polarity protection Schottky diode | Diodes Inc. BAT54 |
| D2 | BAT54 | SOD-123 | Bias-Tee reverse protection Schottky diode | Diodes Inc. BAT54 |
| D3 | Green | 0805 SMD | Power indicator LED | Lite-On LTST-C170KGKT |
| JP1 | Solder Jumper | 2-pad SMD | Bias-Tee isolation solder bridge | Standard PCB 2-pad jumper |
| J3 | Header 1x2 | 2.54mm Pin | External DC / Battery solder pads | 2-pin 0.1" header / wire pads |
| J1 | SMA Jack | Edge-Mount | 50 $\Omega$ RF Input Connector (1.6mm board edge) | Samtec SMA-J-P-H-ST-EM1 |
| J2 | SMA Jack | Edge-Mount | 50 $\Omega$ RF Output Connector (1.6mm board edge) | Samtec SMA-J-P-H-ST-EM1 |
enclosure/).Hardware design, schematics, PCB layout, 3D models, and simulation pipelines are released under the CERN-OHL-P v2 (Permissive Open Hardware License) and MIT License.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | M2 | MountingHole_2.2mm_M2_Pad | H1, H2, H3, H4 |
| 2 | 100pF | C_0805_2012Metric | C3, C9 |
| 2 | BAT54 | D_SOD-123 | D1, D2 |
| 1 | 100nF | C_0603_1608Metric | C12 |
| 1 | 100nF | C_0805_2012Metric | C5 |
| 1 | 10nF | C_0805_2012Metric | C10 |
| 1 | 10pF | C_0805_2012Metric | C7 |
| 1 | 10uF | C_0805_2012Metric | C11 |
| 1 | 150nH | L_0603_1608Metric | L3 |
| 1 | 1nF | C_0805_2012Metric | C4 |
| 1 | 1uH | L_0603_1608Metric | L4 |
| 1 | 2.2k | R_0603_1608Metric | R4 |
| 1 | 200R | R_0603_1608Metric | R3 |
| 1 | 22nH | L_0603_1608Metric | L1 |
| 1 | 27pF | C_0603_1608Metric | C2 |
| 1 | 3.3k | R_0603_1608Metric | R2 |
| 1 | 3.9k | R_0603_1608Metric | R1 |
| 1 | 470nH | L_0603_1608Metric | L2 |
| 1 | 6.8pF | C_0805_2012Metric | C6 |
| 1 | 91pF | C_0805_2012Metric | C1 |
| 1 | BAT_PADS | PinHeader_1x02_P2.54mm_Vertical | J3 |
| 1 | LED | LED_0805_2012Metric | D3 |
| 1 | MMBT5179 | SOT-23 | Q1 |
| 1 | SMA_50R_IN | SMA_Samtec_SMA-J-P-H-ST-EM1_EdgeMount | J1 |
| 1 | SMA_50R_OUT | SMA_Samtec_SMA-J-P-H-ST-EM1_EdgeMount | J2 |
| 1 | SolderJumper_Open | SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP1 |

Miceuz/i2c-moisture-sensor
I2C based soil moisture sensor

Stefan-Olt/MISRC
MISRC Is a multi channel RF capture device for FM RF, S-Video, CVBS RAW capture and anything else, but intended and supported for the decode family of projects vhs-decode, ld-decode, hifi-decode.

magkopian/raspberry-pi-compute-module-base-board
Base board for the Raspberry Pi Compute Module

drkmsmithjr/NixiePowerSupply
170v Nixie Tube Power Supply from 5v Supply

Miceuz/rs485-moist-sensor
Digital (RS485 - based) soil moisture and temperature sensor

google/myelin-acorn-electron-hardware
Phillip Pearson's retro hardware projects for the Acorn Electron

phonght32/OpenDrone_HW_AIO_FC_F405
OpenDrone Project - AIO Brushless FC F405.

TU-Darmstadt-APQ/RedPitaya-Lockbox
Digital controller for laser frequency stabilization based on the RedPitaya STEMlab 125-14 board
It measures 34 × 29 mm and has 2 copper layers, 1.6 mm thick.
31 parts, built around the BAT54 and MMBT5179. 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.
From the cholan2100/lna-ai repository on GitHub, at the commit this page was made from: the board is kicad/lna_fm_98mhz.kicad_pcb and its schematic kicad/lna_fm_98mhz.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask cholan2100 before reusing the design.