I am trying to simulate a monostable multivibrator in GnuCap. I have the following simple netlist (with arbitrary, probably non-functional component values but that's not the issue):

C1 ( 1 2 )  100.u
Q1 ( 1 4 0 )  BC548 NA( 1.)
Q2 ( 3 2 0 )  BC548 NA( 1.)
R1 ( +9v 1 )  1.K
R2 ( +9v 2 )  1.K
R3 ( +9v 3 )  1.K
R4 ( 4 3 )  1.K
.model BC548 npn ( <snip> )

I'm setting the model of the transistor with build followed by .model BC548 NPN which seems to work nicely.

The thing I don't understand is how to configure the value of the +9V source? When I run the simulation the voltage seems to be (essentially) zero:

gnucap> tran 0 0.01 0.001                                                                               
#Time       v(+9v)     v(1)       v(2)       v(3)       v(4)      
 0.         19.517u    19.517u    19.517u    19.517u    19.517u   
 0.001     -10.f       14.f      -34.f      -10.f      -10.f      
 0.002     -10.f       14.f      -34.f      -10.f      -10.f      
 0.003     -10.f       13.f      -34.f      -10.f      -10.f      
 0.004     -10.f       13.f      -33.f      -10.f      -10.f      
 0.005     -10.f       13.f      -33.f      -10.f      -10.f      
 0.006     -10.f       13.f      -33.f      -10.f      -10.f      
 0.007     -10.f       13.f      -33.f      -10.f      -10.f      
 0.008     -10.f       13.f      -33.f      -10.f      -10.f      
 0.009     -10.f       13.f      -33.f      -10.f      -10.f      
 0.01      -10.f       13.f      -32.f      -10.f      -10.f  

I've had a read of the documentation but it seems aimed at more experienced engineers with familiarity with electronic simulation. I'm trying to refresh the basic electronics I learned at University, and this is my first time with electronic simulation.

If someone could please let me know what the step is I'm missing, I'd greatly appreciate it.


1 Answer 1


You don't have any excitation in that circuit, do you? With no excitation, all node voltages will be zero.

I'm not familiar with Gnucap, but is the "+9v" a special node? If not, you need to add an explicit voltage source (with a value of 9 V) between your "+9v" node and your ground. Add something like this

Vsupply +9v 0 9

  • \$\begingroup\$ That did the trick - build followed by Vsupply +9v 0 9. Now to go and read the documentation so I understand why :-) \$\endgroup\$ Apr 24, 2012 at 12:01
  • \$\begingroup\$ @DuncanBayne You can go directly to page 93, section 3.22 of this pdf gnu.org/software/gnucap/gnucap-man.pdf \$\endgroup\$
    – Telaclavo
    Apr 24, 2012 at 12:04
  • \$\begingroup\$ @DuncanBayne the 'why' is because the circuit doesn't know what your +9v symbol means: it's just another name for the net. You have to create the voltage inserting a voltage source. \$\endgroup\$
    – clabacchio
    Apr 24, 2012 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.