### Integrating Phoenix Contact Library into LibrePCB Projects Source: https://context7.com/librepcb-libraries/phoenix.lplib/llms.txt A step-by-step guide using bash commands and GUI instructions to clone the Phoenix Contact library, add it to a LibrePCB project, place components, run ERC, update the PCB layout, view the 3D model, and generate manufacturing files. This workflow ensures correct component usage and design integrity. ```bash # Step 1: Clone library into LibrePCB workspace cd ~/.local/share/librepcb/libraries/local/ git clone https://github.com/LibrePCB-Libraries/Phoenix.lplib # Step 2: Open LibrePCB and add library to project # In LibrePCB GUI: # Project → Library Manager → Add Library # Select: Phoenix.lplib # Result: Library UUID 58e570ce-a69e-466c-bbe0-65f716386e56 added to project # Step 3: Place components in schematic # Tools → Add Component # Search: "Phoenix PT 2,5/7" # Select: Phoenix PT 2,5/7-5,0-H # Place on schematic and connect nets # Step 4: Run electrical rule check # Tools → Design Rule Check → Run ERC # Expected output: # ✓ No electrical errors # ✓ All nets properly connected # ✓ 7 pins assigned to nets # Step 5: Transfer to board layout # Tools → Update PCB from Schematic # Result: Footprint PHOENIX_PT_2,5/7-5,0-H placed on board # Step 6: View 3D model # View → 3D Preview # Result: STEP model loaded showing physical component # Step 7: Generate manufacturing files # File → Export → Gerber/Excellon # Output files: # - project.GTL (top copper) # - project.GBL (bottom copper) # - project.GTS (top soldermask) # - project.GBS (bottom soldermask) # - project.GTO (top silkscreen) # - project.GBO (bottom silkscreen) # - project.TXT (drill file) # Verify component placement in Gerber viewer gerbv project.GTL project.GTO project.TXT ``` -------------------------------- ### Create New LibrePCB Device Definition Source: https://context7.com/librepcb-libraries/phoenix.lplib/llms.txt A step-by-step guide to creating a new device definition within the LibrePCB library. This process involves generating a unique UUID, creating the necessary directory structure, defining the component's metadata in a .lp file, and committing the changes to version control. ```bash # Step 1: Generate new UUID for the device uuidgen # Step 2: Create device directory mkdir -p dev/7a3c2f1e-9b45-4d8a-a123-456789abcdef # Step 3: Create device definition file cat > dev/7a3c2f1e-9b45-4d8a-a123-456789abcdef/device.lp << 'EOF' (librepcb_device 7a3c2f1e-9b45-4d8a-a123-456789abcdef (name "Phoenix PT 1,5/4-5,0-H") (description "Screw terminal from Phoenix Contact:\n\nCircuits: 4\nPitch: 5.00 mm\nHeight: 11.40 mm\nConductor: 1.5 mm²") (keywords "screw,terminal,block,5mm,1x4") (author "Your Name") (version "0.1") (created 2025-11-02T12:00:00Z) (deprecated false) (generated_by "") (category f9db4ef5-2220-462a-adff-deac8402ecf0) (resource "Datasheet PT 1,5/4-5,0-H" (mediatype "application/pdf") (url "https://www.phoenixcontact.com/us/products/1935174/pdf") ) (component b740698a-90b7-40ab-a3d2-69b64e7b8163) (package c4d8e2f1-a123-4567-89ab-cdef01234567) (pad 11111111-1111-1111-1111-111111111111 (signal 22222222-2222-2222-2222-222222222222)) (pad 33333333-3333-3333-3333-333333333333 (signal 44444444-4444-4444-4444-444444444444)) (pad 55555555-5555-5555-5555-555555555555 (signal 66666666-6666-6666-6666-666666666666)) (pad 77777777-7777-7777-7777-777777777777 (signal 88888888-8888-8888-8888-888888888888)) (part "1935174" (manufacturer "Phoenix Contact") (attribute "PITCH" (type string) (unit none) (value "5.00 mm")) (attribute "CONDUCTOR" (type string) (unit none) (value "1.5 mm²")) ) ) EOF # Step 4: Validate the new device (requires LibrePCB CLI) librepcb-cli open-library --strict --check . # Step 5: Commit to version control git add dev/7a3c2f1e-9b45-4d8a-a123-456789abcdef/ git commit -m "Add Phoenix PT 1,5/4-5,0-H device definition\n\n- 4-circuit screw terminal\n- 5.00mm pitch, 1.5mm² conductor\n- Part number: 1935174" ``` -------------------------------- ### LibrePCB Device Definition - Spring-Cage Terminal Block (Lisp) Source: https://context7.com/librepcb-libraries/phoenix.lplib/llms.txt Defines an individual electronic component, linking its schematic symbol to its PCB footprint and mapping electrical signals to physical pads. This example specifies a 3-position spring-cage terminal block with a 45-degree mounting angle and 3.5mm pitch, including procurement details. It uses LibrePCB's S-expression based format. ```lisp (librepcb_device 022a90f1-9aed-451a-8b94-32ff0ceb4b1d (name "Phoenix PTSA 1.5/3-3.5-Z") (description "Spring-Cage PCB Termination Block with 3 positions, 45 degree mount with 3.5mm pitch") (keywords "ptsa,combicon,spring-cage") (author "Raphael Nestler") (version "0.2") (created 2019-06-15T01:16:11Z) (deprecated false) (generated_by "") (category f9db4ef5-2220-462a-adff-deac8402ecf0) (component ce2ea95f-dbd2-432e-a6a6-6c20043f6d7e) (package 623398d0-43f3-4601-9cc4-cbce192a8521) (pad 23e67ff6-c877-4341-8f69-2249707dd252 (signal 0fce2b54-6c4d-4fb2-8229-8ccd56b78f3d)) (pad 824914fc-da79-471d-94cc-157da92159d8 (signal a67fd334-a144-42f2-a582-a8c1bdbcbcee)) (pad 867e6ba9-b0cd-46a3-a720-e249670f36e6 (signal 90333d19-ae13-468d-ac46-f52fd51015ff)) (part "1985205" (manufacturer "Phoenix Contact")) ) ``` -------------------------------- ### LibrePCB Library Directory Structure and Commands Source: https://context7.com/librepcb-libraries/phoenix.lplib/llms.txt Illustrates the standardized flat UUID-based directory structure for a LibrePCB component library. It includes common bash commands for navigating the file system, listing components, searching for devices by name, and verifying the presence of 3D models. ```bash # Library root structure /tmp/context7-isolated-It4UPW/repo/ ├── library.lp # Root library metadata ├── .librepcb-lib # Version marker (contains "1") ├── dev/ # Device definitions (31 devices) │ ├── 022a90f1-9aed-451a-8b94-32ff0ceb4b1d/ │ │ └── device.lp # PTSA 1.5/3-3.5-Z │ ├── 0e644ed8-8279-4244-9147-8dffdefbd3b4/ │ │ └── device.lp # PT 1,5/2-5,0-H │ └── ... # 29 more device directories ├── pkg/ # Package definitions (31 packages) │ ├── 099c5ac1-f374-4963-adb7-877c545ee9e7/ │ │ ├── package.lp # PHOENIX_PT_2,5/16-5,0-H │ │ └── 099c5ac1-f374-4963-adb7-877c545ee9e7.step │ ├── 623398d0-43f3-4601-9cc4-cbce192a8521/ │ │ ├── package.lp │ │ └── 623398d0-43f3-4601-9cc4-cbce192a8521.step │ └── ... # 29 more package directories ├── pkgcat/ # Package categories │ └── 606cfb03-1324-49e5-89c8-1012290f2380/ │ └── package_category.lp └── .github/ └── workflows/ └── main.yml # CI/CD validation pipeline # Example: Listing all devices ls -1 dev/ # Output: UUID directories for 31 devices # Example: Finding device by name pattern grep -r "PTSA 1.5/3-3.5-Z" dev/ # Output: dev/022a90f1-9aed-451a-8b94-32ff0ceb4b1d/device.lp # Example: Checking 3D model presence find pkg/ -name "*.step" | wc -l # Output: 31 ``` -------------------------------- ### Search LibrePCB Library Files with Grep Source: https://context7.com/librepcb-libraries/phoenix.lplib/llms.txt Utilize grep commands to efficiently search through LibrePCB library files for specific component properties, part numbers, or terminal types. These commands help locate devices based on pitch, circuit count, manufacturer part numbers, terminal types, and package assembly. ```bash # Find all screw terminals with 5.0mm pitch grep -r "Pitch: 5.00 mm" dev/ # Find devices by circuit count grep -r "Circuits: 16" dev/ # Find components by manufacturer part number grep -r "part \"1935161\"" dev/ # Search for spring-cage terminals grep -l "spring-cage" dev/*/device.lp # Find all through-hole packages grep -r "assembly_type tht" pkg/ # Extract all manufacturer part numbers grep -rh "^(part " dev/ | sort | uniq # Count components by keyword grep -r "keywords" dev/ | grep "screw" | wc -l # Find datasheet URLs grep -rh "url \"https://www.phoenixcontact.com" dev/ ``` -------------------------------- ### Phoenix Contact Component Naming Convention and Search Source: https://context7.com/librepcb-libraries/phoenix.lplib/llms.txt Demonstrates the naming convention for Phoenix Contact terminal blocks and connectors, along with 'grep' commands to search for components based on patterns and extract specifications. This helps in quickly identifying and selecting the correct components. ```bash # Phoenix Contact naming convention breakdown: # Format: [Series] [Conductor]/[Circuits]-[Pitch]-[Height] # Example 1: Phoenix PT 2,5/7-5,0-H # - Series: PT (screw terminal) # - Conductor: 2.5 mm² cross-section # - Circuits: 7 positions # - Pitch: 5.0 mm spacing # - Height: H designation # Example 2: Phoenix PTSA 1.5/3-3.5-Z # - Series: PTSA (spring-cage terminal) # - Conductor: 1.5 mm² cross-section # - Circuits: 3 positions # - Pitch: 3.5 mm spacing # - Mount: Z (45-degree angle) # Searching by naming pattern grep -r "PT 1,5/" dev/ | grep "5,0-H" # Finds all 1.5mm² PT terminals with 5.0mm pitch grep -r "PTSA" dev/ # Finds all spring-cage terminals # Extracting component specifications from names grep -rh "^(name " dev/ | sed 's/.*(name "\(.*\)")/1/' | sort # Output: # Phoenix PT 1,5/2-5,0-H # Phoenix PT 2,5/16-5,0-H # Phoenix PT 2,5/7-5,0-H # Phoenix PTSA 1.5/3-3.5-Z # ... ``` -------------------------------- ### Configure Git for LibrePCB Library Management Source: https://context7.com/librepcb-libraries/phoenix.lplib/llms.txt Set up Git attributes and ignore files to maintain the integrity of LibrePCB's text-based S-expression files. This configuration prevents line ending conversions and excludes temporary files, ensuring consistent diffs and avoiding merge conflicts across different operating systems. ```bash # .gitattributes * -text # This prevents Git from converting line endings (CRLF <-> LF) # Critical for LibrePCB files which use precise formatting # .gitignore *.lp~ # Autosave files *.lp.lock # Lock files during editing .librepcb-cache # LibrePCB cache directory # Example: Checking line endings in repository file library.lp # Output: library.lp: ASCII text, with no line terminators # Example: Viewing clean commit history git log --oneline --all --graph # Output: # * 7a3c2f1 Add Phoenix PT 1,5/4-5,0-H device # * 4b5c8e2 Update package for PT_2,5/16 # * 9d1e3f4 Initial library creation # Example: Checking for uncommitted changes git status # Output: # On branch main # Untracked files: # dev/7a3c2f1e-9b45-4d8a-a123-456789abcdef/ ``` -------------------------------- ### CI/CD Validation Workflow in YAML Source: https://context7.com/librepcb-libraries/phoenix.lplib/llms.txt Defines a GitHub Actions CI workflow using YAML to automatically validate the LibrePCB library. The workflow runs within a Docker container and utilizes the `librepcb-cli` tool to perform comprehensive checks on library structure, component integrity, UUIDs, and STEP file validity. ```yaml # .github/workflows/main.yml name: CIon: [push, pull_request] jobs: check: runs-on: ubuntu-22.04 container: image: librepcb/librepcb-cli:1.3.0 steps: - uses: actions/checkout@v1 - run: librepcb-cli open-library --all --strict --check --minify-step . # Manual validation command (requires LibrePCB CLI installed) # librepcb-cli open-library --all --strict --check . # Expected output on success: # ✓ Checking library structure... # ✓ Validating 31 devices... # ✓ Validating 31 packages... # ✓ Checking UUID uniqueness... # ✓ All checks passed! # Error example (invalid package reference): # ✗ Error in dev/022a90f1-9aed-451a-8b94-32ff0ceb4b1d/device.lp: # Package UUID 623398d0-0000-0000-0000-cbce192a8521 not found ``` -------------------------------- ### LISP PCB Package Definition for Screw Terminal Source: https://context7.com/librepcb-libraries/phoenix.lplib/llms.txt This LISP code defines a PCB package for a 16-circuit screw terminal. It includes pad definitions, footprint layout, silkscreen outlines, and references a 3D model. This snippet is specific to the LibrePCB EDA software. ```lisp (librepcb_package 099c5ac1-f374-4963-adb7-877c545ee9e7 (name "PHOENIX_PT_2,5/16-5,0-H") (description "Screw terminal from Phoenix Contact:\n\nCircuits: 16\nPitch: 5.00 mm\nHeight: 13.50 mm\nConductor: 2.5 mm²\n\nGenerated with librepcb-parts-generator") (keywords "screw,terminal,block,5mm,1x16") (author "U. Bruhin") (version "0.1") (created 2025-04-10T13:33:42Z) (deprecated false) (category b724b55e-0f80-4cf3-aa9f-e2a87e02bd19) (assembly_type tht) (pad b97c1a66-5fec-44a1-9ebc-604d863999b0 (name "1")) (pad cead82b6-6e62-400e-9195-4fcfb425f925 (name "2")) (pad e0569d2d-d9ea-44f4-9ab0-7f50f30efecb (name "3")) (pad 18a81c94-c6bb-46e6-8405-15c3a15abd58 (name "4")) (pad 78a98296-0006-4f62-95bb-e66a2c1aa7bf (name "5")) (pad 1bca7cfa-e9a7-4a2f-9742-a9ea42de5343 (name "6")) (pad 54c2a0ec-8b0e-4a1e-83e2-bb5bfd39f35e (name "7")) (pad efd4b5d5-83c4-413f-a2c2-a35e9b59a7e5 (name "8")) (pad 93bb1d6e-75a5-498c-a89c-8b25e59ce086 (name "9")) (pad 3fa06668-6281-4c0a-a5d2-b7f9ea5f71c0 (name "10")) (pad 1cd63bc8-fa21-44e4-8d7a-e6a05be8cc4d (name "11")) (pad ad903db7-41f8-4dbb-8486-79963fc5c142 (name "12")) (pad 1f4fab02-95cd-4e29-8813-0d2fa6cdf82f (name "13")) (pad 45afff93-3f3d-48d1-91e2-d3b4c2b77a43 (name "14")) (pad b1dba3f3-35c1-481a-a2c7-a9f16df61cf2 (name "15")) (pad ea52c6a6-4d77-4ca5-bcb2-b576a85baf05 (name "16")) (3d_model 572f2466-f337-4c07-9e29-6575d5387b75 (name "PHOENIX_PT_2,5/16-5,0-H")) (footprint 9d137bc7-892a-4c6f-a91b-49ae1d9b5d33 (name "default") (description "") (3d_position 0.0 0.0 0.0) (3d_rotation 0.0 0.0 0.0) (3d_model 572f2466-f337-4c07-9e29-6575d5387b75) (pad 5b9765c9-51c3-4a83-bbf6-d54084e6a9c5 (side top) (shape roundrect) (position 0.0 37.5) (rotation 0.0) (size 2.6 2.6) (radius 0.0) (stop_mask auto) (solder_paste off) (clearance 0.0) (function standard) (package_pad b97c1a66-5fec-44a1-9ebc-604d863999b0) (hole 5b9765c9-51c3-4a83-bbf6-d54084e6a9c5 (diameter 1.2) (vertex (position 0.0 0.0) (angle 0.0)) ) ) (pad 77dcb5ba-5894-46e1-9e48-e7dcb5b3e2a9 (side top) (shape roundrect) (position 0.0 32.5) (rotation 0.0) (size 2.6 2.6) (radius 0.0) (stop_mask auto) (solder_paste off) (clearance 0.0) (function standard) (package_pad cead82b6-6e62-400e-9195-4fcfb425f925) (hole 77dcb5ba-5894-46e1-9e48-e7dcb5b3e2a9 (diameter 1.2) (vertex (position 0.0 0.0) (angle 0.0)) ) ) (polygon e12e5208-37b7-4e13-909a-8791bd259c35 (layer top_legend) (width 0.2) (fill false) (grab_area false) (vertex (position -4.4 39.9) (angle 0.0)) (vertex (position 4.4 39.9) (angle 0.0)) (vertex (position 4.4 -39.9) (angle 0.0)) (vertex (position -4.4 -39.9) (angle 0.0)) (vertex (position -4.4 39.9) (angle 0.0)) ) (polygon b7831a61-18d9-4e53-bb2c-5a1a273b9c43 (layer top_package_outlines) (width 0.0) (fill false) (grab_area false) (vertex (position -4.5 40.0) (angle 0.0)) (vertex (position 4.5 40.0) (angle 0.0)) (vertex (position 4.5 -40.0) (angle 0.0)) (vertex (position -4.5 -40.0) (angle 0.0)) (vertex (position -4.5 40.0) (angle 0.0)) ) (stroke_text 4c506059-1a9e-4633-ba6d-054cb6fc8c6c (layer top_names) (height 1.0) (stroke_width 0.2) (letter_spacing auto) (line_spacing auto) (align center bottom) (position 0.0 40.5) (rotation 0.0) (auto_rotate true) (mirror false) (value "{{NAME}}") ) (stroke_text 5d7f84a7-8398-4ab9-86f8-5e17ede04e21 (layer top_values) (height 1.0) (stroke_width 0.2) (letter_spacing auto) (line_spacing auto) (align center top) (position 0.0 -40.5) (rotation 0.0) (auto_rotate true) (mirror false) (value "{{VALUE}}") ) ) ) ``` -------------------------------- ### Lisp Device Definition for Phoenix Screw Terminal Source: https://context7.com/librepcb-libraries/phoenix.lplib/llms.txt This Lisp code defines a screw terminal device for LibrePCB, including its name, description, keywords, author, version, and generation information. It embeds a datasheet URL and specifies component, package, and pad details. Parametric attributes for PITCH and CONDUCTOR are also included. ```lisp (librepcb_device 0e644ed8-8279-4244-9147-8dffdefbd3b4 (name "Phoenix PT 1,5/2-5,0-H") (description "Screw terminal from Phoenix Contact:\n\nCircuits: 2 Pitch: 5.00 mm Height: 11.40 mm Conductor: 1.5 mm² Generated with librepcb-parts-generator (generate_screw_terminals.py)") (keywords "screw,terminal,block,5mm,1x2") (author "U. Bruhin") (version "0.1") (created 2025-04-10T13:33:42Z) (deprecated false) (generated_by "") (category f9db4ef5-2220-462a-adff-deac8402ecf0) (resource "Datasheet PT 1,5/2-5,0-H" (mediatype "application/pdf") (url "https://www.phoenixcontact.com/us/products/1935161/pdf") ) (component b740698a-90b7-40ab-a3d2-69b64e7b8163) (package b9b166e3-eb3d-4e69-86d7-75b5cb47f6ac) (pad 7f6938af-2125-4de3-8579-53a8a9a24a20 (signal 44af71fe-a47a-4eb6-b1ac-f12617481fb9)) (pad d0cda85c-1bef-44f9-bd1c-985f8fbadc8f (signal 22abcb7c-01b3-4d52-88ef-1ff95c5ad334)) (part "1935161" (manufacturer "Phoenix Contact") (attribute "PITCH" (type string) (unit none) (value "5.00 mm")) (attribute "CONDUCTOR" (type string) (unit none) (value "1.5 mm²")) ) ) ``` -------------------------------- ### LibrePCB Library Metadata Definition (Lisp) Source: https://context7.com/librepcb-libraries/phoenix.lplib/llms.txt Defines the root library metadata, including UUID, name, description, version, author, dependencies, and manufacturer information. This file is essential for LibrePCB to recognize and load the component library. It uses LibrePCB's S-expression based format. ```lisp (librepcb_library 58e570ce-a69e-466c-bbe0-65f716386e56 (name "Phoenix Contact") (description "Connectors, sockets and more (unofficial).") (keywords "phoenix,contact,connectors") (author "LibrePCB") (version "0.2.1") (created 2019-06-14T22:41:50Z) (deprecated false) (url "https://github.com/LibrePCB-Libraries/Phoenix.lplib") (dependency 6ccc516c-21b7-4cd5-9cf2-7a04cfa361c6) (dependency a9ddf0c6-9b1c-4730-b300-01b4f192ad40) (manufacturer "Phoenix Contact") ) ``` -------------------------------- ### Define Package Category in LISP Source: https://context7.com/librepcb-libraries/phoenix.lplib/llms.txt Defines a package category named 'Phoenix Contact' within the LibrePCB component database. This LISP code snippet specifies the category's name, description, keywords, author, version, creation date, deprecation status, and its parent category UUID for hierarchical organization. ```lisp (librepcb_package_category 606cfb03-1324-49e5-89c8-1012290f2380 (name "Phoenix Contact") (description "Custom packages by Phoenix Contact.") (keywords "phoenix,contact") (author "U. Bruhin") (version "0.1") (created 2023-09-04T10:41:28Z) (deprecated false) (parent 194951ec-03dd-412a-9828-70c40bbdd22d) ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.