Back to index

A-SIM for the HP-42S

By Ton van de Burgt

Analog circuit simulator - Simulates circuits with: resistors, capacitors, coils, op-amps, and voltage sources.


Input:

An N*4 matrix called: "CIR" with the circuit description. Each line in the matrix contains one component.

Column 1 in the matrix indicates the type of component (1 to 5), column 2, 3, 4 indicates the value and / or the node numbers of the component.

Resistor: 1, value, node1, node2
Coil: 2, value, node1, node2
Capacitor: 3, value, node1, node2
Op-amp:  4, node-output, node-input+, node-input-
Voltage source: 5, value, output+, output-

The order of the components in the input matrix is: resistors, coils, capacitors, op-amps, voltage sources.

The Output- of all the op-amps are connected to node 0.


Usage:

After starting A-sim the following menu appears:

Fill in all the values that are necessary, and press R/S.
The result is an Nx1 matrix.

On row 1 the voltage of node 1 is displayed, on row 2 the voltage of node 2 is displayed, and so on.
If there are coils and / or capacitors in the circuit, the result is a complex matrix.

If there are extra voltage sources in the circuit, then for each voltage source an extra row in the output is added which contain unusable data.


Known bugs / limitations:

It is not allowed for an op-amp output to be the highest node number in the circuit.


Example 1:



Input matrix ("CIR"):

1

100

1

2

1

200

2

0

1

300

3

4

1

400

4

0

1

500

3

5

1

600

5

0

1

700

6

7

1

800

7

0

1

900

6

8

1

1000

8

9

4

3

2

4

4

6

5

7

5

20

9

0


U_IN: 10V,

W: 0

Gain: 1000000


Result matrix:

10

6.6667

11.6666

6.6667

6.3636

11.9318

6.3636

15.7536

20

0.0045

Node 1: 10V

Node 2: 6.6667 V

And so on.


Example 2:

 

Input matrix ("CIR"):

1

1000

1

2

3

1E-9

2

0


U_IN: 10V,

W: 628318.5307 (100000 kHz * 2 * Pi)

Gain: 0


Result matrix:

10.00 i 0.00

7.1696 i –4.5048

Node 1: 10V

Node 2: 7.1696 i –4.5048V

Revision history:
9th of November 2004 - Replaced line 68 RCLx "J" with  68 -1, 69 SQRT, 70 x

Binary files for emulators:
Raw binary: asim.raw  Binary for HP-42X: asim.42x (HP-48) asim49.42x (HP-49)
























Generated by 42s2html - 09 November 2004, 21:19