Skip to content
cosmo logo

Cosmo Electronics Manufacturer Skill

cosmo

Cosmo Electronics MPN encoding patterns, suffix decoding, and handler guidance. Use when working with Cosmo optocouplers or CosmoHandler.

SKILL.md

Full skill instructions

Cosmo Electronics Manufacturer Skill

Overview

Cosmo Electronics is a Taiwanese manufacturer specializing in optocouplers and photo interrupters. Their product lines use the "KP" prefix family.

MPN Structure

Cosmo MPNs follow these general patterns:

KP Series (Phototransistor Optocouplers)

KP[SERIES][VARIANT][-SUFFIX]
   |         |         |
   |         |         +-- Optional: -1=DIP-4, C/​S=SMD
   |         +-- Variant letter (optional)
   +-- 4-digit series (e.g., 1010, 2010, 4010)

KPC Series (High Isolation)

KPC[SERIES][CTR-GRADE][PKG-IND][-SUFFIX]
    |         |          |        |
    |         |          |        +-- Optional suffix
    |         |          +-- Package indicator (S/​G=SMD, T=SOP)
    |         +-- CTR Grade: A/​B/​C/​D
    +-- 3-digit series (e.g., 817, 357)

Example Decoding

KP1010-1
|  |   |
|  |   +-- -1 = DIP-4 package
|  +-- 1010 = Single channel phototransistor
+-- KP = Phototransistor optocoupler series

KPC817C-1
|  |  | |
|  |  | +-- -1 = DIP-4 package
|  |  +-- C = CTR grade (200-400%)
|  +-- 817 = General purpose high isolation
+-- KPC = High isolation optocoupler

KPH121S
|  |  |
|  |  +-- S = SMD package
|  +-- 121 = High speed single channel
+-- KPH = High speed optocoupler

Product Lines

KP Series - Phototransistor Optocouplers

SeriesDescriptionChannels
KP1010Single channel phototransistor1
KP1020Single channel (variant)1
KP2010Dual channel phototransistor2
KP4010Quad channel phototransistor4

KPC Series - High Isolation Optocouplers

SeriesDescriptionOutput
KPC817General purpose, high isolationPhototransistor
KPC357Darlington outputDarlington

Note: KPC817 is functionally equivalent to Sharp PC817.

KPH Series - High Speed Optocouplers

SeriesDescriptionChannels
KPH121High speed single channel1
KPH141High speed dual channel2

KPS Series - SMD Optocouplers

SeriesDescriptionPackage
KPS1010SMD version of KP1010SMD
KPS2010SMD version of KP2010SMD

KPTR Series - Reflective Sensors

SeriesDescriptionType
KPTR1200Reflective photo interrupterSensor
KPTR1201Reflective photo interrupterSensor

CTR (Current Transfer Ratio) Grades

For KPC817 series:

GradeCTR RangeApplication
A80-160%Highest gain
B130-260%High gain
C200-400%Medium gain
D300-600%Wide range

Package Codes

Suffix-Based Packages

SuffixPackageNotes
-1DIP-4Standard 4-pin DIP
CSMDCompact SMD variant
SSMDSurface mount
GSMDSMD variant
TSOPThin SOP variant
-FLead-freeRoHS compliant
-TRTape and reelPackaging option

Default Packages by Series

PrefixDefault Package
KPDIP-4
KPCDIP-4
KPHDIP
KPSSMD (always)
KPTRSMD (always)

Channel Count by Series

Series PatternChannels
1010, 1020, 817, 357, 121, 1200, 12011
2010, 1412
40104

Handler Implementation Notes

Pattern Matching

// KP series: 4-digit series number
"^KP\\d{4}.*"        // KP1010, KP2010, KP4010

// KPC series: 3-digit series number
"^KPC\\d{3}.*"       // KPC817, KPC357

// KPH series: 3-digit series number
"^KPH\\d{3}.*"       // KPH121, KPH141

// KPS series: 4-digit series number
"^KPS\\d{4}.*"       // KPS1010, KPS2010

// KPTR series: 4-digit series number
"^KPTR\\d{4}.*"      // KPTR1200, KPTR1201

Series Extraction

// Returns prefix + series number
"KP1010-1" -> "KP1010"
"KPC817C" -> "KPC817"
"KPH121S" -> "KPH121"
"KPS2010C" -> "KPS2010"
"KPTR1200" -> "KPTR1200"

Package Extraction Logic

// Check for -1 suffix first
"KPC817C-1" -> "DIP-4"

// KPS series is always SMD
"KPS1010" -> "SMD"

// KPTR series is always SMD
"KPTR1200" -> "SMD"

// Check package indicators for KPC
"KPC817CS" -> "SMD"  // S = SMD
"KPC817CT" -> "SOP"  // T = SOP thin

// Check variant letter for KP/​KPH
"KP1010C" -> "SMD"
"KPH121S" -> "SMD"

// Default packages
"KP1010" -> "DIP-4"
"KPC817C" -> "DIP-4"
"KPH121" -> "DIP"

CTR Grade Extraction

// KPC series: letter after 3-digit number
"KPC817A" -> "A"
"KPC817B-1" -> "B"
"KPC817CS" -> "C"  // C is CTR, S is package

Component Types

The handler maps to these ComponentTypes:

PrefixComponentTypes
KP, KPC, KPH, KPSIC, OPTOCOUPLER_TOSHIBA
KPTRIC, SENSOR

Note: Uses OPTOCOUPLER_TOSHIBA as the generic optocoupler type (historical naming).


Cross-Reference / Equivalents

CosmoEquivalentNotes
KPC817Sharp PC817Pin-compatible
KPC817Toshiba TLP817Pin-compatible
KPC357Sharp PC357Darlington output

Related Files

  • Handler: manufacturers/​CosmoHandler.java
  • Component types: ComponentType.IC, ComponentType.OPTOCOUPLER_TOSHIBA, ComponentType.SENSOR

Learnings & Edge Cases

  • CTR grade vs package indicator: For KPC series, the first letter after digits is CTR grade (A-D), subsequent letters may be package indicators (S/​G/​T). Order matters.
  • KPS always SMD: The KPS prefix indicates SMD package regardless of any suffix.
  • KPTR is a sensor: KPTR series are reflective sensors, not optocouplers. They map to SENSOR type.
  • Channel count from series: 1010/​1020 = single, 2010 = dual, 4010 = quad. The first digit often indicates channel count.
  • Replacement compatibility: Same series with different packages (DIP vs SMD) are not direct replacements due to footprint differences.
<!-- Add new learnings above this line -->

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View