Osion kuvaus

  • Simulation As Tool

    Simulation is a useful practical tool in electronics. Thus simulation is introduced also in our course. In total, mastering any circuit simulator is a large task and that is why here there is no intention to cover but some first steps. Knowing about one simulator usually helps in using others, too.

    The course related simulation exercises are given and submitted here, in order not to mix with the standard home exercises. There are some kind of links in the exercises, however, in some topics.

    Simulation is usually more practical than calculating by hand. In the course studies, it may be often good to use both and compare/verify results when needed. You can do that also yourself if you so choose. The actual simulation exercises included in getting your points for course passing are the ones given below. Number of points to be given is as defined for collecting course points, in the main page of the course.

    SPICE Simulator In KiCad

    One common type of circuit simulation is based on SPICE simulator. This can be available in many ways but one useful and widespread free electronics design package called KiCad contains a spice-based simulator ngspice.

    As KiCad design package is a cross platform and open source electronics design automation suite, it is easily usable for student work. As a package, it also provides tools for printed circuit design etc. which you may find useful in your own projects or other courses. Of course, there may be many alternatives of your own preference in open domain and otherwise.

    You can download KiCad for your use from the download section of the KiCad site. Ngspice site provides a useful tutorial which will help you in setting up of the simulator and first use also under KiCad package. Note that ngspice is contained in a simulator tool under the main package level tool Schematic Layout Editor which opens showing name Eeschema. KiCad site also offers an Eeschema document that has a chapter about the simulator and its use. The chapter has nice explanations with pictures. In the beginning, it also refers to some demo files that should come with your KiCad setup and be then available for you to open and test from where your KiCad program files are stored (but the demo projects are in some subdirectories, so look first for: demos/simulation).

    An internet search with words such as "KiCad simulation video" etc. may provide to you useful links to even some video material to help start simulation.

    Starting With Tutorial

    It is best to start simulation in "Circuits with passive elements" section of tutorial as this is most relevant to first course exercises. Simulation of types dc and ac (so, for direct current and alternating current results) are simple enough to start with, while transient simulation may also be interesting for time dependent solutions later on. Note that our initial basic course mainly deals with dc analysis, with ac to appear in a following course. Please, study the simulation tutorial carefully and possibly also try the simple example cases there. If you happen to have any problems, you are welcome to take contact for help. 

    About Setup Of KiCad

    In a recent setup of KiCad on Windows 10 platform, only KiCad installation was needed for simulation use as the package had everything that was needed - also the simulator. The circuit that was simulated was then prepared by the user according to the tutorial guidelines, starting from a new file first opened from the first menu. Below in Fig. 1 you can see a screen copy of a test circuit open in Eeschema. Language has here been set to English (in Preferences) although there are very many languages supported for menus. Simulator can be found under menu Tools. Note that you can control parameters under Settings in the simulator, in order to choose and use different simulation settings. This is an alternative to the text-based simulation parameter settings (for example, ".ac dec 10 1 100k") in the schematic (this way is instructed in the tutorial).

    Project open in Eeschema

    Figure 1. Project with test circuit, open in Eeschema. Simulator is under Tools.

    Some Notes On Exercises

    First simulation exercise below shows the possibilities in studying and solving a relatively simple circuit which has multiple independent sources. The simulator solves the circuit according to Kirchhoff's circuit laws easily and very fast so that you do not have to do that manually - or you could also use the result to check your own manual solution. Note that the numerical calculation result in the simulator may often include a very small approximation or error compared to accurate analytical solution value, but usually this is very negligible in simple simulation tasks, with practically ideal component calculation models or equations (such as for resistors or sources used in the first exercise). Simulation results are given at some discrete data points and thus you have to define the simulation settings appropriately to reach close to the solution point that you are looking for. This may include some testing with the limit and step values.

    Second simulation exercise is a little more complex in that it includes the use of an operational amplifier. An operational amplifier is very common and useful active device because amplification is in many ways one of the main features needed in electronic circuits. A simulation with an operational amplifier relies on the use of a model of the amplifier (now in a separate file) because such an amplifier is quite a complex device inside itself. Thus the amplifier is in practice never built into the simulation from the actual transistors and resistors etc exactly as inside the amplifier chip. In principle, this could be done, of course, but by using considerably extra resources and effort, while producing only little extra value in terms of result accuracy. Any practical circuit prototype is, anyway, finally tested also in real life after being built, and thus simulation serves only as a significant help in the design. Usually simulation results are very close to real life results - but this is also up to the simulator user (or in this case you!) to guarantee by the gained skills and expertise in simulation work, as well as in circuit analysis and design. Note that real-life component tolerances play some role in the accuracy and comparison to real-life circuits but our course is not getting very deep in this topic.

    Some Extra

    Finally, this is not a part of the course, but if you have an interest and some time to use, internet contains some excellent video material on operational amplifiers as well as many other electronics topics. For example, if you value a very in-depth, with many examples, and time consuming detailed style of presenting lectures, there is (at least currently) something about operational amplifiers if you search for "Razavi Electronics 1, Lec 42, Op Amp Circuits 1".  By that, you can also learn why the amplifier is called "operational". Of course, usually internet material may contain also some details and topics that are not all inside the scope of our course and topics covered.

    • Tehtävä icon
      Simulation Exercise 1 Tehtävä
    • Tehtävä icon
      Simulation Exercise 2 Tehtävä
    • H5P icon
      Some Video Clips For Help In Starting H5P