1 Introduction to B2-Spice from Beige Bag Software In this tutorial we are going to use a free edition of simulation software call B2 Spice, it's easy to get it. Just go and visit this website (http://www.beigebag.com/adv4_lite.htm) and download B2 Spice A/D V.4 lite. We will start with simple diode example, we are going to construct a rectifier circuit and observe most of the analysis. But first let's take a look on the program in general. Fig (1): program main window Like most programs, it has a menu bar and a toolbar. Also if you look to the left you will find a window called Workspace /Devices, see it in fig (2). Princess Sumaya University for Technology © Loiy K. Idraikh 2 In fig(2) window, there are the basic four categories for the electrical devices existing in the program library , where you can choose any device you want and place it in the workspace. Also components can be arranged according to alphabetical order or manufacturer of the device. Now after taking a look at the program window, we can go and start to build out a circuit in the workspace. Fig (2) : Workspaces / Devices Window Princess Sumaya University for Technology © Loiy K. Idraikh 3 1. Components placement We want to build circuit in fig (3) as an example. Fig (3): example diode circuit. Next Steps: 1. 2. 3. 4. 5. Go to the Workspaces/ Devices window, fig (2). Make sure you are on the Devices Tab. Expand analog folder. Look for Diodes in subfolders (see fig (4) highlights). Now choose "1n4007", by holding left click and drag it to the work space. Because it a diode there are no values to choose from like we will see in resistors. Fig (4): placing a component Princess Sumaya University for Technology © Loiy K. Idraikh 4 6. 7. 8. 9. Similar to the diode go to: Analog / Passive / R. Drag and drop the R in the work space. Double click on the R after dropping. You will get a window like fig (5). Here you can change the reference name of the components, and its value. so let's make R = 3K Ω, for our example. Fig (5): Resistor value sitting window 10. 11. 12. 13. 14. 15. 16. Now we need the power supply and the ground to make the circuit work. Go to Analog / Sources / voltage_source. Drag and drop it in workspace. Then from same place Analog / Sources / Ground. Drag and drop it in workspace. Now arrange the components like fig (6). To rotate a components click on it then press (Ctrl + R). Fig (6): circuit before connecting components. Princess Sumaya University for Technology © Loiy K. Idraikh 5 Now from toolbar choose this tool which allows you to create wires between components. All you need to do now is left click on the components edge then another left click on the second component edge. Press Esc button to release the wire and start a new one. The result will look like fig (7). Fig (7): completed circuit. Now to select a device from toolbar press this to active selecting tool. Then click a device to select it. Setting power supply options When you place a voltage source you need to define a set of parameters that determine the source behavior in the simulation. So when you place the voltage source in the workspace double click on it and you will get a window like that in fig (8). In this window you can choose the type of voltage sources. Each type will ask you to fill special parameters for it, for now we will deal with constant source (DC) and sinusoidal source (transient source). If you use it as DC you only need to fill the voltage value in the space labeled "DC Value ". But for sinusoidal window in fig(8) will look like fig(9). Princess Sumaya University for Technology © Loiy K. Idraikh 6 Fig(8) : voltage source sittings window. Fig(9) : Tranisiant voltage window. Princess Sumaya University for Technology © Loiy K. Idraikh 7 Now by looking in fig(9) you can see there is five values in the white space ( Vo , Va , Freq , Td , Df), now we only care for the first three values which are: Vo = DC Offset voltage let it = 0 volt Va = Peak voltage or amplitude = 5 volt Freq = frequency of the sinusoidal signal = 1k Hz Now press OK to finish. Last step before simulation is to place ammeters and/or voltmeters. As before just go to Analog / Analog Meters / voltmert1 or voltmeter2 . Now the circuit will look like fig(10). Fig(10): Circuit after placing voltmeter, and meter properties window. By double clicking the meter you will get the window in upper right corner, her you choose the title of the voltage reading so later you can recognize each curve for which device. Princess Sumaya University for Technology © Loiy K. Idraikh 8 2. Simulation Go to menubar to Simulation menu /(select )Set Up Simulations, you will get a window like that in fig (11). Fig (11): Simulation main window. By checking the box near the simulation we choose to enable or disable that simulation. For example pick the first box to find DC operating point, also there is DC sweep & Transient analysis. Now see below the window for each type of the analysis in fig (12) to fig (14). Princess Sumaya University for Technology © Loiy K. Idraikh 9 Fig (12) : OP simulation sitting window. Fig (13) : DC Sweep simulation sitting window. Princess Sumaya University for Technology © Loiy K. Idraikh 11 Fig(14) : Transient Sweep simulation sitting window. To run the simulations go to menubar Simulation menu / Run Simulation. Or you can press F5. Princess Sumaya University for Technology © Loiy K. Idraikh 11 Simulation Result for circuit in fig (7) Fig (16): voltages across the diode and R3 in transient simulations. Princess Sumaya University for Technology © Loiy K. Idraikh 12 Fig (17): circuit when running transient simulation. Note: make sure that you place voltmeter on the components that you want to draw the voltage across it. Now as part of the first project you should apply the above steps and hand over the simulation result for the circuit in fig (17). Simulation results graphs: DC Sweep graph. Transient Sweep graph for Vd, Vout & Vin in the same graph. Attention included in the mark Princess Sumaya University for Technology © Loiy K. Idraikh
© Copyright 2024