title: Tutorial 107: Component Libraries¶
Tutorial 107: Component Libraries¶
Overview¶
Learn to organize, create, and manage custom component libraries in GeckoCIRCUITS. Build reusable subcircuits and share designs across projects.
Level: Intermediate (⅔)
Duration: 30-40 minutes
Series: Getting Started
Status: Placeholder
Learning Objectives¶
By the end of this tutorial, you will: - [ ] Understand component library organization - [ ] Create custom subcircuits and symbols - [ ] Manage library paths and updates - [ ] Share components across projects
Prerequisites¶
- Complete Tutorial 102: Basic Circuits
- Familiarity with GeckoCIRCUITS interface
Component Library Concepts¶
Library Hierarchy¶
GeckoCIRCUITS Libraries
├── Built-in Components
│ ├── POWER (R, L, C, Switches, Diodes)
│ ├── CONTROL (Gain, Sum, PI, Comparator)
│ ├── THERM (Thermal components)
│ └── SCOPE (Measurement)
├── User Libraries
│ ├── My_Converters/
│ ├── My_Controllers/
│ └── Project_Specific/
└── Shared Libraries
└── Team_Components/
Component Types¶
| Type | Description | Use Case |
|---|---|---|
| Primitive | Basic element (R, L, C) | Building blocks |
| Subcircuit | Hierarchical block | Reusable designs |
| Masked | Subcircuit with custom dialog | User-friendly |
| Symbol | Custom schematic symbol | Visual clarity |
Creating Custom Components¶
Step 1: Design the Subcircuit¶
- Create new schematic
- Build circuit (e.g., buck converter power stage)
- Define input/output terminals
- Add parameters as variables
Step 2: Define Interface¶
Terminals: - Input ports (signals coming in) - Output ports (signals going out) - Power connections
Parameters: - User-adjustable values - Default values - Valid ranges
Step 3: Create Symbol (Optional)¶
- Draw custom symbol shape
- Place terminal locations
- Add text labels
Step 4: Save to Library¶
- File > Save as Component
- Choose library location
- Add description and keywords
Example: Buck Power Stage Component¶
Internal Circuit¶
Vin+ ───┬──[S]──┬──[L]──┬─── Vout+
│ │ │
│ [D] [C]
│ │ │
Vin- ───┴───────┴───────┴─── Vout-
│
Gate (control input)
Parameters¶
| Parameter | Default | Range | Description |
|---|---|---|---|
| L | 100μH | 1μH-10mH | Inductance |
| C | 100μF | 1μF-10mF | Capacitance |
| Ron_sw | 10mΩ | 1mΩ-1Ω | Switch on-resistance |
| Vf_diode | 0.5V | 0.3-1V | Diode forward voltage |
Symbol¶
┌─────────────┐
│ BUCK │
Vin+│ ┌─┐ │Vout+
────┤ │▼│ ├────
│ └─┘ │
Vin-│ │Vout-
────┤ ▽ ├────
│ Gate │
└─────┬──────┘
│
─┴─
Library Organization¶
Recommended Structure¶
~/.geckocircuits/libraries/
├── power_stages/
│ ├── buck.gsub
│ ├── boost.gsub
│ ├── full_bridge.gsub
│ └── README.md
├── controllers/
│ ├── pi_controller.gsub
│ ├── type2_compensator.gsub
│ └── README.md
├── sensors/
│ ├── current_sense.gsub
│ ├── voltage_divider.gsub
│ └── README.md
└── thermal/
├── heatsink_model.gsub
└── README.md
Naming Conventions¶
| Convention | Example | Use |
|---|---|---|
| lowercase_underscore | buck_converter | File names |
| CamelCase | BuckConverter | Component names |
| PREFIX_name | PWR_buck | Category prefix |
| name_vX.X | buck_v1.2 | Version tracking |
Using Libraries¶
Adding Library Path¶
- Edit > Preferences > Libraries
- Add path to custom library folder
- Restart GeckoCIRCUITS
Inserting Components¶
- View component browser
- Navigate to library
- Drag component to schematic
- Set parameters in dialog
Updating Components¶
When library component changes: 1. Projects using old version unaffected 2. Manual update: right-click > Update from library 3. Or: reload library and replace
Best Practices¶
Documentation¶
Each component should include: - Description of function - Input/output specifications - Parameter descriptions with units - Usage examples - Version history
Version Control¶
# Component: Buck Power Stage
# Version: 1.2
# Date: 2026-02
# Changes: Added ESR to capacitor model
Testing¶
Before adding to library: 1. Test standalone operation 2. Verify all parameters work 3. Check edge cases 4. Document known limitations
Sharing Libraries¶
Export¶
- Package library folder as ZIP
- Include README with dependencies
- List compatible GeckoCIRCUITS versions
Import¶
- Extract to libraries folder
- Add path in preferences
- Restart application
Team Collaboration¶
- Store libraries in shared network folder
- Use version control (Git) for changes
- Maintain changelog
Exercises¶
Exercise 1: Create Simple Component¶
- Build RC low-pass filter
- Define R and C as parameters
- Save as component
Exercise 2: Masked Subcircuit¶
- Create buck power stage
- Add parameter dialog
- Test parameter variations
Exercise 3: Library Organization¶
- Create library folder structure
- Move existing subcircuits to library
- Document each component
Exercise 4: Share with Team¶
- Package library as ZIP
- Write installation instructions
- Create usage example
Common Issues¶
| Issue | Cause | Solution |
|---|---|---|
| Component not found | Wrong library path | Check preferences |
| Parameters don't update | Cached old version | Clear cache, reload |
| Symbol mismatch | Edited internal circuit | Regenerate symbol |
| Missing dependencies | Uses other components | Include all dependencies |
Related Tutorials¶
- 102 - Basic Circuits - Building circuits
- 704 - Java Blocks - Custom code components
Circuit Files¶
Status: Placeholder -
example_buck_stage.gsub- Buck power stage component -example_pi_controller.gsub- PI controller component -example_library/- Sample library structure
Tutorial Version: 1.0 (Placeholder) Last updated: 2026-02 Compatible with GeckoCIRCUITS v1.0+