Simple Circuit
Components & Basic Editing
Before practicing a simple circuit, we will introduce the Components provided in CASPOC. You can see the following figure; there are three subdirectories under the tree view of Components, they’re respectively Circuit, Blocks and Library. Above the components, there is one button “Quick Search” for searching the component you need and the other button “Refresh” for rearranging the display of components. Most time we use the “Refresh” button when we add a new library in the library folder in order to redisplay it correctly in the list.
Components/Circuit: Includes a lot of circuit components. We will practice some of them in this tutorial. You can find the different circuit components from the different categories.
- RLC: Resistor, Inductor, Capacitor, coupling between two inductors, and controlled inductors.
- Sources: Voltage and Current sources, you can easily identify them by the name of V (voltage) or I (current).
- Controlled Sources: Controlled Voltage and Current sources. As well as sources, but use the external signal as a control signal which can be any mathematical operation, voltage or current signal from other circuits.
- Semiconductors: Some necessary basic semiconductors, like Diode, MOSFET, IGBT, Zener, Schottky, Switch and so on.
- Miscaleanouos: There’s only one “Netlist” component used to include all Spice compatible netlist.
- Spice: Spice models, including Resistor, Capacitor, Inductor, Voltage and current sources.
- Translational: Mechanical Translational System, like Mass, Spring, Damping, Force, Speed.
- Rotational: Mechanical Rotational System, like Inertia, Spring, Bearing, Torque, Angular Speed.
- All: All the above components in the Circuit category.
Components/Blocks: Includes a lot block components which help you deal with signals or mathematical operations, like ADD, SUB, MUL, DIV, Integrator, Z transform, Logical, timer, signal generators, Hysteresis, and so on. We will talk about the details in a later tutorial.
Components/Library: Includes all the components which built by Circuits or Blocks, like electrical machines, solar cell, wind turbine, inverters and so on. We’ll talk about the details in a later tutorial.
Before building your own schematic, we shall know how to put the existing component on the workscreen. Unfold the tree view of components. Left-click any component you want (step 1) and RELEASE left-click mouse button. Then move your cursor to the workscreen and you’ll find that the component sticks on your cursor until you left-click the workscreen (step 2). If there is a message “Include Reference Label ‘Ground’ or ‘0’! Automatically Insert? ”, click “Yes” then the component will appear on the workscreen with ground connection or click “No” then there is no ground connection (step 3). The component will appear with the component name and parameter (R1=1000 Ohm) (step 4). If there is a ground connection on this component, then you will find a label “Ground” or “0” on this component (also shown in step 4). In any circuit, one node should be assigned to be the reference ground node, which always has a voltage level of 0 volts.
Then you can try to choose several components and put them on the workscreen as below. You will find every component has their own dots in order to connect to other components. The dots can be round or square according to their properties. In CASPOC, round dots (marked by red circles) stand for the nodes which calculate voltages or currents through components. Square dots (marked by green rectangle) stand for all other input/output values of the blocks. It can be several of signals or simply mathematical operation.
Note: You can NOT connect round dots to square dots. If you do, you will get an error message “Do not place Circuit and Block-Diagram on the same node”. Round dots can be only connected with each other, as well as square dots.
Build a simple circuit
Open a new schematic by click the shortcut button or go to File/Open... on the menu bar (step 1). Then go to Components/Circuit (step 2).
Left-click the component R (located in Components/Circuit/RLC/R) and RELEASE the left-click mouse button. Move your cursor to the workscreen and left-click as below to put the resistor R as below. Choose automatically insert ground connection and then the Resistor will show ‘Ground’ in one node. Do the same steps for the component V (located in Components/Circuit/Sources/V).
Connect the two upper nodes: Left-click one node and draw a line from the node to the other one. Then release the cursor when reach the other node.
As well as the upper two nodes, connect the lower two nodes as below. Then we change the parameter of the Resistor by right-clicking it.
Change the value from 1000 to 1, and then click ok.
Put a scope in the circuit so that we can observe the voltage and current value. Left-click the button and release your mouse button. Then put it in the right of the circuit (step 1) by left-clicking on the workscreen. If you want to zoom the workscreen in order to see the overview, click the shortcut button of zoom fit width or height.
Enlarge the scope window to increase the number of inputs, by clicking and dragging the right-bottom corner of the scope.
Connect the blue dot of SCOPE1 to the node above the resistor R1 so that the blue dot will measure the voltage value of this node (step 1). Right-click the red dot and fill out Trace=Current through: ‘R1’ in a popup window (step 2). Click ok.
Run this scenario by clicking ‘Initializes and starts the simulation’ (step 1). During the simulation, you can put the cursor on the Resistor, then it will show the voltage and current value on this Resistor (step 2). To read the voltage during the simulation, we assign a label in the above node of the resistor.
Right-click the node, then enter a name for this label. Here we type V_out to stand for the output voltage.
V_out will show Vout in CASPOC Label. And re-execute this schematic; you will see there is a voltage value 10 volts under the new label.
Chang the voltage to AC voltage by selecting VAC50HZ (located in Components/Circuit/Sources/VAC50HZ) (step 1). Remember left-click VAC50HZ and release your mouse button. Replace V1 by VAC50HZ (step 2) and change the parameter of VAC50HZ to 40 by right-click it (step 3). Then run the schematic (step 4).
After the execution, look at the SCOPE1 and you will find that the length of the SCOPE1 depends on the value of Tscreen (step 1). To observe longer result, you can change the simulation parameter by clicking the shortcut button of Simulation Parameters (step 2). You can also access this function by going to Simulation/Simulation Parameters in the menu bar.
Then we can set up the value of Tscreen in the popup window “Simulation Parameters” from 15ms to 150ms. Re-run the schematic and you will find that the simulation result in SCOPE1 is shown in longer time.
Now we can start to design a simple half- wave rectifier. Move your cursor on the upper wire and left-click it as below (step 1) and release your mouse button. Then click <DEL> on your keyboard in order to delete this wire.
Click and release the diode in component list by going to Components/Circuit/Semiconductors/D (step 2), and then put the diode in the place where we just deleted the wire (step 3).
Note: To rotate the component in CASPOC, there are two way to do: the first is to right-click your mouse button and then the component will turn 90 degree anticlockwise each time you right-click BEFORE put it somewhere on the workscreen. The other way is to put the component somewhere and right-click it to open a popup property window where you can choose the rotation from 0, 90, 180, 270 degrees.
Connect the diode D1 with the existing nodes in the right and left side (step 1). In order to compare the difference after adding D1, we add one more SCOPE to measure the voltage and current values of D1. Click the SCOPE in the left-down side of CASPOC and release. Then put it in the top of SCOPE1, as SCOPE2. Enlarge the size of SCOPE2 as well as SCOPE1 (step 2).
Connect the node before D1 to the first blue input of SCOPE2 (step 1) as a voltage value input. Right-click the second red input of SCOPE2 then change the parameter of the popup window “Trace”. Enter “Trace=Current through: D1” as a current value input (step 2).
Run the schematic and see if the result is the same as below.
Save this schematic if necessary. And open a new schematic to continue the following the exercise of a bridge rectifier.
Build a bridge rectifier
Left-click the diode and release from the component list (located in Components/Circuit/Semiconductors/D).Do the same steps four times in order to put four diodes on the workscreen as below (step 1). Notice to put the ground connection with D4 (step 2).
Click the AC voltage source and release from Components/Circuit/Sources/VAC50HZ and put it as below. The anode is connected with the node between D1 and D3. The cathode is connected to the node between D2 and D4.
Then we add a LC filter. Choose Resistor, Inductor and Capacitor from Components/Circuit/RLC and put them on the workscreen as below.
Change the parameters of the Resistor, Inductor and Capacitor by using your cursor and right-clicking the three components.
After you right-click them one by one, you will see a popup window of ‘Edit Component’. Here we need to change the values of the Inductor, the Capacitor and the Resistor to 50mH, 1mF and 6 ohm respectively. Then click ok to apply the modification.
Now the circuit is almost finished. But we still need to put several SCOPEs in order to observe the simulation result. Click the SCOPE in left-down corner (step 1) and release. Put them in three places as below.
The function of SCOPE1 is to measure the voltage output of this circuit. We can easily connect to first blue input of SCOPE1 to the node between R1 and C1 (step 2). The function of SCOPE2 and SCOPE3 is to measure the on/off status of the currents which go through these diodes.
Right-click the first blue input of SCOPE2 and then enter the parameter ‘Trace=Current through: D2’ in the popup window (step 3). Similarly, right-click the first blue input of SCOPE3 and then enter the parameter ‘Trace=Current through: D4’ in the pop-up window.
Run this schematic, you will get the following result in the SCOPEs. It seems that SCOPE1 shows the increasing output voltage from the LC filter. And in the beginning, the current goes through D1 and D4. Later it changes to D2 and D3.
We can also following the steps that we already did in the previous tutorial. Change the Tscreen from 15ms to 100ms, then you will find in SCOPE1, the voltage increases and then keep around 200 volts.
Until now, we can only see black and red color on the wire. In order to have more expression for the variation of the current, we can set the current animation range in CASPOC. From SCOPE2 (or SCOPE 3), we can know the maximum current is between 45~50A (step 1). Left-click the shortcut button of animation option or left-click the rainbow bar in the right side of CASPOC (step 2), then we will get a popup window. Originally the max current value is 1A, which means the wire will always keep red when the current value is higher than 1A. Now we change it to 40A (step 3) and set the wire diameter to 3 to have a clearer animation.
Then run the schematic again. You will see a more colorful animation as below to have a better understanding during the simulation.