Circuit Impedance Calculations Without Cumbersome Simulations

Using circuit simulating software like SPICE can be a powerful tool for modeling the behavior of a circuit in the real world. On the other hand, it’s not always necessary to have all of the features of SPICE available all the time, and these programs tend to be quite expensive as well. To that end, [Wes Hileman] noticed an opportunity for a specific, quick method for performing impedance calculations using python without bulky, expensive software and came up with a program which he calls fastZ.

The software works on any network of passive components (resistors, capacitors, and inductors) and the user can specify parallel and series connections using special operators. Not only can the program calculate the combined impedance but it can perform frequency analysis at a specified frequency or graph the frequency response over a wide range of frequencies. It’s also running in python which makes it as simple as importing any other python package, and is also easy to implement in any other python program compared to building a simulation and hoping for the best.

If you find yourself regularly drawing Bode plots or trying to cobble together a circuit simulation to work with your python code, this sort of solution is a great way to save a lot of headache. It is possible to get the a piece of software like SPICE to to work together with other python programs though, often with some pretty interesting results.

Circuit VR: Squaring With Schmitt Triggers

In the fantasy world of schematic diagrams, wires have no resistance and square waves have infinitely sharp rise times. The real world, of course, is much crueler. There are many things you can use to help tame the wild analog world into the digital realm. Switches need debouncing, signals need limiting, and you might even need a filter. One of the basic elements you might use is a Schmitt trigger. In

In this installment of Circuit VR, I’m looking inside practical circuits by building Schmitt triggers in the Falstad circuit simulator. You can click the links and get to a live simulation of the circuit so you can do your own experiments and virtual measurements.

Why Schmitt Triggers?

You usually use a Schmitt trigger to convert a noisy signal into a clean square digital logic level. Any sort of logic gate has a threshold. For a 5V part, the threshold might be that anything under 2.5V is a zero and at 2.5V or above, the signal counts as a one. Some logic families define other thresholds and may have areas where the signal is undefined, possibly causing unpredictable outputs.

There are myriad problems with the threshold, of course. Two parts might not have exactly the same threshold. The threshold might vary a bit for temperature or other factors. For parts with no forbidden zone, what happens if the voltage is right at the edge of the threshold?

Continue reading “Circuit VR: Squaring With Schmitt Triggers”

Make Some Noise Or Simulate It, At Least

Noise is a fact of life, especially in electronic circuits. But on our paper schematics and just as often our simulations, there is no noise. If you are blinking an LED on a breadboard, you probably don’t care. But if you are working on something meatier, handling electrical noise gracefully is important and simulation can help you. [Ignacio de Mendizábal] has a great piece on simulating EMC filters using LTSpice that can get you started.

There are many ways of classifying noise and [Ignacio] starts with common-mode versus differential noise, where common-mode is noise with current flowing in the same direction without regard to the circuit’s normal operation, and differential noise having currents that flow in the opposite direction of normal current flow.

Continue reading “Make Some Noise Or Simulate It, At Least”

TI And Cadence Make PSpice Free

We like simulation software. Texas Instruments long offered TINA, but recently they’ve joined with Cadence to make OrCAD PSpice available for free with some restrictions. You’ve probably heard of PSpice — it’s widely used in academia and industry, but is usually quite costly. You can see a promotional overview video below.

The program requires registration and an approval step to get a license key. The downloaded program has TI models along with other standard models. There seem to be few limits as long as you stick to the supplied library. According to the datasheet, there are no size or simulation complexity limitations in that case. If you want to use other models, you can, but that’s where the limitations hit you:

There is no limitation of how many 3rd party models can be imported into the design. However, if 3rd party models are imported, a user will be able to plot a maximum of 3 signals at a time of their choice when any 3rd party model is imported from web.

We aren’t completely sure what “from web” means there, but presumably they just mean from other sources. In any event, you still get AC, DC, and transient analysis with plenty of options like worst-case timing analysis. Mixed signal designs are supported and there is a wealth of data plotting options, as you would expect.

This is a great opportunity to drive some serious software that is widely used in the industry. The only thing that bummed us out? It runs under Windows. We couldn’t get it to work under Wine, but a Windows 10 VM handled it fine, although we really hate running a VM if we don’t have to.

Still, the price is right and it is a great piece of software. We also liked the recent Micro-Cap 12 release, but we don’t expect any updates for that. Of course, LTSpice is quite capable, too.

Continue reading “TI And Cadence Make PSpice Free”

Vintage Instrument Gets Modern Replacement For Unobtainium Parts

One of the best parts about Hackaday is how much you learn from the projects that people tackle, especially when they are repairs on old gear with unknown failure modes and potentially multiple problems. By the same token, the worst part about Hackaday is seeing what other people are capable of and knowing that you’ve got a long way to go to catch up to them.

A case in point is [Curious Marc]’s recent repair of an old pulse generator. The instrument in question is an H-P 8082A, a device from a time when H-P was a place where “good engineers managed by even better engineers [wanted] to help other engineers,” as [Marc] so eloquently puts it. The instrument was capable of 250 MHz output with complete control over the amplitude, frequency, duty cycle, and rising and falling edge geometry of the pulses, in addition to being able to output double pulses. For an all-analog instrument made in 1974, it was in decent shape, and it still powered up and produced at least the square wave output. But [Marc]’s exploration revealed a few problems, which are detailed and partially addressed in the first video below.

In part two [Marc] goes after the problem behind the pulse delay function. He traced it to a bad IC, which was bad news since it was a custom H-P part using emitter-coupled logic (ECL) to achieve the needed performance that can no longer be sourced. So naturally, [Marc] decided to replace the chip with a custom circuit. The design and simulation of the circuit are detailed in part two, while the non-trivial details of designing a PCB to handle the high-speed signals take up most of part three. We found the details on getting the trace impedance just right fascinating.

In the end, [Marc]’s pulse generator was salvaged. It’ll go into service helping him probe the mysteries of vintage electronics from the Apollo era, so we’re looking forward to seeing more about this great old instrument.

Continue reading “Vintage Instrument Gets Modern Replacement For Unobtainium Parts”

What Rhymes With Spice And Simulates Huge Circuits?

Most of us have computers on our desk that would have been considered supercomputers not long ago. We always wonder how many of them get any actual workout other than decoding video. If you want to simulate circuits you may very well start chewing up significant CPU time, so you might consider Xyce, an open source high-performance analog circuit simulator from Sandia National Labs. As you’d expect from a giant government lab it is able to support large scale parallel computing, but will also work on common desktop systems. On Linux, it will do what they call “small-scale parallelism.” In addition, it can deal with simulations of things as diverse as neural networks and power grids.

The code is open source, but oddly you do have to register to download it. Xyce has been around for a bit, but version 7.0 just arrived in April. Many of the changes are to improve compatibility with other Spice programs, notably HSpice.

Continue reading “What Rhymes With Spice And Simulates Huge Circuits?”

Solid State Relay Simulation, Explained

[SaltyPuglord] needed a solid state relay for a project. We’d have just bought one, but he decided to design his own in LTSpice. Along the way he made the video below, which is pretty informative and a good example of a non-trivial design in LTSpice.

MOSFETs have made designs like this a lot easier, to the extent that it should be as easy as putting a pair of beefy fets in-line with the AC source and load. However, that has a few ramifications that [Salty] covers in the video.

The biggest concern comes in isolating the DC supply from ground. He used a transformer which is tricky to simulate in LTSpice. Beyond that the design of the power supply is quite simple, and as he mentions in the video, you don’t really need this complex of a regulator just to feed the gates of the MOSFETs.

Continue reading “Solid State Relay Simulation, Explained”