一、介绍Linux PCB
Linux PCB是一款专业的印刷电路板(PCB)设计软件,它是Linux平台上的开源软件。该软件通过创建PCB图纸、管理元件、路由器布线等功能完成PCB设计。由于各组成部分基于C++编写, 因此,开发人员可以很容易地修改代码或添加新功能来满足用户的需求。
二、PCB设计基础
PCB设计包括以下主要步骤:原理图设计、PCB布局设计、PCB绘制和PCB制造。在使用Linux PCB时,首先需要完成原理图输入,接下来进行底板设计和周期布局。此阶段,你需要在PCB上布置所有的元器件、引脚和信号线,然后用引脚网络绘制电路图。随后,便是运用内置的自动线路布局工具将电线布好,并进行割线和划分。最后,导出PCB图纸并出色,之后迭代修正。
三、使用Linux PCB设计PCB
下面的示例展示了如何使用Linux PCB设计由两个晶体管和一个LED固定在板上的绿灯闪烁电路板。
1. 原理图设计
/* * 文件名:blink.sch * 说明:闪烁LED电路图 */ EESchema Schematic File Version 5 EEE Library Version 2.5 TimeStamp 4/5/2022 12:53:31 Sheet 1 1/1 Title "LED 灯泡驱动器" Comp Shorthand L Comment1 "声明: 本产品仅供研究者所用" Comment2 "有关正在进行的项目" Comment3 "" Comment4 "" Comment5 "" Comment6 "" Comment7 "" Comment8 "" Comment9 "" SymbolLEDV 2350 2000 R0 SymbolNPNV 5175 1825 R0 SymbolNPNV 5175 2175 R0 Connection ~ 1200 2800 Wire Wire Line 1750 2275 1750 2600 Wire Wire Line 1875 2825 2250 2825 Wire Wire Line 2250 2825 2250 2225 Wire Wire Line 1750 2225 2250 2225 Wire Wire Line 2675 2225 2675 2875 Wire Wire Line 2675 2875 2850 2875 Wire Wire Line 2850 2875 2850 2225 Wire Wire Line 2350 2000 2675 2000 Wire Wire Line 1750 2600 2250 2600 Wire Wire Line 1750 2275 2675 2275 Wire Bus Line 7675 2225 8100 2225 Wire Bus Line 7850 1950 7850 2525 Text Notes 3900 2600 0 40 !.tran 500m Text Notes 3800 2950 0 40 !Vcc=6.0V Text Notes 2625 2200 0 40 !LED Text Notes 2800 2200 0 40 !R2=510 ohm Text Notes 5250 2425 0 40 !R1=4.7k ohm Text Notes 3900 2375 0 40 !C1=10uF Text Notes 4625 2200 0 40 !Q2=PNP型 Text Notes 4625 2275 0 40 !2N2907A Text Notes 4625 2125 0 40 !BC557 Text HLabel 1275 2100 0 60 power
2. PCB布局设计
/* * 文件名:blink.brd * 说明:LED闪烁PCB设计 */ KiCad PCB Board File Version 5 Date 2022年05月13日, 11:31 Comment CircuitBoard Comment1 Created_By_CircuitBoard (Text T0 (layer F.SilkS) (effects (font (size 1 1) (thickness 1))) (at 15.24 20.32 270) (value 10uF)) (Text T4 (layer F.SilkS) (effects (font (size 1 1) (thickness 1))) (at 53.34 55.88 270) (value 100k)) (Text T5 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 105.69 54.61 270) (value 1)) (Text T6 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 105.43 47.24 270) (value 2N3906)) (Text T7 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 27.94 36.83 270) (value 4.7k)) (Text T8 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 22.86 54.61 270) (value 10uF)) (Text T9 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 23.11 47.24 270) (value 2N3904)) (Text T10 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 16.51 47.24 270) (value BC549)) (Text T11 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 26.925 52.4 270) (value 47k)) (Text T12 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 18.24 54.61 270) (value 100uF)) (Text T13 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 23.11 36.83 270) (value 2N3906)) (Text T14 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 21.843 40.834 270) (value 100)) (Text T15 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 22.86 47.24 270) (value 2N3904)) (Text T16 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 36.322 53.34 270) (value "1N4148")) (Text T17 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 143.51 21.34 270) (value "BC557")) (Text T18 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 146.05 54.61 270) (value "BC547B")) (Text T19 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 141.605 10.668 270) (value "2N2907")) (Text T20 (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15))) (at 141.605 17.78 270) (value "2N2905")) (Text Notes 18.54 33.78 0 50 !.title) (Text Notes 127.254 17.78 0 50 !Revision Date: 2021-05-05) (Text Notes 18.54 27.94 0 50 !LED 驱动器) (FPText Net-_C1 (at 19.81 16.51) (layer F.Fab) (effects (font (size 0.8 0.8) (thickness 0.15)))) (fp_text value "10uF" (at 15.24 20.32) (layer F.SilkS) (effects (font (size 1 1) (thickness 1)))) (fp_line (start 13.97 13.97) (end 26.67 13.97) (layer F.SilkS) (width 0.15)) (fp_line (start 26.67 13.97) (end 26.67 27.94) (layer F.SilkS) (width 0.15)) (fp_line (start 26.67 27.94) (end 13.97 27.94) (layer F.SilkS) (width 0.15)) (fp_line (start 13.97 27.94) (end 13.97 13.97) (layer F.SilkS) (width 0.15)) )
3. 绘制PCB
完成PCB布局设计后,需要绘制电路板,该示例代码可以实现LED和晶体管的连接,LED可以正常闪烁。
1) 电路图
/* * 文件名:light.sch * 说明:LED和晶体管连接的电路图 */ EESchema Schematic File Version 2 Libraries:hello EELAYER 24 0 EELAYER END $Descr A4 11693 8268 entire-board $EndDescr Text Label 198 69 0 50 ~ 0 Wire Wire Line 100 125 174 125 Wire Wire Line 174 125 174 143 Wire Wire Line 174 143 100 143 Wire Wire Line 100 143 100 125 Wire Wire Line 174 125 252 125 Wire Wire Line 252 125 252 206 Wire Wire Line 252 206 174 206 Wire Wire Line 174 206 174 125 Connection ~ 174 143 Text Label 35 215 0 50m 6.00V Wire Wire Line 100 206 100 242 Wire Wire Line 100 242 252 242 Wire Wire Line 252 242 252 2699 Wire Wire Line 252 269 174 269 Wire Wire Line 174 269 174 286 Wire Wire Line 174 286 252 286 Wire Wire Line 252 286 252 395 Wire Wire Line 252 395 99 395 Wire Wire Line 99 395 99 206 Wire Wire Line 174 125 174 80 Wire Wire Line 174 80 361 80 Wire Wire Line 361 80 361 327 Wire Wire Line 361 327 405 327 Connection ~ 252 206 Wire Wire Line 252 206 343 206 Wire Wire Line 343 206 343 327 Wire Wire Line 361 327 361 254 Wire Wire Line 361 254 252 254 Wire Wire Line 252 254 252 2050 Wire Wire Line 361 174 479 174 Wire Wire Line 479 174 479 269 Wire Wire Line 479 269 361 269 Wire Wire Line 361 269 361 174 Wire Wire Line 310 60 424 60 Wire Wire Line 424 60 424 242 Wire Wire Line 361 174 450 174 Wire Wire Line 450 174 450 269 Wire Wire Line 450 269 361 269 Wire Wire Line 361 269 361 174 Wire Wire Line 252 206 342 205 Wire Wire Line 342 205 342 60 Wire