Using CircuitMaker

From Mech
(Difference between revisions)
Jump to: navigation, search
(RC Charging Example)
(RC Charging Example)

Revision as of 18:41, 13 July 2006

Contents

CircuitMaker is a program that can be used to simulate circuits on a computer. The following tutorials explain some of Circuitmaker's basic functions.

Drawing Schematics

For the first part, we will create a simple voltage divider circuit.

Start CircuitMaker. It should open up with a blank canvas. To add components you can either browse through CircuitMaker's catalogue, or search the the part's name, number, or description. The buttons for these tasks are found at the toolbar at the top:

CM add parts.jpg

Click on the button on the left to open up the Device Selection window. The components are organized in a hiearchy:

Major Device Class > Minor Device Class > Device Symbol.

CM part menu.jpg

We now add a voltage source to our circuit: Source > Linear > VSource. Note that you can specify values and hot keys in this window. Checking the return box will cause this part selection window to automatically re-open after you've placed the part on the canvas.

Enter 10V into the Label-Value field and click Place. The window should disappear and your mouse cursor should become the voltage source symbol. To rotate the part, right-click. To cancel the part placement and get your mouse cursor back, press Esc on your keyboard. After you've placed the component, you can right-click it to edit its attributes. (Note that right-clicking on the empty canvas will also bring up a useful context menu.)

Now, we are going to change the voltage source from 10V to 5V. Double-click on the symbol (or right-click > Edit Device Data...) to open up a new menu. In the Label-Value field, change 10V to 5V.

To add a resistor to our circuit, open up the device selection window again, and select Resistors > Resistors > Resistor. Enter 100 for its value.

Add a second resistors, and give it a value of 200 (Ohms).

Our circuit should look like this:

CM disconnected circuit.gif

To connet our circuit, use the wire tool CM wiretool.gif to connect the pins. We also must add a ground (Source > Linear > Ground in device selection window), so CircuitMaker will know what to use as a reference when calculating voltages. Hook up the circuit like this:

CM connected circuit.gif

Simulating the Circuit

First, make sure CircuitMaker is in analog mode CM analog button.gif and not digital mode CM digital mode button.gif. If it is in digital mode, then click the button once to switch it back to analog mode.

Then, go to the Simulation menu and select Analyses Setup. Make sure only Always set defaults for transient and operating point analyses is selected.

Exit the Analyses Setup window, and click the run button CM run button.gif in the toolbar (or press F10). The run button will turn into the stop button with a stop sign icon. (Note that while the simulation is running, you will not be able to access many settings or edit the circuit. Stop the simulation to make the changes.)

A multimeter window should appear. If it doesn't, go to Window > Multimeter to bring out the multimeter.

CM multimeter.jpg

Select the probe tool CM probe tool.gif, click on the multimeter window, and click on one of the wires in the circuit to view the voltage of the wire. If you click on a component's pin, you can view the current flowing into the pin, and if you click on a component, you can view the power dissipated by the component.

Viewing Transient States

You can use CircuitMaker to view the transient state of circuits, and make it plot traces like those you would see on an oscilloscope.

This section will show how to simulate the transient state and create plots like those found in the RC and RL Exponential Responses page.

RC Charging Example

Use the methods above to create the following circuit:

CM RC circuit.gif

Make sure you are running in analog mode, then go to Simulation > Analyses Setup in the menu bar. Uncheck Always set defaults for transient and operating point analyses, and check the Transient/Fourier checkbox. Then click on the Transient/Fourier button itself to open a new menu.

Here, we set how long we want the simulation to run, and what our time step should be. CircuitMaker will acutally vary the time steps to help make the plots converge correctly, and we can specify the maximum allowable time step if we wish. Usually we should just set Step Time and Max. Step equal to each other. For our simulation, set Start Time to 0, Stop Time to 10 ms (which is 5RC), and Step Time/Max. Step to 10 uS. This should give us 1000 data points, which is plenty. Check the UIC (Use Initial Conditions) box. By default, the capacitor is uncharged at its initial state (the voltage across the capacitor is 0).

Warning: If your time step is too small, it will take a long time to simulate. If your time step is too big, you may have problems with accuracy.

Exit the menus and click on the run button. The oscilloscope windo should open. If it doesn't, go to Window > Transient Analysis (Oscilloscope) in the menu bar. Click on the oscilloscope window and select the probe tool. If you click on the wire between the resistor and the capacitor with the probe tool, you should see an RC exponential curve:

CM RC exponential1.jpg

We can also specify an initial state for the capacitor. For example, let us set the capacitor's voltage as 12V at t=0. We can do this by double-clicking on the capacitor and adding the statement IC=12V to the Spice Data field.

CM capacitor IC set.jpg

However, now we have to make sure we know which pin on the capacitor is the positive terminal, and which is the negative.

To do this, right-click on the capacitor and select Edit Pin Data. This menu displays the pin names and their corresponding pin number designations. Check the Show Designations box to disply the pin numbers on the circuit (do not use Show Pin Names, the names may overlap each other and cause confusion).

CM edit pin data.jpg

Now we can identify the pins:

CM pin numbers.gif

Since pin 1 on the capcitor is the positive terminal and is connected to the ground, an initial condition of 12V across the capacitor means that at t=0, pin 2 of the capacitor is actually at -12V at t=0.

Running the simulation and probing it again confirms this.

File:CM capacitor IC.jpg

Personal tools