AD元器件库中参数的设计
AD软件中元器件库中的元器件可以自定义添加参数,这些参数可以用于元器件的特性描述,也可以用于元器件的特性计算。
在搭建数据库类型的元件库时就会遇到这个问题,如何选择元器件的参数放在库中呢?因为数据库的表结构是固定的,所以元器件的参数字段也是固定的,如果元器件的参数太多,那么表结构就会很复杂,不利于维护。如果元器件的参数太少,那么元器件的特性描述就会不够详细,不利于使用。
“良好的设计就是合理的trade-off的结果”,所以在设计元器件库时,需要权衡元器件的参数数量和表结构的复杂度。
目前我在数据库中采用的字段如下:
{"Component": {"name": "Component","description": "电子元器件","default_location": 0,"default_keywords": "component 元器件","parent": "Electrical","structural": true,"icon": "","parameter_template": {"pin_count": {"name": "Pin Count","description": "引脚数量,不含裸露焊盘、定位引脚等","checkbox": false},"ep_pin_count": {"name": "EP Pin Count","description": "裸露焊盘或定位引脚数量","checkbox": false},"ad_sym_ref": {"name": "AD Library Ref","description": "AD原理图符号库引用","checkbox": false},"ad_fp_ref": {"name": "AD Footprint Ref","description": "AD PCB封装图形库引用","checkbox": false},"ad_fp_ref_2": {"name": "AD Footprint Ref 2","description": "AD PCB封装图形库引用 2","checkbox": false},"ad_fp_ref_3": {"name": "AD Footprint Ref 3","description": "AD PCB封装图形库引用 3","checkbox": false},"ad_link1_description": {"name": "ComponentLink1Description","description": "元器件链接 1 描述","checkbox": false},"ad_link1_url": {"name": "ComponentLink1URL","description": "元器件链接 1 URL","checkbox": false},"ad_link2_description": {"name": "ComponentLink2Description","description": "元器件链接 2 描述","checkbox": false},"ad_link2_url": {"name": "ComponentLink2URL","description": "元器件链接 2 URL","checkbox": false},"mount_type": {"name": "Mount Type","description": "安装类型","checkbox": false,"choices": "SMT,THT,MIX"},"package_name": {"name": "Package Name","description": "封装名称","checkbox": false},"operating_temperature": {"name": "Operating Temperature","description": "工作温度范围","checkbox": false},"rohs": {"name": "RoHS","description": "RoHS 认证","checkbox": false},"gpn": {"name": "GPN","description": "通用编码,一般编码","checkbox": false},"type": {"name": "Type","description": "类型 细分类型","checkbox": false}},"subcategories": {"IC": {"name": "IC","description": "集成电路","default_location": 0,"default_keywords": "ic 集成电路","parent": "Component","structural": false,"parameter_template": {"operating_voltage": {"name": "Operating Voltage","description": "工作电压","checkbox": false},"operating_current": {"name": "Operating Current","description": "工作电流","checkbox": false},"max_voltage": {"name": "Max Voltage","description": "最大电压","checkbox": false}}},"Resistor": {"name": "Resistor","description": "电阻","default_location": 0,"default_keywords": "resistor 电阻","parent": "Component","structural": false,"parameter_template": {"resistance": {"name": "Resistance","description": "电阻值","checkbox": false},"tolerance": {"name": "Tolerance","description": "容差","checkbox": false},"rated_power": {"name": "Rated Power","description": "额定功率","checkbox": false},"rated_voltage": {"name": "Rated Voltage","description": "额定电压","checkbox": false},"temperature_coefficient": {"name": "Temperature Coefficient","description": "温度系数","checkbox": false}}},"Capacitor": {"name": "Capacitor","description": "电容","default_location": 0,"default_keywords": "capacitor 电容","parent": "Component","structural": false,"parameter_template": {"capacitance": {"name": "Capacitance","description": "电容值","checkbox": false},"tolerance": {"name": "Tolerance","description": "容差","checkbox": false},"rated_voltage": {"name": "Rated Voltage","description": "额定电压","checkbox": false},"temperature_coefficient": {"name": "Temperature Coefficient","description": "温度系数","checkbox": false}}},"Inductor": {"name": "Inductor","description": "电感","default_location": 0,"default_keywords": "inductor 电感","parent": "Component","structural": false,"parameter_template": {"inductance": {"name": "Inductance","description": "电感值","checkbox": false},"tolerance": {"name": "Tolerance","description": "容差","checkbox": false},"self_resonant_frequency": {"name": "Self Resonant Frequency","description": "自谐振频率","checkbox": false},"dc_resistance": {"name": "DC Resistance","description": "直流电阻","checkbox": false},"rated_current": {"name": "Rated Current","description": "热额定电流","checkbox": false},"saturation_current": {"name": "Saturation Current","description": "饱和电流","checkbox": false}}},"Diode": {"name": "Diode","description": "二极管","default_location": 0,"default_keywords": "diode 二极管","parent": "Component","structural": false,"parameter_template": {"forward_voltage": {"name": "Forward Voltage","description": "正向电压","checkbox": false},"reverse_voltage": {"name": "Reverse Voltage","description": "反向电压","checkbox": false},"forward_current": {"name": "Forward Current","description": "正向电流","checkbox": false},"reverse_current": {"name": "Reverse Current","description": "反向电流","checkbox": false},"reverse_recovery_time": {"name": "Reverse Recovery Time","description": "反向恢复时间","checkbox": false}}},"Transistor": {"name": "Transistor","description": "晶体管 三极管 FET 晶闸管","default_location": 0,"default_keywords": "transistor 晶体管","parent": "Component","structural": false,"parameter_template": {"vce": {"name": "Vce/Vds","description": "集电极-发射极电压","checkbox": false},"ic": {"name": "Ic/Id","description": "集电极电流","checkbox": false},"vce_sat": {"name": "Vce_sat/Vds_sat","description": "饱和电压","checkbox": false}}},"Connector": {"name": "Connector","description": "连接器 接插件","default_location": 0,"default_keywords": "connector 连接器","parent": "Component","structural": false,"parameter_template": {"mount_angle": {"name": "Mount Angle","description": "安装角度","checkbox": false,"choices": "90°,180°,Other"},"contact_count": {"name": "Contact Count","description": "接点数量","checkbox": false},"contact_pitch": {"name": "Contact Pitch","description": "接点间距","checkbox": false},"rated_current": {"name": "Rated Current","description": "额定电流","checkbox": false},"rated_voltage": {"name": "Rated Voltage","description": "额定电压","checkbox": false}}},"Switch": {"name": "Switch","description": "开关 按键","default_location": 0,"default_keywords": "switch 开关","parent": "Component","structural": false,"parameter_template": {"mount_angle": {"name": "Mount Angle","description": "安装角度","checkbox": false,"choices": "90°,180°,Other"},"contact_count": {"name": "Contact Count","description": "接点数量","checkbox": false},"contact_pitch": {"name": "Contact Pitch","description": "接点间距","checkbox": false},"rated_current": {"name": "Rated Current","description": "额定电流","checkbox": false},"rated_voltage": {"name": "Rated Voltage","description": "额定电压","checkbox": false}}},"Relay": {"name": "Relay","description": "继电器","default_location": 0,"default_keywords": "relay 继电器","parent": "Component","structural": false,"parameter_template": {"rated_voltage": {"name": "Rated Voltage","description": "额定电压","checkbox": false},"rated_current": {"name": "Rated Current","description": "额定电流","checkbox": false}}},"Fuse": {"name": "Fuse","description": "保险丝 保护器件","default_location": 0,"default_keywords": "fuse 保险丝","parent": "Component","structural": false,"parameter_template": {"rated_current": {"name": "Rated Current","description": "额定电流","checkbox": false},"rated_voltage": {"name": "Rated Voltage","description": "额定电压","checkbox": false},"breaking_capacity": {"name": "Breaking Capacity","description": "熔断容量","checkbox": false},"cold_resistance": {"name": "Cold Resistance","description": "冷电阻","checkbox": false}}},"Transformer": {"name": "Transformer","description": "变压器","default_location": 0,"default_keywords": "transformer 变压器","parent": "Component","structural": false,"parameter_template": {"transform_ratio": {"name": "Transform Ratio","description": "变比","checkbox": false},"rated_power": {"name": "Rated Power","description": "额定功率","checkbox": false}}},"Crystal": {"name": "Crystal","description": "晶振 晶体 陶振 谐振器 振荡器","default_location": 0,"default_keywords": "crystal 晶振","parent": "Component","structural": false,"parameter_template": {"frequency": {"name": "Frequency","description": "频率","checkbox": false},"tolerance": {"name": "Tolerance","description": "容差","checkbox": false},"load_capacity": {"name": "Load Capacity","description": "负载容量","checkbox": false},"temperature_coefficient": {"name": "Temperature Coefficient","description": "温度系数","checkbox": false}}},"Module": {"name": "Module","description": "模块 模组","default_location": 0,"default_keywords": "module 模块","parent": "Component","structural": false,"parameter_template": {"operating_voltage": {"name": "Operating Voltage","description": "工作电压","checkbox": false},"operating_current": {"name": "Operating Current","description": "工作电流","checkbox": false},"max_voltage": {"name": "Max Voltage","description": "最大电压","checkbox": false}}},"Other": {"name": "Other","description": "其它电子元器件","default_location": 0,"default_keywords": "other 其它","parent": "Component","structural": false,"parameter_template": {}}}}
}
大家有什么好的想法和建议欢迎在评论区留言😀
公众号 | FunIO
微信搜一搜 “funio”,发现更多精彩内容。
个人博客 | blog.boringhex.top