--- tags: 電子學實習/電子電路實習, 南臺科大, 課程 --- [TOC] :::success 資料整理:南臺科技大學電子系 [楊峻泓](https://hackmd.io/@Eli/web)、[陳喬馨](https://hackmd.io/@Q1Wi0OseTxeKAzLXYcRXfQ/) ::: # Lab 5:電路模擬軟體操作 **教學目標**:傳統在介紹電子電路多著重在基本知識理論講解,讓學員瞭解電子電路分析的基本分析技巧,採用個人電腦使用開源電子電路模擬軟體,透過電路模擬軟體進行學理驗証,除了提昇學員的電路實作能力與學習興趣外,也能讓學生在鑽研企業命題時能夠有足夠的工具知識能協助解決問題。 個人電腦使用相關之電子電路模擬軟體, **教學方法**:在電路模擬軟體教學上,著重在以下幾點 - 基本電路繪圖操作 - 偏壓點和直流掃描分析 ( 歐姆定律 ) - 交流掃描分析 - 暫態分析  ## 簡介電路模擬軟體 - 商業用 - Multisim - Tina - Proteus - Cadence/Pspice - Altium Designer - Freeware SPICE / circuit simulator - LTspice - Ngspice - Gnucap - Micro-Cap - [Circuit simulation with Falstad ](http://falstad.com/circuit/) > 【延伸閱讀】[TOP 10 ONLINE CIRCUIT SIMULATORS](https://www.electronics-lab.com/top-ten-online-circuit-simulators/) --- ## 下載安裝LTspice ### 選取[下載](https://www.analog.com/en/design-center/design-tools-and-calculators/ltspice-simulator.html#)版本  ### 安裝完成,桌面有捷徑  --- ## 先來簡單操作LTspice吧! ### 開啟後的模樣  ### 新增設計圖 點選File>>NEW Scheematic,就跑出設計圖  ### 新增零件 可以按F2叫出選擇零件,會跑出下面視窗,搜尋你所需要的零件  或者點選File>>Open >>Examples>>jigs 找尋所需零件 以及點選此圖案也能選擇所零件 :::warning :baby: 小提醒  一起叫出來的零件會黏在畫面上不能移動。 點選再點選零件,即可移動 ::: ### 常用零件名稱 - 電壓元件(voltage)  - 無極性電容(capacitor)  - 極性電容(polcap)  - 電阻(resistor)  - 二極體(diode)  - LED燈(LED)  - 電感(inductor)  - npn電晶體(npn)  - pnp電晶體(pnp)  - 稽納二極體(zener)  ### 基本功能與快速鍵 #### 旋轉零件 - 範例 > R1為原始 >  > L2為ctrl + R 旋轉90度 >  > L3ctrl + E 左右顛倒 >  #### 畫連接線 - F3隨意畫線  - 畫線時按 ctrl 即可畫對⾓線  - 在零件上點選右鍵,即可改變屬性(ex:電阻值、電容值、功率)  ::: info 注意英文字母的大小寫:exclamation:(ex:Kk、Mm) ::: - F4設定輸入輸出名與節點  - 點選Port Type,尋找輸入輸出  - 命名名稱  - 放在在電路上,並且拉線  - 命名節點  - 放在電路  - F5 delete - F6 copy 也可以(Ctrl+c,Ctrl+v) - F7 移動未連接導線的元件 - F8 移動已有導線的組件 - F9 復原  - 滑鼠滾輪縮放電路圖 - 點選file>>save as 另存檔案在專用資料夾,要使用容易尋找 - 將視窗變成左右  - 在工具列點右鍵會跑出長列可以選擇所要的視窗模式 - 也可以點window,會跑出選單  ### 新增輸入訊號源與波形訊號源種類 - DC、AC與PULSE - Tperiod、Tdelay、Ton、Trise與Tfall #### 顯示示波器且設定 - 將所要量測的數值設定好  :::warning 要記得接地:bangbang::bangbang: ::: - 點選simulate>>run  - 會看到Edit Simulation Command視窗  - Stop time輸入停止秒數 - Time to start saving data輸入開始秒數 - 設定完後,點選OK - 再點一次simulate>>run - 如果時間弄錯了怎麼改? - 點黃色框裡面的數字  - 就會跑出這個視窗可以修改了  - 自動跑出示波器,用左右分層較容易看  - 在電阻跟電流源與點上面左鍵點一下可以看到安培及伏特  - 也可以點選 view>>visible Traces  - 會跑出這個視窗,就可以點選想要看的東西  - 量測元件的電壓 將探棒放在A點點擊後,拖移到B點線上,放開就能量測了)  - 查看均值與均方根 ctrl+左鍵點一次,就會出現這個視窗  Interval Start:開始時間 Interval End:截止時間 Average:均值 RMS:均方根 - 更換示波器背景或線條顏色 - Tools>>Color Preferences 會跑出這個視窗  - 點選WaveForm  - 更改顯示數值的顏色:選擇Axis  - 更改虛線的顏色:選擇Inactive Axis  - 更改背景顏色:選擇Background  **可以開始調整你喜愛的顏色了** #### 設定輸入波型 - **直流** - 在電源上點右鍵一下會跑出這個視窗,在DC value那格輸入所要的電壓  - 顯示  - **正弦波** - 在電源上點右鍵一下會跑出這個視窗  - 點選Advanced,會跑出下面這個視窗  - 點選SINE,就可以開始設定了  DC offset[V]:初始電壓 Amplitude[V]:振幅 Freq[Hz]:頻率 Tdelay[s]:延遲時間 Theta[1/s]:度 phi[deg]:電流電壓的相位 Ncycles:正弦波個數 - 設定完成  - 顯示  - **方波** - 點選PULSE,就可以開始設定了  Vinitial[V]:初始電壓 Von[V]:on電壓 Tdelay[V]:延遲時間 Trise[V]:上升時間 Tfall[V]:下降時間 Ton[V]:on持續時間 Tperiod[V]:週期 Ncycles:[V]:方波個數 - 設定完成  - 顯示  - **三角波** - 點選PULSE,就可以開始設定了  Vinitial[V]:初始電壓 Von[V]:on電壓 Tdelay[V]:延遲時間 Trise[V]:上升時間 Tfall[V]:下降時間 Ton[V]:on持續時間 Tperiod[V]:週期 Ncycles:[V]:方波個數 - 設定完成  - 顯示  --- ## 元件參數設定 - 數量級縮寫對照表  --- ## 模擬分析種類  - Transient: 暫態響應分析 (trancient response) - AC Analysis: 頻率響應分析 (frequency response) - DC sweep: - Noise: - DC Transfer: - DC op pnt: 直流操作點分析 (DC bias) --- ## 認識Netlist的組成  :::info R1 B A 8 R2 B C 4 R3 C 0 2 V1 A 0 SINE(0 5 1k) .tran 5m .backanno .end ::: --- ## 結論 實際的電路操作與模擬,例如電阻、電容、雙極性電晶體和MOS電晶體等,都將在後續的實習項目實際操作。 --- ## 補充教材 ### :books: Document/Tutorial - [LTspice IV Getting Started Guide](https://www.analog.com/media/en/simulation-models/spice-models/LTspiceGettingStartedGuide.pdf?modelType=spice-models) - [SIMONBRAMBLE的LTspice Tutorials](http://www.simonbramble.co.uk/lt_spice/ltspice_lt_spice.htm) - [LAURIER的LTspice Tutorial](http://denethor.wlu.ca/ltspice/) - [LTSpice IV](https://ufsj.edu.br/portal-repositorio/File/Apostila%203.pdf) - [LTspice guide](http://eecs.oregonstate.edu/education/docs/tutorials/LTSpiceIntro.pdf) - [LTspice 電路模擬 (林致翰) ](https://chihhanlin.weebly.com/uploads/8/4/4/0/8440048/ltspice.pdf) - [给电路初学者的 LTspice操作入门教程 Step by Step](https://zhuanlan.zhihu.com/p/57983635) ### :wrench: LTspice基本功能 - [LTspice:概述](https://www.youtube.com/watch?v=EALEEquieeI) - [LTspice:電路圖編輯器](https://www.youtube.com/watch?v=pxCoxzj42n4) - [LTspice IV Waveform Viewer](https://www.youtube.com/watch?v=xFLD5wblX7U&list=PL4vooS_8RnzE4EoE27QssuxsccFmspbRP&index=14&t=0s) - [LTspice: Behavioral Voltage Sources](https://www.youtube.com/watch?v=JWm8z5fyhP8&list=PL4vooS_8RnzE4EoE27QssuxsccFmspbRP&index=2&t=0s) - [LTspice:使用變壓器](https://www.youtube.com/watch?v=UE4DDQfUlJk) - [LTspice IV: Evaluating Electrical Quantities](https://www.youtube.com/watch?v=4275wz8bCoU&list=PL4vooS_8RnzE4EoE27QssuxsccFmspbRP&index=10&t=0s) --- ### Example Simulation Circuits - Device characterisitcs - [NMOS](http://www.blog-tm.de/?p=291) - RC circuits - [Simulating an RC Circuit in LTspice](https://www.youtube.com/watch?v=pf_SCpm-7JU) - [Time and Frequency Simulation](https://www.youtube.com/watch?v=EeH3h7NU66o&app=desktop) - [LTspice: AC Analysis](https://www.youtube.com/watch?v=fziUQaVQxA4&list=PL4vooS_8RnzE4EoE27QssuxsccFmspbRP&index=8&t=0s) - [How to Sweep Resistance in LTSpice with Step by Step Tutorials](http://electronicsbeliever.com/how-to-sweep-resistance-in-ltspice-with-step-by-step-tutorials/) - [Using the .STEP Command to Perform Repeated Analysis](https://www.youtube.com/watch?v=YCJ8fczZZoI) - [很詳細的RC模擬分析資料](http://www.ee.ic.ac.uk/hp/staff/dmb/courses/ccts1/01100_Freqresp.pdf) - Amplifier - [Common Emitter Amplifier](https://www.youtube.com/watch?v=hZdoPhdxdiI) - [LTspice IV: Stability of Opamp Circuits](https://www.youtube.com/watch?v=YYWlPFBebfc&list=PL4vooS_8RnzE4EoE27QssuxsccFmspbRP&index=9&t=0s) - [Using LTSpice for Amplifier Noise Measurement](https://www.allaboutcircuits.com/technical-articles/using-ltspice-for-amplifier-noise-measurement/) - [LTspice:雜訊模擬](https://www.youtube.com/watch?v=o13ocPUc27s) - Nyquist - [Understanding Cutoff Frequency in a Nyquist Plot](https://www.allaboutcircuits.com/technical-articles/understanding-cutoff-frequency-nyquist-plot/?fbclid=IwAR1vT5FgnIGgMWiCcaikdH99aVq3JgvJS0585actUp17qKo3dnk9Pi7-r7Y/) - [LTspice for Nyquist Plot Analysis](https://www.allaboutcircuits.com/technical-articles/ltspice-for-nyquist-plot-analysis/) - Power converters - [Buck converter (open-loop)](https://www.youtube.com/watch?v=pGo8XlZ7U4s) - [Buck converter (closed-loop)](https://www.youtube.com/watch?v=VAu52H9gcjs) - [Boost converter](https://www.youtube.com/watch?v=HSwZnX7vW4E) - [Synchronous Step-down Regulator (LTC3612)](https://www.analog.com/en/products/ltc3612.html#product-recommendations) - [How To Measure DC-DC Converter Efficiency](https://www.bilibili.com/video/av8735442/) --- ### 輔助學習軟體 - Octave - Scilab - [Introduction](https://www.slideshare.net/jayshankar12/scilab-49300568) - [Scilab beginners](https://www.scilab.org/sites/default/files/Scilab_beginners_0.pdf) - Matlab - [Frequency Response Plots](https://www.mathworks.com/help/ident/ug/frequency-response-plots.html) ### 補充 - Evaluation boards - [Analog Devices DC2722A](https://www.mouser.tw/ProductDetail/Analog-Devices/DC2722A?qs=sGAEpiMZZMuqBwn8WqcFUj2aNd7i9W7u3Ls%2FlptgXKB6hblYRshCKA%3D%3D)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up