Connect with us

Simulating electronics on a PC

Discussion in 'General Electronics Discussion' started by Pexy, Feb 25, 2016.

Scroll to continue with content
  1. Pexy

    Pexy

    142
    3
    Feb 21, 2016
    Helo guys i was wondering about simulation programs that i could test my projects in (virtualy).
    I know about Electronic workbench because we use it in my school, but i was wondering is there something better?
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    11,522
    2,654
    Nov 17, 2011
    It's a matter of definition: What is "better"?
    Lower price?
    Faster simulation?
    Bigger libraries?
    Extra features?
    ...

    I use LTSPICE IV. It is free, it is fast, the libraries are small. But you can easily add your own SPICE models or spice models from other vendors. There's also an active community for LTSPICE.
    In our ressources section you'll find some useful tips for LTSPICE, more and undocumented features you'll find here and here.
     
    davenn and hevans1944 like this.
  3. Pexy

    Pexy

    142
    3
    Feb 21, 2016
    Thanks I will try it out
     
  4. Alec_t

    Alec_t

    2,959
    803
    Jul 7, 2015
    +1 for the LTspice recommendation. For simple circuit sims with visual indications of current etc you might also find this tool handy.
     
    hevans1944 likes this.
  5. signality

    signality

    1
    0
    Jul 23, 2014
    If you want to be able to simulate circuits and then, with minimal redrawing and editing hassle, move on to non-simulation schematic capture, BoM creation and then on to PCB design, (with the option to buy low cost PCBs too!) you might like to try the web-based EasyEDA.

    The simulation tool in EasyEDA is not as powerful as LTspice but if you really need the heavy lifting that LTspice provides, you can easliy import (flat, not hierachical) LTspice schematics straight into EasyEDA and then go into BoM and PCB layout.

    It's free and also allows you to share your work with others.

    There are some simple simulation examples, a Simulation QuickStarter and a more extensive Simulation eBook.
     
  6. BGB

    BGB

    154
    11
    Nov 30, 2014
    I also use LTspice.

    a few drawbacks though:
    does not support editing and simulating at the same time, ex, putting a switch in a circuit and seeing immediately what this switch will do, ...

    it generally lacks much ability to be all that useful for digital electronics nor supports emulated microcontrollers, and maybe simulate things like 3-phase motors (say, to simulate something like a complete motor-driver board or similar). I am not aware of any freely available tools that do this.


    I had a while ago hacked together something with this aim, but thus far have not been all that successful in making it "not suck" on the simulation front (it basically doesn't work). I tried initially to make things work on a grid with cells directly updating themselves in response to adjacent cells, but this doesn't seem to be all that effective of a strategy (it basically is similar in premise to the redstone system in Minecraft, but at a much higher tick frequency and using I/E/R). currently, it has partially disjoint logic for analog and digital signaling.

    have recently resumed work on it (intermittent), and have started some initial work to make the simulation independent of the grid, with it instead using abstracted "wire numbers" instead of grid cells (ex: it would build and simulate things based off of a netlist).

    but, at least the MSP430 emulator works pretty ok...
     
  7. Harald Kapp

    Harald Kapp Moderator Moderator

    11,522
    2,654
    Nov 17, 2011
    No wonder, it's primarily an analog simulator.
     
  8. Harald Kapp

    Harald Kapp Moderator Moderator

    11,522
    2,654
    Nov 17, 2011
    When you change the circuit, you'll have to restart the simulation from the beginning. In any simulator. A change of the circuit will (or at least may) have an impact on the behavior of the circuit in the (simulated) past. It is much easier to restart the simulation than to try to backtrack the simulation in time to find out whether the change in the circuit has any influence on the behavior.
    I think you found that out yourself , at least this is what this statement makes me think so:
    This netlist will change with every change in the circuit so simulation results prior to the change ar einvalid.
     
  9. BGB

    BGB

    154
    11
    Nov 30, 2014
    essentially, when the circuit is edited, the simulation would be essentially aborted and restarted in-place (though likely retaining the current operating state for some components). if things like an o-scope display were keyed to the grid, then they would quietly change over to the new IDs when the netlist is rebuilt. the current grid-based system doesn't notice/care as much if the wiring is changed around as things are running (as it is essentially bottom-up).

    though, sadly, I was dealing with more basic problems, like getting "sane" values, or having the voltage levels on (analog) wires update within a reasonable timeframe (ideally, a wire should fully update within a few ticks, not require hundreds of ticks, which is just absurd).


    with the more recent addition of explicit digital signals, a problem thus far is basically wires getting "stuck" at a particular logic level. another problem is digital wires being connected to analog wires essentially forcibly taking over the analog wires, and the wires not reverting back to analog mode when the connection is broken.

    I am considering trying and adding a counter for the logic level, which tracks the "distance" to a signal's source (such as Digital-Vcc or an I/O pin), which would mostly be to prevent a signal from feeding itself (likewise, an unfed signal should remove itself, and high-powered analog signals should override digital ones). the count would work by being decremented at each step, and by wires not able to be fed by signals with a lower count (with an unfed wire reverting itself).

    also, possible (and was the originally how I considered doing it) would be having a separate node type for analog and digital wires (vs having the wires try to figure out if they are carrying analog or digital signals).

    but, I will work on it, and with luck can hopefully make it work.
     
    Last edited: Mar 3, 2016
  10. Windadct

    Windadct

    25
    1
    May 25, 2011
  11. Pexy

    Pexy

    142
    3
    Feb 21, 2016
    Thanks guys so much for the response
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-