|
How's this for speed? It's almost fast enough to track with the unknown input voltage real time! Adjust the unknown voltage and watch the numbers keep up in real time. Super fast voltmeter - ADC.
This circuit's purpose was to explore some ideas of mine to improve simulation speed and experience. (By the way, if you'd like info on how the digital volt meter works, it is based on this circuit: https://everycircuit.com/circuit/5229632454131712). Some ideas worked out; others didn't. Here are my observations:
1) Use glitch clocks
This idea almost always helps. My favorites are the battery of pulse sources and the counter hack. This circuit is a good reference: https://everycircuit.com/circuit/5694986422321152
2) Set simulation speed to the ~50us area
I'm not totally sure, but this particular range seems to create the best performance.
3) Use the least number of nodes as possible
Of course, in complex circuits, this is unavoidable. But if you can simplify your circuit to have fewer nodes, it will help a lot. For instance, removing 7-segment displays and decoders can sometimes really speed things up because they are composed of lots of nodes.
4) Try to create simple node voltage equations
In a discussion here https://everycircuit.com/circuit/6109219316826112, I learned that EC logic gates and flip-flops have a complex model. Consider trying transistors or diodes instead. The idea is to help the circuit engine solve the matrix of equations faster if they are smaller or simpler.
5) Simplify settings within a component
This really is a continuation of the previous idea. Adjust component values to make its model simpler. A good example of this is to set MOSFET lambda parameters to 0. When I tried that in this specific case, it helped the speed and reliability a lot more than I expected!
One last thing to remember is when "glitching out" the simulator like this to enhance speed, sometimes it will behave strangely and not give correct results. Also, these circuits aren't really good to try and actually make in a practical sense. Keep this in mind when you push EC to the limit! I hope someone benefits from this.
Good luck!
|