| name | ee-datasheet-master |
| description | Use when user has/is reading a component datasheet or spec sheet to find chip parameters: pinout, voltage, I2C address, timing, register map, electrical characteristics. Trigger on PDF+chip questions. Also: ่งๆ ผไนฆ, ๆฐๆฎๆๅ, ่ฏ็ๅๆฐ. All IC types. |
| compatibility | Requires python3 and the Python packages listed in scripts/requirements.txt. |
EE Datasheet Master
Instructions
Step 1: Confirm the required inputs and environment
Before using scripts/pdf_tools.py:
- Require a valid PDF path
- Require
python3
- Require the Python packages used by
scripts/pdf_tools.py
If a required dependency or input is missing:
- Stop before claiming the skill is usable for this task
- State exactly what is missing
- Tell the user the skill may be installed, but the current task is blocked until that requirement is provided
Step 2: Follow the PDF-only extraction rule
All factual output must come from the PDF itself. If the PDF cannot provide the answer, return NOT SPECIFIED IN DATASHEET and explain the most direct way to obtain that information.
Iron Law: PDF Content Only
ALL DATA MUST ORIGINATE FROM THE PDF.
Allowed: Extract โ Calculate from extracted data
Forbidden: Use prior knowledge โ Fill gaps with guesses
Allowed Derivations
| Type | Example |
|---|
| Mathematical calculation | P = V ร I from voltage and current |
| Unit conversion | dBm โ mW, binary โ hex |
| Address calculation | "001000x" โ 0x10/0x11 |
| Counting | Pin count from Pin Description table |
When deriving: Show source data (page) + calculation steps + result
Forbidden Behaviors
| Behavior | Correction |
|---|
| "I know this chip..." | Find the spec in PDF |
| "Typical value is..." | Read the actual value from PDF |
| "Similar chips have..." | This one may differ |
| Guessing to fill gaps | Output "NOT SPECIFIED IN DATASHEET" + acquisition path (see below) |
When the PDF Cannot Provide the Answer
"NOT SPECIFIED IN DATASHEET" is not a dead end. Always follow it with how to obtain the missing information.
Response Template
"[Parameter] is not specified in this datasheet.
To obtain it: [specific method below]."
If the datasheet references an application note or supplementary doc by name, cite it:
"Section X references Application Note [AN-xxx] for this topic โ search [Manufacturer] website."
Reasoning Framework for Missing Parameters
When a parameter is absent, reason through these questions to give a concrete, actionable path:
1. Why is it missing?
- Wrong document โ this is a brief/product datasheet; the full reference manual or application note contains it โ identify the correct document by name
- Test-condition mismatch โ the spec exists but not at the user's specific conditions (load, frequency, temperature) โ explain which conditions differ and how that affects the value
- Application-dependent โ the value depends on external components or PCB layout the user controls โ explain what determines it and how to calculate or simulate
- Manufacturer-controlled โ the data is from qualification testing, not released publicly โ identify the right contact channel
2. What does the user actually need it for?
- Design margin check โ an approximation or worst-case bound may be sufficient
- Debugging a failure โ direct measurement in the actual circuit is more reliable than a datasheet value
- Qualification / compliance โ only manufacturer-provided data is acceptable
3. What is the most direct path given the above?
Tailor the recommendation to the specific parameter and context โ a thermal resistance question for an LDO in a hot enclosure calls for a different answer than the same question for a signal-path op-amp. Reason about: what equipment would give this measurement, what document would contain this spec, or what formula derives this value from things the user can measure or control.
6-Phase Workflow
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Phase 0: Pre-scan โ ๅ
จๆๆซๆ๏ผๅปบ็ปๆๅฐๅพ โ
โ Phase 1: Diagnosis โ text vs image PDF ๅณ็ญ โ
โ Phase 2: Device ID โ ็กฎ่ฎคๅจไปถ๏ผๆจๆญๅ
ณ้ฎๅๆฐ โ
โ Phase 2b: Targeted Scan โ ๆจๆญ patterns๏ผไบๆฌก็ฒพๅๆซๆ โ
โ Phase 3: Section Mapping โ ๅฎไฝๅๅ่ฝๅบ้กต็ โ
โ Phase 4: Extraction โ ็ฒพๅๆๅ + TEMPLATES ็ปๆๅ่พๅบ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
See PDF_STRATEGY.md for the entry-point decision table and detailed workflow. Read that first โ it tells you which phase to start at before running any command.
Quick Reference
Most common case โ device named, 1โ2 specific parameters asked (start here):
python scripts/pdf_tools.py search_table <pdf_path> "<parameter>"
python scripts/pdf_tools.py search <pdf_path> "<parameter>"
python scripts/pdf_tools.py text <pdf_path> <page_num>
python scripts/pdf_tools.py tables <pdf_path> <page_num>
Less common โ unknown PDF, open-ended analysis, or complex multi-parameter extraction:
python scripts/pdf_tools.py info <pdf_path>
python scripts/pdf_tools.py page_hints <pdf_path>
python scripts/pdf_tools.py text <pdf_path> 1
python scripts/pdf_tools.py dump_patterns > /tmp/custom_patterns.json
python scripts/pdf_tools.py page_hints <pdf_path> --patterns /tmp/custom_patterns.json
python scripts/pdf_tools.py search_caption <pdf_path>
python scripts/pdf_tools.py search <pdf_path> "Electrical Characteristics"
Parameter Inference (LLM Decision)
Universal Parameters (for full-analysis queries only)
When the user asks for a complete analysis or overview, extract these 5 baseline parameters. Skip this for targeted single-parameter queries โ if the user asks "what is the dropout voltage?", go find that, not the package outline.
| Parameter | Search Keywords | Notes |
|---|
| Manufacturer | First page header/footer | Company name |
| Part Number | First page title | Full part number |
| Package | "Package", "ๅฐ่ฃ
" | Must include pin count (e.g., QFN-32) |
| Operating Voltage | "VDD", "VCC", "Supply Voltage", "็ตๆบ็ตๅ" | Range: min to max |
| Operating Temperature | "Operating Temperature", "ๅทฅไฝๆธฉๅบฆ" | Range: min to max |
Device-Specific Parameters (Inferred by LLM)
After identifying the device, infer what specs matter:
1. Read device description (first 3 pages)
2. Understand: What does this device DO?
3. Infer: What specs matter for this device?
4. Search: Use pdf_tools to locate those specs
For the complete device-type โ key specs lookup table and per-device extraction shortcuts, see PDF_STRATEGY.md โ Phase 2 and Device-Type Shortcuts.
Key insight: Device description tells you what to measure. Don't use predefined lists.
Output Format
# [Part Number] Datasheet Analysis
## Summary
[1-2 sentences]
## Key Specifications
| Parameter | Min | Typ | Max | Unit | Source | Notes |
|-----------|-----|-----|-----|------|--------|-------|
| ... | ... | ... | ... | ... | Page X, "Table Name" | |
| [unavailable param] | โ | โ | โ | ... | NOT SPECIFIED | Measure: [method] |
## Pin Configuration
- Package: [Type]-[Pin Count]
- Power Domains: [List ALL with pin numbers]
- Interfaces: [I2C/SPI/UART with addresses]
## Critical Design Considerations
1. [Issue with guidance]
## Common Pitfalls
- [Pitfall]: [How to avoid]
Common Mistakes
| Mistake | Example | Correction |
|---|
| Missing pin count | "QFN package" | "QFN-32 package" |
| Partial power domains | "VDD" only | "VDD (pins 1, 13, 32)" |
| I2C address wrong | "0x18" | Show calculation from format |
| Missing source | "SNR: 93 dB" | "SNR: 93 dB (Page 8, Typ)" |
| Hallucinated specs | Any value without source | Always cite page and table |
Troubleshooting
Error: ModuleNotFoundError: fitz or No module named 'pdfplumber'
Cause: Python dependencies are not installed.
Solution: Run pip install -r scripts/requirements.txt before continuing.
Error: File not found or the PDF path does not exist
Cause: The PDF was not provided or the path is wrong.
Solution: Ask the user for the exact PDF path. Do not answer from memory or general web knowledge.
Error: is_text_based: false or extracted text is mostly garbage
Cause: The PDF is image-based or uses difficult font encoding.
Solution: Use render_page, read visually, and lower confidence. If manufacturer or part number cannot be confirmed from the rendered page, return UNABLE TO VERIFY.
Error: The requested parameter is not in the datasheet
Cause: The value is genuinely absent from this document, or the wrong document was provided.
Solution: Return NOT SPECIFIED IN DATASHEET and follow it with the most direct acquisition path.
Error: Tool commands keep failing
Cause: Broken Python environment, unsupported PDF edge case, or damaged file.
Solution: Report the failing command and classify the issue as dependency, file integrity, or extraction quality. Do not present guesses as extracted facts.
Red Flags - STOP and Verify
If you think:
- "I know this chip..."
- "Typically this value is..."
- "Based on my experience..."
- "Similar chips have..."
STOP โ Re-read PDF โ Extract from source
Reference Files