Help creating circuit simulation software

In summary: If you want to give the user feedback on the status of the circuit, you can do things like display the voltages at each node, or the currents flowing through the wires.
  • #1
chuckylefrek
1
0
I am creating a circuit building simulation using multimedia software 'Flash'.

Basically the user is presented with a circuit board onto which they can drag components such as batteries, resistors, bulbs, ammeters, voltmeters, switches, and of course lengths of wire.

I have been reading up on ohms law and kirchhoffs law and whilst I understand the principles, I am not sure how to go about resolving the values for the voltage and current at any point on the circuit.

I think I need to work this out based on the entire circuit that the user has built.

What I would like is to know the order of steps to resolve a circuit. The circuit board will have 5 pegs across and 4 down. So the user basically drops the elements (e.g bulbs) in between the pegs to create their custom circuit.

I have a feeling that some seriously difficult maths and physics may be involved like simultaneous equations and matrixes?

If there are any physics experts out there, the more detail you can give me about solving this, the better!

Many thanks in advance

Paul
 
Physics news on Phys.org
  • #2
In the completely general case, you will have a linear equation in 20 unknowns, the voltage at each of the 20 pegs on the board.

You generate the 20 equations to solve for the 20 unknowns by applying Kirchoff's current law at each peg

You'll have to decide what to do about wires - will they have a truly infinite conductance, or a finite conductance?
 
  • #3
I had a few more thoughts about the best way to tackle this, but it may be an ambitious project.

The first step is to go through and to number or otherwise label all the "nodes" in the circuit. Any two "pegs" connected by wires should be given the same "node" number. You'll probably want to flag any "dangling" nodes with only one connection for special treatment. Unused pegs don't get a node number.

After this, you start generating equations. A battery connected between two different nodes will set the voltage difference between them. A battery with both terminals conneted to the same node is an error. You'll have to think about how you go about flagging this error to the user.

You'll need to set one node in the circuit as the "ground" or reference node, with a potential of zero. You might label one peg on your circuit "ground", you'll have to think about how the ground node is determined. What if the user doesn't connect anything to the ground node, for instance?

A node that does not connect to a battery in any way whatsoever will have its voltage determined by Kirchoff's current law. The current to a neighboring node will be the voltage difference divided by the resistance. Sum and set to zero. Nodes connected to a battery won't generate any Kirchoff's current law eq's because whatever current is needed will come from the battery.

You'll probably want to give voltmeters a finite but large resistance (10 megohms is probably good), in case some joker puts two voltmeters in series with a battery to see what happens.

You'll probably want to give switches a small but finite "on" resistance. What happens if someone shorts out a battery with a switch?

It may or may not be desirable to give ammeters a finite resistance.

You'll need someway to solve all the equations once you generate them (probably a linear matrix package, elimination to tri-diagonal form).
 

Related to Help creating circuit simulation software

What is circuit simulation software?

Circuit simulation software is a computer program that allows users to create, analyze, and test electronic circuits without physically building them. It uses mathematical models to predict the behavior of electrical components and their interactions within a circuit.

Why is circuit simulation software important for scientists?

Circuit simulation software is important for scientists because it allows them to test and refine their circuit designs before physically building them. This saves time and resources, and also allows for more accurate predictions of circuit behavior.

What are the key features of good circuit simulation software?

Some key features of good circuit simulation software include a user-friendly interface, accurate and reliable simulations, a wide range of supported components and circuits, and the ability to analyze and optimize circuit performance.

Can circuit simulation software be used for both analog and digital circuits?

Yes, most circuit simulation software is capable of simulating both analog and digital circuits. However, some software may be specialized for one type of circuit over the other.

Are there any free options for circuit simulation software?

Yes, there are several free options for circuit simulation software, such as LTspice, CircuitLab, and QUCS. However, these may have limitations in terms of circuit complexity or available features compared to paid software.

Similar threads

  • Electrical Engineering
Replies
5
Views
2K
  • Introductory Physics Homework Help
Replies
7
Views
856
  • Electrical Engineering
Replies
2
Views
1K
  • Astronomy and Astrophysics
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Electrical Engineering
Replies
9
Views
2K
  • Introductory Physics Homework Help
Replies
18
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
4K
  • Programming and Computer Science
Replies
2
Views
3K
Replies
3
Views
1K
Back
Top