feat: Expand schematic component support from 3 to 13 types + plan dynamic loading
Issue #26 Follow-up: The original fix only supported 3 component types (R, C, LED). This expands the template-based approach to 13 types while planning for unlimited access. **Expanded Template (Option 1 - Immediate Solution):** - Added 10 new component types to template - Passives: R, C, L, Crystal (4 types) - Semiconductors: D, LED, Q_NPN, Q_NMOS (4 types) - ICs: OpAmp, Voltage Regulator (2 types) - Connectors: Conn_2pin, Conn_4pin (2 types) - Misc: Switch/Button (1 type) **Components Now Supported:** 1. Resistor (R) 2. Capacitor (C) 3. Inductor (L) 4. Crystal (Y) 5. Diode (D) 6. LED 7. NPN Transistor (Q_NPN) 8. N-Channel MOSFET (Q_NMOS) 9. Op-Amp (U) 10. Voltage Regulator (U_REG) 11. 2-pin Connector (J2) 12. 4-pin Connector (J4) 13. Push Button/Switch (SW) **Implementation:** - Created template_with_symbols_expanded.kicad_sch with all 13 types - Updated TEMPLATE_MAP with comprehensive type mappings - Updated project.py to use expanded template by default - All tests passing (13/13 components added successfully) **Future Plan (Option 2 - Dynamic Library Loading):** - Documented comprehensive plan for accessing ALL KiCad symbols (~10,000+) - Dynamic loading from .kicad_sym library files - S-expression injection approach - 6-8 week implementation timeline - Maintains template fallback for compatibility **Files Added:** - python/templates/template_with_symbols_expanded.kicad_sch - docs/DYNAMIC_LIBRARY_LOADING_PLAN.md **Files Modified:** - python/commands/component_schematic.py (expanded TEMPLATE_MAP) - python/commands/project.py (use expanded template) This provides immediate value (13 types vs 3) while we plan the long-term solution of unlimited symbol access through dynamic library loading. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
485
docs/DYNAMIC_LIBRARY_LOADING_PLAN.md
Normal file
485
docs/DYNAMIC_LIBRARY_LOADING_PLAN.md
Normal file
@@ -0,0 +1,485 @@
|
|||||||
|
# Option 2: Dynamic Library Loading Plan
|
||||||
|
|
||||||
|
## Executive Summary
|
||||||
|
|
||||||
|
Replace the template-based schematic workflow with dynamic symbol loading from KiCad's installed symbol libraries. This would eliminate the 13-component limitation and provide access to ALL KiCad symbols (~10,000+ symbols from standard libraries).
|
||||||
|
|
||||||
|
**Current Status (Option 1):**
|
||||||
|
- ✅ Template-based approach working
|
||||||
|
- ✅ 13 component types supported
|
||||||
|
- ❌ Limited symbol variety
|
||||||
|
- ❌ Requires manual template updates for new types
|
||||||
|
|
||||||
|
**Proposed (Option 2):**
|
||||||
|
- 🎯 Dynamic loading from `.kicad_sym` library files
|
||||||
|
- 🎯 Access to ~10,000+ KiCad symbols
|
||||||
|
- 🎯 No template maintenance required
|
||||||
|
- 🎯 User can specify any library/symbol combination
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Problem Analysis
|
||||||
|
|
||||||
|
### kicad-skip Library Limitation
|
||||||
|
|
||||||
|
**Core Issue:** kicad-skip **cannot create symbols from scratch**. It can only:
|
||||||
|
1. Clone existing symbols from a loaded schematic
|
||||||
|
2. Modify properties of cloned symbols
|
||||||
|
|
||||||
|
**Current Workaround:** Pre-load template symbols in schematic file
|
||||||
|
|
||||||
|
**Proposed Solution:** Load symbols from KiCad's `.kicad_sym` library files, inject them into the schematic's `lib_symbols` section, then clone from there.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## KiCad Symbol Library Architecture
|
||||||
|
|
||||||
|
### Symbol Library File Format (`.kicad_sym`)
|
||||||
|
|
||||||
|
KiCad symbol libraries are S-expression files containing symbol definitions:
|
||||||
|
|
||||||
|
```lisp
|
||||||
|
(kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)
|
||||||
|
(symbol "Device:R"
|
||||||
|
(pin_numbers hide)
|
||||||
|
(pin_names (offset 0))
|
||||||
|
(in_bom yes)
|
||||||
|
(on_board yes)
|
||||||
|
(property "Reference" "R" ...)
|
||||||
|
(property "Value" "R" ...)
|
||||||
|
;; Graphics definitions
|
||||||
|
(symbol "R_0_1" ...)
|
||||||
|
(symbol "R_1_1"
|
||||||
|
(pin passive line ...)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "Device:C" ...)
|
||||||
|
(symbol "Device:L" ...)
|
||||||
|
;; ... thousands more
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Standard KiCad Library Locations
|
||||||
|
|
||||||
|
**Linux:**
|
||||||
|
- System libraries: `/usr/share/kicad/symbols/`
|
||||||
|
- User libraries: `~/.local/share/kicad/8.0/symbols/` or `~/.config/kicad/8.0/symbols/`
|
||||||
|
|
||||||
|
**Windows:**
|
||||||
|
- System libraries: `C:\Program Files\KiCad\9.0\share\kicad\symbols\`
|
||||||
|
- User libraries: `%APPDATA%\kicad\8.0\symbols\`
|
||||||
|
|
||||||
|
**macOS:**
|
||||||
|
- System libraries: `/Applications/KiCad/KiCad.app/Contents/SharedSupport/symbols/`
|
||||||
|
- User libraries: `~/Library/Preferences/kicad/8.0/symbols/`
|
||||||
|
|
||||||
|
### Standard Library Files
|
||||||
|
|
||||||
|
Common libraries (each containing 50-500 symbols):
|
||||||
|
- `Device.kicad_sym` - Passives (R, C, L, D, LED, Crystal, etc.)
|
||||||
|
- `Connector.kicad_sym` - Connectors (headers, USB, etc.)
|
||||||
|
- `Connector_Generic.kicad_sym` - Generic connectors
|
||||||
|
- `Transistor_BJT.kicad_sym` - Bipolar transistors
|
||||||
|
- `Transistor_FET.kicad_sym` - MOSFETs
|
||||||
|
- `Amplifier_Operational.kicad_sym` - Op-amps
|
||||||
|
- `Regulator_Linear.kicad_sym` - Voltage regulators
|
||||||
|
- `MCU_*.kicad_sym` - Microcontrollers
|
||||||
|
- `Interface_*.kicad_sym` - Interface ICs
|
||||||
|
- ... 100+ more libraries
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Implementation Strategy
|
||||||
|
|
||||||
|
### Phase 1: Library Discovery & Indexing
|
||||||
|
|
||||||
|
**Goal:** Build an index of all available symbols and their locations
|
||||||
|
|
||||||
|
**Implementation:**
|
||||||
|
```python
|
||||||
|
class SymbolLibraryManager:
|
||||||
|
def __init__(self):
|
||||||
|
self.library_paths = []
|
||||||
|
self.symbol_index = {} # {"Device:R": "/path/to/Device.kicad_sym", ...}
|
||||||
|
|
||||||
|
def discover_libraries(self):
|
||||||
|
"""Find all KiCad symbol libraries on the system"""
|
||||||
|
search_paths = [
|
||||||
|
"/usr/share/kicad/symbols/",
|
||||||
|
os.path.expanduser("~/.local/share/kicad/8.0/symbols/"),
|
||||||
|
os.path.expanduser("~/.config/kicad/8.0/symbols/"),
|
||||||
|
]
|
||||||
|
|
||||||
|
for search_path in search_paths:
|
||||||
|
if os.path.exists(search_path):
|
||||||
|
for lib_file in os.listdir(search_path):
|
||||||
|
if lib_file.endswith('.kicad_sym'):
|
||||||
|
self.library_paths.append(os.path.join(search_path, lib_file))
|
||||||
|
|
||||||
|
def index_symbols(self):
|
||||||
|
"""Parse all libraries and build symbol index"""
|
||||||
|
for lib_path in self.library_paths:
|
||||||
|
lib_name = os.path.basename(lib_path).replace('.kicad_sym', '')
|
||||||
|
symbols = self._parse_library(lib_path)
|
||||||
|
|
||||||
|
for symbol_name in symbols:
|
||||||
|
full_name = f"{lib_name}:{symbol_name}"
|
||||||
|
self.symbol_index[full_name] = {
|
||||||
|
'library': lib_name,
|
||||||
|
'library_path': lib_path,
|
||||||
|
'symbol_name': symbol_name
|
||||||
|
}
|
||||||
|
|
||||||
|
def _parse_library(self, lib_path):
|
||||||
|
"""Parse .kicad_sym file and extract symbol names"""
|
||||||
|
# Use sexpdata (already a dependency of kicad-skip)
|
||||||
|
import sexpdata
|
||||||
|
|
||||||
|
with open(lib_path, 'r') as f:
|
||||||
|
data = sexpdata.load(f)
|
||||||
|
|
||||||
|
symbols = []
|
||||||
|
for item in data[2:]: # Skip header
|
||||||
|
if isinstance(item, list) and item[0] == Symbol('symbol'):
|
||||||
|
symbol_name = item[1] # e.g., "Device:R"
|
||||||
|
# Extract just the symbol part after ':'
|
||||||
|
if ':' in symbol_name:
|
||||||
|
symbol_name = symbol_name.split(':')[1]
|
||||||
|
symbols.append(symbol_name)
|
||||||
|
|
||||||
|
return symbols
|
||||||
|
```
|
||||||
|
|
||||||
|
### Phase 2: Dynamic Symbol Injection
|
||||||
|
|
||||||
|
**Goal:** Load symbol definition from library file and inject into schematic
|
||||||
|
|
||||||
|
**Challenge:** kicad-skip works with loaded schematics, but we need to dynamically add symbols to the `lib_symbols` section.
|
||||||
|
|
||||||
|
**Solution:** Modify the schematic's S-expression data directly before loading with kicad-skip:
|
||||||
|
|
||||||
|
```python
|
||||||
|
def inject_symbol_into_schematic(schematic_path, library_path, symbol_name):
|
||||||
|
"""
|
||||||
|
1. Read schematic S-expression
|
||||||
|
2. Read library S-expression
|
||||||
|
3. Extract symbol definition from library
|
||||||
|
4. Inject into schematic's lib_symbols section
|
||||||
|
5. Save modified schematic
|
||||||
|
6. Reload with kicad-skip
|
||||||
|
"""
|
||||||
|
import sexpdata
|
||||||
|
|
||||||
|
# Load schematic
|
||||||
|
with open(schematic_path, 'r') as f:
|
||||||
|
sch_data = sexpdata.load(f)
|
||||||
|
|
||||||
|
# Load library
|
||||||
|
with open(library_path, 'r') as f:
|
||||||
|
lib_data = sexpdata.load(f)
|
||||||
|
|
||||||
|
# Find symbol definition in library
|
||||||
|
symbol_def = None
|
||||||
|
for item in lib_data[2:]:
|
||||||
|
if isinstance(item, list) and item[0] == Symbol('symbol'):
|
||||||
|
if symbol_name in str(item[1]):
|
||||||
|
symbol_def = item
|
||||||
|
break
|
||||||
|
|
||||||
|
if not symbol_def:
|
||||||
|
raise ValueError(f"Symbol {symbol_name} not found in {library_path}")
|
||||||
|
|
||||||
|
# Find lib_symbols section in schematic
|
||||||
|
lib_symbols_index = None
|
||||||
|
for i, item in enumerate(sch_data):
|
||||||
|
if isinstance(item, list) and item[0] == Symbol('lib_symbols'):
|
||||||
|
lib_symbols_index = i
|
||||||
|
break
|
||||||
|
|
||||||
|
# Inject symbol definition
|
||||||
|
if lib_symbols_index:
|
||||||
|
sch_data[lib_symbols_index].append(symbol_def)
|
||||||
|
|
||||||
|
# Save modified schematic
|
||||||
|
with open(schematic_path, 'w') as f:
|
||||||
|
sexpdata.dump(sch_data, f)
|
||||||
|
|
||||||
|
# Reload with kicad-skip
|
||||||
|
return Schematic(schematic_path)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Phase 3: Template Instance Creation
|
||||||
|
|
||||||
|
**Goal:** Create offscreen template instances that can be cloned
|
||||||
|
|
||||||
|
**After injection:** Symbol definition is in `lib_symbols`, but we need an instance to clone from:
|
||||||
|
|
||||||
|
```python
|
||||||
|
def create_template_instance(schematic, library_name, symbol_name):
|
||||||
|
"""
|
||||||
|
Create an offscreen template instance that can be cloned
|
||||||
|
Similar to our current _TEMPLATE_R approach
|
||||||
|
"""
|
||||||
|
# This requires directly manipulating the S-expression
|
||||||
|
# Add a symbol instance at offscreen position with special reference
|
||||||
|
|
||||||
|
template_ref = f"_TEMPLATE_{library_name}_{symbol_name}"
|
||||||
|
|
||||||
|
# Create symbol instance (S-expression)
|
||||||
|
symbol_instance = [
|
||||||
|
Symbol('symbol'),
|
||||||
|
[Symbol('lib_id'), f"{library_name}:{symbol_name}"],
|
||||||
|
[Symbol('at'), -100, -100 - (len(schematic.symbol) * 10), 0],
|
||||||
|
[Symbol('unit'), 1],
|
||||||
|
[Symbol('in_bom'), Symbol('no')],
|
||||||
|
[Symbol('on_board'), Symbol('no')],
|
||||||
|
[Symbol('dnp'), Symbol('yes')],
|
||||||
|
[Symbol('uuid'), str(uuid.uuid4())],
|
||||||
|
[Symbol('property'), "Reference", template_ref, ...],
|
||||||
|
# ... more properties
|
||||||
|
]
|
||||||
|
|
||||||
|
# Inject into schematic and reload
|
||||||
|
# ... (similar to inject_symbol_into_schematic)
|
||||||
|
|
||||||
|
return template_ref
|
||||||
|
```
|
||||||
|
|
||||||
|
### Phase 4: User-Facing API
|
||||||
|
|
||||||
|
**Goal:** Simple interface for users to add any KiCad symbol
|
||||||
|
|
||||||
|
**New MCP Tool: `add_schematic_component_dynamic`**
|
||||||
|
|
||||||
|
```python
|
||||||
|
def add_schematic_component_dynamic(params):
|
||||||
|
"""
|
||||||
|
Add component by library:symbol notation
|
||||||
|
|
||||||
|
Example:
|
||||||
|
{
|
||||||
|
"library": "Device",
|
||||||
|
"symbol": "R",
|
||||||
|
"reference": "R1",
|
||||||
|
"value": "10k",
|
||||||
|
"x": 100,
|
||||||
|
"y": 100
|
||||||
|
}
|
||||||
|
|
||||||
|
OR using full notation:
|
||||||
|
{
|
||||||
|
"lib_symbol": "Device:R", # Full notation
|
||||||
|
"reference": "R1",
|
||||||
|
...
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
lib_symbol = params.get('lib_symbol') or f"{params['library']}:{params['symbol']}"
|
||||||
|
|
||||||
|
# 1. Check if symbol is already in schematic's lib_symbols
|
||||||
|
# 2. If not, inject it from library file
|
||||||
|
# 3. Create template instance if needed
|
||||||
|
# 4. Clone template and set properties
|
||||||
|
|
||||||
|
return {"success": True, "reference": params['reference']}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Advantages Over Template Approach
|
||||||
|
|
||||||
|
### ✅ Unlimited Symbol Access
|
||||||
|
- Access to ~10,000+ standard KiCad symbols
|
||||||
|
- Support for custom user libraries
|
||||||
|
- Support for 3rd-party libraries (JLCPCB, Espressif, etc.)
|
||||||
|
|
||||||
|
### ✅ No Maintenance Required
|
||||||
|
- Template doesn't need updates for new component types
|
||||||
|
- Automatically supports new KiCad library additions
|
||||||
|
- Works with custom symbol libraries
|
||||||
|
|
||||||
|
### ✅ Better User Experience
|
||||||
|
```
|
||||||
|
User: "Add an STM32F103C8T6 microcontroller at position 100,100"
|
||||||
|
AI: *Searches symbol index*
|
||||||
|
*Finds MCU_ST_STM32F1:STM32F103C8Tx*
|
||||||
|
*Loads from library*
|
||||||
|
*Injects into schematic*
|
||||||
|
*Places component*
|
||||||
|
✓ Done!
|
||||||
|
```
|
||||||
|
|
||||||
|
### ✅ Flexible Symbol Search
|
||||||
|
```python
|
||||||
|
# Find all resistors
|
||||||
|
symbols = lib_manager.search_symbols(query="resistor")
|
||||||
|
# Returns: ["Device:R", "Device:R_Small", "Device:R_Network", ...]
|
||||||
|
|
||||||
|
# Find all STM32 MCUs
|
||||||
|
symbols = lib_manager.search_symbols(query="STM32", library="MCU_ST_STM32F1")
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Challenges & Mitigations
|
||||||
|
|
||||||
|
### Challenge 1: S-expression Manipulation Complexity
|
||||||
|
|
||||||
|
**Problem:** Directly manipulating S-expression data is error-prone
|
||||||
|
|
||||||
|
**Mitigation:**
|
||||||
|
- Use `sexpdata` library (already a dependency)
|
||||||
|
- Create helper functions for common operations
|
||||||
|
- Add comprehensive validation and error handling
|
||||||
|
- Extensive testing with various symbol types
|
||||||
|
|
||||||
|
### Challenge 2: Performance
|
||||||
|
|
||||||
|
**Problem:** Loading/reloading schematics after injection could be slow
|
||||||
|
|
||||||
|
**Mitigation:**
|
||||||
|
- **Cache loaded symbols**: Once injected, symbol stays in schematic
|
||||||
|
- **Batch injection**: Inject multiple symbols at once
|
||||||
|
- **Lazy loading**: Only inject symbols when first used
|
||||||
|
|
||||||
|
### Challenge 3: Symbol Compatibility
|
||||||
|
|
||||||
|
**Problem:** Some symbols may have complex pin configurations or multiple units
|
||||||
|
|
||||||
|
**Mitigation:**
|
||||||
|
- Start with simple 2-pin passives (R, C, L)
|
||||||
|
- Gradually add support for multi-pin ICs
|
||||||
|
- Handle multi-unit symbols (gates, OpAmp sections) explicitly
|
||||||
|
- Document supported symbol types
|
||||||
|
|
||||||
|
### Challenge 4: Library Version Compatibility
|
||||||
|
|
||||||
|
**Problem:** KiCad symbol format may change between versions
|
||||||
|
|
||||||
|
**Mitigation:**
|
||||||
|
- Parse KiCad version from library files
|
||||||
|
- Version-specific handling if needed
|
||||||
|
- Fallback to template approach for unsupported formats
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Implementation Phases
|
||||||
|
|
||||||
|
### Phase A: Proof of Concept (1-2 weeks)
|
||||||
|
- [ ] Create `SymbolLibraryManager` class
|
||||||
|
- [ ] Implement library discovery (Linux paths only)
|
||||||
|
- [ ] Implement symbol indexing
|
||||||
|
- [ ] Test with Device.kicad_sym (R, C, L)
|
||||||
|
- [ ] Implement basic S-expression injection
|
||||||
|
- [ ] Test end-to-end with simple components
|
||||||
|
|
||||||
|
### Phase B: Core Functionality (2-3 weeks)
|
||||||
|
- [ ] Cross-platform library discovery (Windows, macOS)
|
||||||
|
- [ ] Symbol search functionality
|
||||||
|
- [ ] Template instance creation automation
|
||||||
|
- [ ] Multi-pin component support
|
||||||
|
- [ ] Error handling and validation
|
||||||
|
- [ ] Unit tests for all operations
|
||||||
|
|
||||||
|
### Phase C: MCP Integration (1 week)
|
||||||
|
- [ ] Create `add_schematic_component_dynamic` tool
|
||||||
|
- [ ] Update `search_symbols` to use library index
|
||||||
|
- [ ] Add `list_available_symbols` tool
|
||||||
|
- [ ] Add `list_symbol_libraries` tool
|
||||||
|
- [ ] Documentation and examples
|
||||||
|
|
||||||
|
### Phase D: Advanced Features (2-3 weeks)
|
||||||
|
- [ ] Multi-unit symbol support (e.g., quad OpAmps)
|
||||||
|
- [ ] Custom library registration
|
||||||
|
- [ ] Symbol caching and optimization
|
||||||
|
- [ ] 3rd-party library support (JLCPCB, etc.)
|
||||||
|
- [ ] Symbol preview generation
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Migration Strategy
|
||||||
|
|
||||||
|
### Backward Compatibility
|
||||||
|
|
||||||
|
Keep template-based approach as fallback:
|
||||||
|
|
||||||
|
```python
|
||||||
|
def add_schematic_component(params):
|
||||||
|
"""Smart component addition with fallback"""
|
||||||
|
# Try dynamic loading first
|
||||||
|
try:
|
||||||
|
if 'library' in params or 'lib_symbol' in params:
|
||||||
|
return add_schematic_component_dynamic(params)
|
||||||
|
except Exception as e:
|
||||||
|
logger.warning(f"Dynamic loading failed: {e}, falling back to template")
|
||||||
|
|
||||||
|
# Fallback to template-based
|
||||||
|
return add_schematic_component_template(params)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Gradual Rollout
|
||||||
|
|
||||||
|
1. **Week 1-2:** Implement basic dynamic loading
|
||||||
|
2. **Week 3-4:** Test with power users, gather feedback
|
||||||
|
3. **Week 5-6:** Make dynamic loading the default
|
||||||
|
4. **Week 7+:** Deprecate template-only approach (keep as fallback)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Success Criteria
|
||||||
|
|
||||||
|
### Must Have
|
||||||
|
- [ ] Load symbols from Device.kicad_sym (passives)
|
||||||
|
- [ ] Support R, C, L, D, LED (5 core types)
|
||||||
|
- [ ] Cross-platform library discovery
|
||||||
|
- [ ] Proper error handling
|
||||||
|
|
||||||
|
### Should Have
|
||||||
|
- [ ] Support for all Device.kicad_sym symbols (~50 symbols)
|
||||||
|
- [ ] Support for Connector.kicad_sym symbols
|
||||||
|
- [ ] Symbol search by name/keyword
|
||||||
|
- [ ] Performance: < 1 second per symbol injection
|
||||||
|
|
||||||
|
### Nice to Have
|
||||||
|
- [ ] Support for all standard libraries (~10,000 symbols)
|
||||||
|
- [ ] Multi-unit symbol support
|
||||||
|
- [ ] Custom library registration
|
||||||
|
- [ ] Symbol preview/documentation
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Risk Assessment
|
||||||
|
|
||||||
|
| Risk | Probability | Impact | Mitigation |
|
||||||
|
|------|-------------|--------|------------|
|
||||||
|
| S-expression parsing complexity | High | High | Use proven `sexpdata` library, extensive testing |
|
||||||
|
| Performance degradation | Medium | Medium | Implement caching, lazy loading |
|
||||||
|
| KiCad version incompatibility | Low | High | Version detection, format validation |
|
||||||
|
| Template fallback breaks | Low | Medium | Maintain template approach in parallel |
|
||||||
|
| User confusion | Medium | Low | Clear documentation, gradual rollout |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Conclusion
|
||||||
|
|
||||||
|
Dynamic library loading is **feasible and highly beneficial** for the schematic workflow. While the template-based approach (Option 1) provides immediate value with 13 component types, Option 2 would:
|
||||||
|
|
||||||
|
1. **Eliminate the 13-component limitation**
|
||||||
|
2. **Provide access to 10,000+ KiCad symbols**
|
||||||
|
3. **Remove manual template maintenance**
|
||||||
|
4. **Enable true "natural language PCB design"**
|
||||||
|
|
||||||
|
**Recommendation:**
|
||||||
|
- ✅ **Keep Option 1 (expanded template) for immediate use**
|
||||||
|
- ✅ **Implement Option 2 (dynamic loading) over 6-8 weeks**
|
||||||
|
- ✅ **Maintain template fallback for compatibility**
|
||||||
|
|
||||||
|
This gives users immediate value while we build the robust long-term solution.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- [KiCad File Formats Documentation](https://dev-docs.kicad.org/en/file-formats/)
|
||||||
|
- [kicad-skip GitHub](https://github.com/mvnmgrx/kicad-skip)
|
||||||
|
- [sexpdata Python Library](https://github.com/jd-boyd/sexpdata)
|
||||||
|
- [KiCad Symbol Library Format Spec](https://dev-docs.kicad.org/en/file-formats/sexpr-intro/)
|
||||||
@@ -10,11 +10,39 @@ class ComponentManager:
|
|||||||
|
|
||||||
# Template symbol references mapping component type to template reference
|
# Template symbol references mapping component type to template reference
|
||||||
TEMPLATE_MAP = {
|
TEMPLATE_MAP = {
|
||||||
|
# Passives
|
||||||
'R': '_TEMPLATE_R',
|
'R': '_TEMPLATE_R',
|
||||||
'C': '_TEMPLATE_C',
|
'C': '_TEMPLATE_C',
|
||||||
|
'L': '_TEMPLATE_L',
|
||||||
|
'Y': '_TEMPLATE_Y',
|
||||||
|
'Crystal': '_TEMPLATE_Y',
|
||||||
|
|
||||||
|
# Semiconductors
|
||||||
'D': '_TEMPLATE_D',
|
'D': '_TEMPLATE_D',
|
||||||
'LED': '_TEMPLATE_D',
|
'LED': '_TEMPLATE_LED',
|
||||||
# Add more mappings as needed
|
'Q': '_TEMPLATE_Q_NPN',
|
||||||
|
'Q_NPN': '_TEMPLATE_Q_NPN',
|
||||||
|
'Q_NMOS': '_TEMPLATE_Q_NMOS',
|
||||||
|
'MOSFET': '_TEMPLATE_Q_NMOS',
|
||||||
|
|
||||||
|
# ICs
|
||||||
|
'U': '_TEMPLATE_U_OPAMP',
|
||||||
|
'OpAmp': '_TEMPLATE_U_OPAMP',
|
||||||
|
'IC': '_TEMPLATE_U_OPAMP',
|
||||||
|
'U_REG': '_TEMPLATE_U_REG',
|
||||||
|
'Regulator': '_TEMPLATE_U_REG',
|
||||||
|
|
||||||
|
# Connectors
|
||||||
|
'J': '_TEMPLATE_J2',
|
||||||
|
'J2': '_TEMPLATE_J2',
|
||||||
|
'J4': '_TEMPLATE_J4',
|
||||||
|
'Conn_2': '_TEMPLATE_J2',
|
||||||
|
'Conn_4': '_TEMPLATE_J4',
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
'SW': '_TEMPLATE_SW',
|
||||||
|
'Button': '_TEMPLATE_SW',
|
||||||
|
'Switch': '_TEMPLATE_SW',
|
||||||
}
|
}
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
@@ -58,11 +58,11 @@ class ProjectCommands:
|
|||||||
board.SetFileName(board_path)
|
board.SetFileName(board_path)
|
||||||
pcbnew.SaveBoard(board_path, board)
|
pcbnew.SaveBoard(board_path, board)
|
||||||
|
|
||||||
# Create schematic from template (use template_with_symbols for component cloning support)
|
# Create schematic from template (use expanded template with many component types)
|
||||||
schematic_path = project_path.replace(".kicad_pro", ".kicad_sch")
|
schematic_path = project_path.replace(".kicad_pro", ".kicad_sch")
|
||||||
template_sch_path = os.path.join(
|
template_sch_path = os.path.join(
|
||||||
os.path.dirname(os.path.abspath(__file__)),
|
os.path.dirname(os.path.abspath(__file__)),
|
||||||
'..', 'templates', 'template_with_symbols.kicad_sch'
|
'..', 'templates', 'template_with_symbols_expanded.kicad_sch'
|
||||||
)
|
)
|
||||||
|
|
||||||
if os.path.exists(template_sch_path):
|
if os.path.exists(template_sch_path):
|
||||||
|
|||||||
983
python/templates/template_with_symbols_expanded.kicad_sch
Normal file
983
python/templates/template_with_symbols_expanded.kicad_sch
Normal file
@@ -0,0 +1,983 @@
|
|||||||
|
(kicad_sch (version 20230121) (generator "KiCAD-MCP-Server")
|
||||||
|
|
||||||
|
(uuid 00000000-0000-0000-0000-000000000000)
|
||||||
|
|
||||||
|
(paper "A4")
|
||||||
|
|
||||||
|
(lib_symbols
|
||||||
|
;; PASSIVES
|
||||||
|
(symbol "Device:R" (pin_numbers hide) (pin_names (offset 0)) (in_bom yes) (on_board yes)
|
||||||
|
(property "Reference" "R" (at 2.032 0 90)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "R" (at 0 0 90)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -1.778 0 90)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "R_0_1"
|
||||||
|
(rectangle (start -1.016 -2.54) (end 1.016 2.54)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "R_1_1"
|
||||||
|
(pin passive line (at 0 3.81 270) (length 1.27)
|
||||||
|
(name "~" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "1" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at 0 -3.81 90) (length 1.27)
|
||||||
|
(name "~" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "Device:C" (pin_numbers hide) (pin_names (offset 0.254)) (in_bom yes) (on_board yes)
|
||||||
|
(property "Reference" "C" (at 0.635 2.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)) (justify left))
|
||||||
|
)
|
||||||
|
(property "Value" "C" (at 0.635 -2.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)) (justify left))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at 0.9652 -3.81 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "C_0_1"
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy -2.032 -0.762)
|
||||||
|
(xy 2.032 -0.762)
|
||||||
|
)
|
||||||
|
(stroke (width 0.508) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy -2.032 0.762)
|
||||||
|
(xy 2.032 0.762)
|
||||||
|
)
|
||||||
|
(stroke (width 0.508) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "C_1_1"
|
||||||
|
(pin passive line (at 0 3.81 270) (length 2.794)
|
||||||
|
(name "~" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "1" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at 0 -3.81 90) (length 2.794)
|
||||||
|
(name "~" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "Device:L" (pin_numbers hide) (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes)
|
||||||
|
(property "Reference" "L" (at -1.27 0 90)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "L" (at 1.905 0 90)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "L_0_1"
|
||||||
|
(arc (start 0 -2.54) (mid 0.635 -1.905) (end 0 -1.27)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(arc (start 0 -1.27) (mid 0.635 -0.635) (end 0 0)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(arc (start 0 0) (mid 0.635 0.635) (end 0 1.27)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(arc (start 0 1.27) (mid 0.635 1.905) (end 0 2.54)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "L_1_1"
|
||||||
|
(pin passive line (at 0 3.81 270) (length 1.27)
|
||||||
|
(name "1" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "1" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at 0 -3.81 90) (length 1.27)
|
||||||
|
(name "2" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "Device:Crystal" (pin_numbers hide) (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes)
|
||||||
|
(property "Reference" "Y" (at 0 3.81 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "Crystal" (at 0 -3.81 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "Crystal_0_1"
|
||||||
|
(rectangle (start -1.143 2.54) (end 1.143 -2.54)
|
||||||
|
(stroke (width 0.3048) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy -2.54 0)
|
||||||
|
(xy -1.905 0)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy -1.905 -1.27)
|
||||||
|
(xy -1.905 1.27)
|
||||||
|
)
|
||||||
|
(stroke (width 0.508) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 1.905 -1.27)
|
||||||
|
(xy 1.905 1.27)
|
||||||
|
)
|
||||||
|
(stroke (width 0.508) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 2.54 0)
|
||||||
|
(xy 1.905 0)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "Crystal_1_1"
|
||||||
|
(pin passive line (at -3.81 0 0) (length 1.27)
|
||||||
|
(name "1" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "1" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at 3.81 0 180) (length 1.27)
|
||||||
|
(name "2" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
;; SEMICONDUCTORS
|
||||||
|
(symbol "Device:D" (pin_numbers hide) (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes)
|
||||||
|
(property "Reference" "D" (at 0 2.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "D" (at 0 -2.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "D_0_1"
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy -1.27 1.27)
|
||||||
|
(xy -1.27 -1.27)
|
||||||
|
)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 1.27 0)
|
||||||
|
(xy -1.27 0)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 1.27 1.27)
|
||||||
|
(xy 1.27 -1.27)
|
||||||
|
(xy -1.27 0)
|
||||||
|
(xy 1.27 1.27)
|
||||||
|
)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "D_1_1"
|
||||||
|
(pin passive line (at -3.81 0 0) (length 2.54)
|
||||||
|
(name "K" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "1" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at 3.81 0 180) (length 2.54)
|
||||||
|
(name "A" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "Device:LED" (pin_numbers hide) (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes)
|
||||||
|
(property "Reference" "D" (at 0 2.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "LED" (at 0 -2.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "LED_0_1"
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy -1.27 -1.27)
|
||||||
|
(xy -1.27 1.27)
|
||||||
|
)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy -1.27 0)
|
||||||
|
(xy 1.27 0)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 1.27 -1.27)
|
||||||
|
(xy 1.27 1.27)
|
||||||
|
(xy -1.27 0)
|
||||||
|
(xy 1.27 -1.27)
|
||||||
|
)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "LED_1_1"
|
||||||
|
(pin passive line (at -3.81 0 0) (length 2.54)
|
||||||
|
(name "K" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "1" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at 3.81 0 180) (length 2.54)
|
||||||
|
(name "A" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "Device:Q_NPN_BCE" (pin_names (offset 0) hide) (in_bom yes) (on_board yes)
|
||||||
|
(property "Reference" "Q" (at 5.08 1.27 0)
|
||||||
|
(effects (font (size 1.27 1.27)) (justify left))
|
||||||
|
)
|
||||||
|
(property "Value" "Q_NPN_BCE" (at 5.08 -1.27 0)
|
||||||
|
(effects (font (size 1.27 1.27)) (justify left))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at 5.08 2.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "Q_NPN_BCE_0_1"
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 0.635 0.635)
|
||||||
|
(xy 2.54 2.54)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 0.635 -0.635)
|
||||||
|
(xy 2.54 -2.54)
|
||||||
|
(xy 2.54 -2.54)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 0.635 1.905)
|
||||||
|
(xy 0.635 -1.905)
|
||||||
|
(xy 0.635 -1.905)
|
||||||
|
)
|
||||||
|
(stroke (width 0.508) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 1.27 -1.778)
|
||||||
|
(xy 1.778 -1.27)
|
||||||
|
(xy 2.286 -2.286)
|
||||||
|
(xy 1.27 -1.778)
|
||||||
|
(xy 1.27 -1.778)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type outline))
|
||||||
|
)
|
||||||
|
(circle (center 1.27 0) (radius 2.8194)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "Q_NPN_BCE_1_1"
|
||||||
|
(pin input line (at -5.08 0 0) (length 5.715)
|
||||||
|
(name "B" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "1" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at 2.54 5.08 270) (length 2.54)
|
||||||
|
(name "C" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at 2.54 -5.08 90) (length 2.54)
|
||||||
|
(name "E" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "3" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "Device:Q_NMOS_GSD" (pin_names (offset 0) hide) (in_bom yes) (on_board yes)
|
||||||
|
(property "Reference" "Q" (at 5.08 1.27 0)
|
||||||
|
(effects (font (size 1.27 1.27)) (justify left))
|
||||||
|
)
|
||||||
|
(property "Value" "Q_NMOS_GSD" (at 5.08 -1.27 0)
|
||||||
|
(effects (font (size 1.27 1.27)) (justify left))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at 5.08 2.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "Q_NMOS_GSD_0_1"
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 0.254 0)
|
||||||
|
(xy -2.54 0)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 0.254 1.905)
|
||||||
|
(xy 0.254 -1.905)
|
||||||
|
)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 0.762 -1.27)
|
||||||
|
(xy 0.762 -2.286)
|
||||||
|
)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 0.762 0.508)
|
||||||
|
(xy 0.762 -0.508)
|
||||||
|
)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 0.762 2.286)
|
||||||
|
(xy 0.762 1.27)
|
||||||
|
)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 2.54 2.54)
|
||||||
|
(xy 2.54 1.778)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 2.54 -2.54)
|
||||||
|
(xy 2.54 0)
|
||||||
|
(xy 0.762 0)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 0.762 -1.778)
|
||||||
|
(xy 3.302 -1.778)
|
||||||
|
(xy 3.302 1.778)
|
||||||
|
(xy 0.762 1.778)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 1.016 0)
|
||||||
|
(xy 2.032 0.381)
|
||||||
|
(xy 2.032 -0.381)
|
||||||
|
(xy 1.016 0)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type outline))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 2.794 0.508)
|
||||||
|
(xy 2.921 0.381)
|
||||||
|
(xy 3.683 0.381)
|
||||||
|
(xy 3.81 0.254)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 3.302 0.381)
|
||||||
|
(xy 2.921 -0.254)
|
||||||
|
(xy 3.683 -0.254)
|
||||||
|
(xy 3.302 0.381)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(circle (center 1.651 0) (radius 2.794)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(circle (center 2.54 -1.778) (radius 0.254)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type outline))
|
||||||
|
)
|
||||||
|
(circle (center 2.54 1.778) (radius 0.254)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type outline))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "Q_NMOS_GSD_1_1"
|
||||||
|
(pin input line (at -5.08 0 0) (length 2.54)
|
||||||
|
(name "G" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "1" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at 2.54 -5.08 90) (length 2.54)
|
||||||
|
(name "S" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at 2.54 5.08 270) (length 2.54)
|
||||||
|
(name "D" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "3" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
;; INTEGRATED CIRCUITS
|
||||||
|
(symbol "Amplifier_Operational:LM358" (pin_names (offset 0.127)) (in_bom yes) (on_board yes)
|
||||||
|
(property "Reference" "U" (at 0 5.08 0)
|
||||||
|
(effects (font (size 1.27 1.27)) (justify left))
|
||||||
|
)
|
||||||
|
(property "Value" "LM358" (at 0 -5.08 0)
|
||||||
|
(effects (font (size 1.27 1.27)) (justify left))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "LM358_0_1"
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy -5.08 5.08)
|
||||||
|
(xy 5.08 0)
|
||||||
|
(xy -5.08 -5.08)
|
||||||
|
(xy -5.08 5.08)
|
||||||
|
)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type background))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "LM358_1_1"
|
||||||
|
(pin input line (at -7.62 2.54 0) (length 2.54)
|
||||||
|
(name "~" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "1" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin input line (at -7.62 -2.54 0) (length 2.54)
|
||||||
|
(name "+" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin output line (at 7.62 0 180) (length 2.54)
|
||||||
|
(name "~" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "3" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin power_in line (at -2.54 -7.62 90) (length 3.81)
|
||||||
|
(name "V-" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "4" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin power_in line (at -2.54 7.62 270) (length 3.81)
|
||||||
|
(name "V+" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "8" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
;; CONNECTORS
|
||||||
|
(symbol "Connector_Generic:Conn_01x02" (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes)
|
||||||
|
(property "Reference" "J" (at 0 2.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "Conn_01x02" (at 0 -5.08 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "Conn_01x02_1_1"
|
||||||
|
(rectangle (start -1.27 -2.413) (end 0 -2.667)
|
||||||
|
(stroke (width 0.1524) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(rectangle (start -1.27 0.127) (end 0 -0.127)
|
||||||
|
(stroke (width 0.1524) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(rectangle (start -1.27 1.27) (end 1.27 -3.81)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type background))
|
||||||
|
)
|
||||||
|
(pin passive line (at -5.08 0 0) (length 3.81)
|
||||||
|
(name "Pin_1" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "1" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at -5.08 -2.54 0) (length 3.81)
|
||||||
|
(name "Pin_2" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "Connector_Generic:Conn_01x04" (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes)
|
||||||
|
(property "Reference" "J" (at 0 5.08 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "Conn_01x04" (at 0 -7.62 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "Conn_01x04_1_1"
|
||||||
|
(rectangle (start -1.27 -4.953) (end 0 -5.207)
|
||||||
|
(stroke (width 0.1524) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(rectangle (start -1.27 -2.413) (end 0 -2.667)
|
||||||
|
(stroke (width 0.1524) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(rectangle (start -1.27 0.127) (end 0 -0.127)
|
||||||
|
(stroke (width 0.1524) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(rectangle (start -1.27 2.667) (end 0 2.413)
|
||||||
|
(stroke (width 0.1524) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(rectangle (start -1.27 3.81) (end 1.27 -6.35)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type background))
|
||||||
|
)
|
||||||
|
(pin passive line (at -5.08 2.54 0) (length 3.81)
|
||||||
|
(name "Pin_1" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "1" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at -5.08 0 0) (length 3.81)
|
||||||
|
(name "Pin_2" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at -5.08 -2.54 0) (length 3.81)
|
||||||
|
(name "Pin_3" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "3" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at -5.08 -5.08 0) (length 3.81)
|
||||||
|
(name "Pin_4" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "4" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
;; POWER/REGULATORS
|
||||||
|
(symbol "Regulator_Linear:AMS1117-3.3" (pin_names (offset 0.254)) (in_bom yes) (on_board yes)
|
||||||
|
(property "Reference" "U" (at -3.81 3.175 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "AMS1117-3.3" (at 0 3.175 0)
|
||||||
|
(effects (font (size 1.27 1.27)) (justify left))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at 0 5.08 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "" (at 2.54 -6.35 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "AMS1117-3.3_0_1"
|
||||||
|
(rectangle (start -5.08 1.905) (end 5.08 -5.08)
|
||||||
|
(stroke (width 0.254) (type default))
|
||||||
|
(fill (type background))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "AMS1117-3.3_1_1"
|
||||||
|
(pin power_in line (at 0 -7.62 90) (length 2.54)
|
||||||
|
(name "GND" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "1" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin power_out line (at 7.62 0 180) (length 2.54)
|
||||||
|
(name "VO" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin power_in line (at -7.62 0 0) (length 2.54)
|
||||||
|
(name "VI" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "3" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
;; MISC
|
||||||
|
(symbol "Switch:SW_Push" (pin_numbers hide) (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes)
|
||||||
|
(property "Reference" "SW" (at 1.27 2.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)) (justify left))
|
||||||
|
)
|
||||||
|
(property "Value" "SW_Push" (at 0 -1.524 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at 0 5.08 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at 0 5.08 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "SW_Push_0_1"
|
||||||
|
(circle (center -2.032 0) (radius 0.508)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 0 1.27)
|
||||||
|
(xy 0 3.048)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(polyline
|
||||||
|
(pts
|
||||||
|
(xy 2.54 1.27)
|
||||||
|
(xy -2.54 1.27)
|
||||||
|
)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(circle (center 2.032 0) (radius 0.508)
|
||||||
|
(stroke (width 0) (type default))
|
||||||
|
(fill (type none))
|
||||||
|
)
|
||||||
|
(pin passive line (at -5.08 0 0) (length 2.54)
|
||||||
|
(name "1" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "1" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
(pin passive line (at 5.08 0 180) (length 2.54)
|
||||||
|
(name "2" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
;; TEMPLATE INSTANCES (placed offscreen at -100, -110, etc.)
|
||||||
|
(symbol (lib_id "Device:R") (at -100 -100 0) (unit 1)
|
||||||
|
(in_bom no) (on_board no) (dnp yes)
|
||||||
|
(uuid 00000000-0000-0000-0000-000000000001)
|
||||||
|
(property "Reference" "_TEMPLATE_R" (at -100 -102.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "R" (at -100 -100 90)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -100 -100 90)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at -100 -100 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "1" (uuid 10000000-0000-0000-0000-000000000001))
|
||||||
|
(pin "2" (uuid 10000000-0000-0000-0000-000000000002))
|
||||||
|
)
|
||||||
|
|
||||||
|
(symbol (lib_id "Device:C") (at -100 -110 0) (unit 1)
|
||||||
|
(in_bom no) (on_board no) (dnp yes)
|
||||||
|
(uuid 00000000-0000-0000-0000-000000000002)
|
||||||
|
(property "Reference" "_TEMPLATE_C" (at -100 -107.46 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "C" (at -100 -112.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -100 -110 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at -100 -110 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "1" (uuid 20000000-0000-0000-0000-000000000001))
|
||||||
|
(pin "2" (uuid 20000000-0000-0000-0000-000000000002))
|
||||||
|
)
|
||||||
|
|
||||||
|
(symbol (lib_id "Device:L") (at -100 -120 0) (unit 1)
|
||||||
|
(in_bom no) (on_board no) (dnp yes)
|
||||||
|
(uuid 00000000-0000-0000-0000-000000000003)
|
||||||
|
(property "Reference" "_TEMPLATE_L" (at -100 -117.46 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "L" (at -100 -122.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -100 -120 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at -100 -120 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "1" (uuid 30000000-0000-0000-0000-000000000001))
|
||||||
|
(pin "2" (uuid 30000000-0000-0000-0000-000000000002))
|
||||||
|
)
|
||||||
|
|
||||||
|
(symbol (lib_id "Device:Crystal") (at -100 -130 0) (unit 1)
|
||||||
|
(in_bom no) (on_board no) (dnp yes)
|
||||||
|
(uuid 00000000-0000-0000-0000-000000000004)
|
||||||
|
(property "Reference" "_TEMPLATE_Y" (at -100 -127.46 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "Crystal" (at -100 -132.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -100 -130 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at -100 -130 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "1" (uuid 40000000-0000-0000-0000-000000000001))
|
||||||
|
(pin "2" (uuid 40000000-0000-0000-0000-000000000002))
|
||||||
|
)
|
||||||
|
|
||||||
|
(symbol (lib_id "Device:D") (at -100 -140 0) (unit 1)
|
||||||
|
(in_bom no) (on_board no) (dnp yes)
|
||||||
|
(uuid 00000000-0000-0000-0000-000000000005)
|
||||||
|
(property "Reference" "_TEMPLATE_D" (at -100 -137.46 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "D" (at -100 -142.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -100 -140 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at -100 -140 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "1" (uuid 50000000-0000-0000-0000-000000000001))
|
||||||
|
(pin "2" (uuid 50000000-0000-0000-0000-000000000002))
|
||||||
|
)
|
||||||
|
|
||||||
|
(symbol (lib_id "Device:LED") (at -100 -150 0) (unit 1)
|
||||||
|
(in_bom no) (on_board no) (dnp yes)
|
||||||
|
(uuid 00000000-0000-0000-0000-000000000006)
|
||||||
|
(property "Reference" "_TEMPLATE_LED" (at -100 -147.46 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "LED" (at -100 -152.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -100 -150 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at -100 -150 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "1" (uuid 60000000-0000-0000-0000-000000000001))
|
||||||
|
(pin "2" (uuid 60000000-0000-0000-0000-000000000002))
|
||||||
|
)
|
||||||
|
|
||||||
|
(symbol (lib_id "Device:Q_NPN_BCE") (at -100 -160 0) (unit 1)
|
||||||
|
(in_bom no) (on_board no) (dnp yes)
|
||||||
|
(uuid 00000000-0000-0000-0000-000000000007)
|
||||||
|
(property "Reference" "_TEMPLATE_Q_NPN" (at -100 -157.46 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "Q_NPN" (at -100 -162.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -100 -160 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at -100 -160 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "1" (uuid 70000000-0000-0000-0000-000000000001))
|
||||||
|
(pin "2" (uuid 70000000-0000-0000-0000-000000000002))
|
||||||
|
(pin "3" (uuid 70000000-0000-0000-0000-000000000003))
|
||||||
|
)
|
||||||
|
|
||||||
|
(symbol (lib_id "Device:Q_NMOS_GSD") (at -100 -170 0) (unit 1)
|
||||||
|
(in_bom no) (on_board no) (dnp yes)
|
||||||
|
(uuid 00000000-0000-0000-0000-000000000008)
|
||||||
|
(property "Reference" "_TEMPLATE_Q_NMOS" (at -100 -167.46 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "Q_NMOS" (at -100 -172.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -100 -170 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at -100 -170 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "1" (uuid 80000000-0000-0000-0000-000000000001))
|
||||||
|
(pin "2" (uuid 80000000-0000-0000-0000-000000000002))
|
||||||
|
(pin "3" (uuid 80000000-0000-0000-0000-000000000003))
|
||||||
|
)
|
||||||
|
|
||||||
|
(symbol (lib_id "Amplifier_Operational:LM358") (at -100 -180 0) (unit 1)
|
||||||
|
(in_bom no) (on_board no) (dnp yes)
|
||||||
|
(uuid 00000000-0000-0000-0000-000000000009)
|
||||||
|
(property "Reference" "_TEMPLATE_U_OPAMP" (at -100 -177.46 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "OpAmp" (at -100 -182.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -100 -180 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "" (at -100 -180 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "1" (uuid 90000000-0000-0000-0000-000000000001))
|
||||||
|
(pin "2" (uuid 90000000-0000-0000-0000-000000000002))
|
||||||
|
(pin "3" (uuid 90000000-0000-0000-0000-000000000003))
|
||||||
|
(pin "4" (uuid 90000000-0000-0000-0000-000000000004))
|
||||||
|
(pin "8" (uuid 90000000-0000-0000-0000-000000000005))
|
||||||
|
)
|
||||||
|
|
||||||
|
(symbol (lib_id "Connector_Generic:Conn_01x02") (at -100 -190 0) (unit 1)
|
||||||
|
(in_bom no) (on_board no) (dnp yes)
|
||||||
|
(uuid 00000000-0000-0000-0000-00000000000A)
|
||||||
|
(property "Reference" "_TEMPLATE_J2" (at -100 -187.46 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "Conn_2" (at -100 -192.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -100 -190 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at -100 -190 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "1" (uuid A0000000-0000-0000-0000-000000000001))
|
||||||
|
(pin "2" (uuid A0000000-0000-0000-0000-000000000002))
|
||||||
|
)
|
||||||
|
|
||||||
|
(symbol (lib_id "Connector_Generic:Conn_01x04") (at -100 -200 0) (unit 1)
|
||||||
|
(in_bom no) (on_board no) (dnp yes)
|
||||||
|
(uuid 00000000-0000-0000-0000-00000000000B)
|
||||||
|
(property "Reference" "_TEMPLATE_J4" (at -100 -197.46 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "Conn_4" (at -100 -202.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -100 -200 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at -100 -200 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "1" (uuid B0000000-0000-0000-0000-000000000001))
|
||||||
|
(pin "2" (uuid B0000000-0000-0000-0000-000000000002))
|
||||||
|
(pin "3" (uuid B0000000-0000-0000-0000-000000000003))
|
||||||
|
(pin "4" (uuid B0000000-0000-0000-0000-000000000004))
|
||||||
|
)
|
||||||
|
|
||||||
|
(symbol (lib_id "Regulator_Linear:AMS1117-3.3") (at -100 -210 0) (unit 1)
|
||||||
|
(in_bom no) (on_board no) (dnp yes)
|
||||||
|
(uuid 00000000-0000-0000-0000-00000000000C)
|
||||||
|
(property "Reference" "_TEMPLATE_U_REG" (at -100 -207.46 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "Regulator" (at -100 -212.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -100 -210 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "" (at -100 -210 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "1" (uuid C0000000-0000-0000-0000-000000000001))
|
||||||
|
(pin "2" (uuid C0000000-0000-0000-0000-000000000002))
|
||||||
|
(pin "3" (uuid C0000000-0000-0000-0000-000000000003))
|
||||||
|
)
|
||||||
|
|
||||||
|
(symbol (lib_id "Switch:SW_Push") (at -100 -220 0) (unit 1)
|
||||||
|
(in_bom no) (on_board no) (dnp yes)
|
||||||
|
(uuid 00000000-0000-0000-0000-00000000000D)
|
||||||
|
(property "Reference" "_TEMPLATE_SW" (at -100 -217.46 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "Switch" (at -100 -222.54 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "" (at -100 -220 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "~" (at -100 -220 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "1" (uuid D0000000-0000-0000-0000-000000000001))
|
||||||
|
(pin "2" (uuid D0000000-0000-0000-0000-000000000002))
|
||||||
|
)
|
||||||
|
|
||||||
|
(sheet_instances
|
||||||
|
(path "/" (page "1"))
|
||||||
|
)
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user