# Simulate with AC circuit - Didn't get any result

Hello forum,

In the process of learning to simulate circuits I’m stuck.

I’m trying to simulate a simple AC circuit with a resistor. I select the resistor from the kicad library and power source used from the kicad pspice lib. When I starting the simulate of circuit, didn’t get any result or data. Also not facing any errors. Everything seems ok. The power source value i set is dc 0 ac(0 230 50) , where ac( 0 ). And the transient time is .tran 1 10, where time step = 1 sec and final time = 10 sec.

Kicad version : 5.0.0

Here is my circuit

Simulation Output

## Circuit: KiCad schematic Background thread stopped with timeout = 0 Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 Initial Transient Solution

Node Voltage

output 0
nc_01 0
nc_02 0
230v_input 0
nc_03 0
nc_04 0
v301#branch 0
Reference value : 0.00000e+000
No. of Data Rows : 59

Any Ideas on how to solve this

Thanks and Regards,
Gunjan

This is wrong. Please see the ngspice manual chapt. 4.1.2 for the correct syntax:

``````dc 0 sin(0 230 50)
``````

The ac flag is only of interest if you do an ac simulation, not a transient simulation.

If you have 50 Hz, then a step time of 1 sec is much too large. The cycle time is 20 ms, so you might use a step time of 5ms.

Hello Holger,
Thanks for replying

I have changed my power and time settings, but still i didn’t get my results.

Which version of kicad manual i need to refer for chapter 4.1.2 and which like Eeschema, cvPcb or else ??

The simulation display is as below

It is the ngspice manual (http://ngspice.sourceforge.net/docs/ngspice-34-manual.pdf).

You might wish to upgrade KiCad to version 5.1.10.

Please post the ngspice netlist here:
Eeschema->Tools->Generate Netlist File…->Spice->Generate Netlist.

1 Like

I don’t know anything about NSpice but I don’t see any ground path for your resistors.

There are two issues to consider.

Simulation setup:
If V(230_input) does shows a zero value, something is wrong with the V301 voltage source setup.

Circuit:
Without any connections to nets 1 - 4, V(output) has to show the same voltage value as the input, namely V(230_input), versus ground, because V301 has a ground connection (hopefully).

A look at the ngspice netlist (this is what Eeschema is sending to ngspice) will typically reveal these issues.

Thank you @holger and @JohnRob for replying.

I’ll check it and try after that

By adding some changes in sch, simulation works properly !!!

1 Like