Setting up

In this tutorial, we will create a simple diode circuit and simulate the DC transfer curve, small signal behaviour and a transient analysis. I will use Microsoft Visual Studio Express 2013 C# for this tutorial.

Create a project

Go ahead and create a new "Windows Form Application" project. We will use the Chart component to display our simulation results. I called my project SpiceNetTest.

Add Spice.NET

Next up is adding Spice.NET to your project. The library is available through NuGet:
  1. Go to Tools > NuGet Package Manager > Package Manager Console
  2. Type the following line into the command-line interface:
PM> Install-Package SpiceNet

Add the diode model

Please remember that by default, Spice.NET only includes ideal components such as voltage/current sources, resistors, inductors and capacitors. Other models are also implemented but not part of the NuGet package. Adding these components is optionally:
  • Bjt - Bipolar Junction Transistors
  • Dio - Diodes
  • BSIM1 - Berkeley SIM 1 Mosfet
  • BSIM2 - Berkeley SIM 2 Mosfet
  • BSIM3 - Berkeley SIM 3.2.4 and 3.3.0 Mosfet
  • Jfet - Junction Fets
We are going to use a Diode in our circuit. So download the extra models from and add the Dio folder to your project (drag the folder to your project).

Set up a chart

Add a Chart component to your form and call it "chartResult". We will use this chart to output our simulation data.
Compile your project and see if you get any errors. Once this works, we're ready for the next step!

You can download them from this website under Downloads.

Last edited Feb 5 at 8:14 AM by SBoulang, version 8