Lib-electronic-components similarity-regulator

Use when working with voltage regulator similarity calculations - comparing 78xx/79xx fixed regulators, LM317/LM337 adjustable regulators, or voltage regulator-specific similarity logic.

install
source · Clone the upstream repo
git clone https://github.com/Cantara/lib-electronic-components
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Cantara/lib-electronic-components "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/similarity-regulator" ~/.claude/skills/cantara-lib-electronic-components-similarity-regulator && rm -rf "$T"
manifest: .claude/skills/similarity-regulator/SKILL.md
source content

Voltage Regulator Similarity Calculator Skill

Guidance for working with

VoltageRegulatorSimilarityCalculator
in the lib-electronic-components library.


For metadata-driven similarity architecture, see

/similarity-metadata
:

  • SpecImportance levels (CRITICAL, HIGH, MEDIUM, LOW, OPTIONAL)
  • ToleranceRule types (exactMatch, percentageTolerance, minimumRequired, etc.)
  • SimilarityProfile contexts (DESIGN_PHASE, REPLACEMENT, COST_OPTIMIZATION, etc.)
  • Calculator integration patterns and gotchas

Overview

The

VoltageRegulatorSimilarityCalculator
compares voltage regulators based on:

  • Regulator type - Fixed (78xx/79xx) vs Adjustable (LM317/LM337)
  • Output voltage - Must match for fixed regulators
  • Polarity - Positive vs negative
  • Compatible families - LM317/LM338/LM350 are compatible

Applicable Types

ComponentType.VOLTAGE_REGULATOR
// Any type starting with "VOLTAGE_REGULATOR"

Returns

false
for
null
type.

Similarity Thresholds

HIGH_SIMILARITY = 0.9;   // Same voltage/compatible adjustable
MEDIUM_SIMILARITY = 0.7; // Related but different specs
LOW_SIMILARITY = 0.3;    // Different voltage or polarity

Fixed Voltage Regulators (78xx/79xx)

Positive Regulators (78xx)

PartOutput Voltage
7805+5V
7809+9V
7812+12V
7815+15V
7824+24V

Negative Regulators (79xx)

PartOutput Voltage
7905-5V
7912-12V
7915-15V
7924-24V

Fixed Regulator Rules

// Same voltage, different manufacturer = HIGH
calculator.calculateSimilarity("LM7805", "MC7805", registry);
// Returns 0.9

// Different voltage = LOW
calculator.calculateSimilarity("LM7805", "LM7812", registry);
// Returns 0.3

// Positive vs Negative = LOW
calculator.calculateSimilarity("LM7805", "LM7905", registry);
// Returns 0.3

Adjustable Voltage Regulators

Positive Adjustable (Compatible Family)

PartCurrentEquivalent
LM3171.5ALM317T, LM317K, LM317H
LM3385ACompatible with LM317
LM3503ACompatible with LM317

Negative Adjustable

PartCurrentNote
LM3371.5ANegative equivalent of LM317

Adjustable Regulator Rules

// Same adjustable regulator, different package = HIGH
calculator.calculateSimilarity("LM317T", "LM317K", registry);
// Returns 0.9

// Compatible positive adjustable regulators = HIGH
calculator.calculateSimilarity("LM317", "LM350", registry);
// Returns 0.9

// Positive vs Negative adjustable = LOW
calculator.calculateSimilarity("LM317", "LM337", registry);
// Returns 0.3

Package Code Handling

Common package suffixes:

CodePackage
TTO-220
CTTO-220 (different pinout)
KTO-3
KCTO-3
KVTO-3
HTO-39
SSOT-223
MPSOT-223
DTTO-252
// Same regulator, different packages = HIGH
calculator.calculateSimilarity("LM7805CT", "LM7805T", registry);
// Returns 0.9

Manufacturer Prefixes

PrefixManufacturer
LMNational/TI
MCMotorola/ON Semi
UAFairchild
L78ST
KA78Fairchild

Test Examples

// Same voltage, different manufacturer
calculator.calculateSimilarity("LM7805", "MC7805", registry);
// Returns 0.9

// Same adjustable, different package
calculator.calculateSimilarity("LM317T", "LM317K", registry);
// Returns 0.9

// Compatible adjustable family
calculator.calculateSimilarity("LM317", "LM338", registry);
// Returns 0.9

// Different voltage
calculator.calculateSimilarity("LM7805", "LM7812", registry);
// Returns 0.3

// Positive vs negative
calculator.calculateSimilarity("LM317", "LM337", registry);
// Returns 0.3

// Non-regulator parts
calculator.calculateSimilarity("LM358", "LM324", registry);
// Returns 0.0

Learnings & Quirks

Voltage Detection

  • The
    xx
    in 78xx/79xx indicates voltage (05=5V, 12=12V)
  • Pattern:
    7[89](\d{2})
    extracts the voltage code

Adjustable Detection

  • LM317, LM337, LM338, LM350 are detected by prefix
  • Package suffixes (T, K, H) come after the number

Cross-Manufacturer Equivalence

  • LM7805 ≈ MC7805 ≈ UA7805 ≈ L7805
  • All major manufacturers make compatible 78xx parts

Current Rating

  • 78Lxx = 100mA (low power)
  • 78Mxx = 500mA (medium power)
  • 78xx = 1A (standard)
  • 78Hxx = 5A (high power)
<!-- Add new learnings above this line -->