Audiophiles spend a lot of time and effort worrying about audio specs like Total Harmonic Distortion (THD). Makes sense, because THD affects the quality of audio reproduction. However, THD can also affect interference from radio signals and even losses in power transfer systems. A simplified definition is the THD is the ratio of the sum of the power of all harmonic frequencies to the power of the fundamental frequency.
If a circuit produced a perfect sine wave, there would be no harmonics. There are many ways to measure THD in practice, but [Michael Jackson] has an interesting video showing how he easily visualizes THD using LTSpice. Assuming you already have the system in question in LTSpice (or you could use another simulation tool, if you prefer) it is fairly straightforward.
Continue reading “Using LTSpice to Measure Total Harmonic Distortion”
[Flownez] sent in a tip that a port of the venerable Falstad circuit simulator is now available that doesn’t require Java (it uses HTML 5). This is a welcome port since some modern browsers (particularly Chrome) make it difficult to run Java applets and prevented the Falstad simulator’s execution.
Like the original simulator, this one is great to show a classroom circuits and encourage building or studying circuits in the browser. There’s no extra software to install, which is handy for an impromptu demo. Another cool feature is the visualization of current flow as animated dots. The dots move in the direction of the current flow and the speed of motion is proportional to the amount of current. Watching a capacitor charge with the moving dots is very illustrative. You can also view data in a scope format or hover the mouse over things to read their values.
You can open a blank circuit and add quite a few components (use the right click button on your mouse or the menu to add components and wires). However, you can also pick from a number of predefined circuits ranging from the simple (a voltage divider, for example) to the illustrative (a PLL frequency doubler comes to mind). There’s even an AM radio (see below) that you can tune to find several “stations” by varying the tuning capacitor’s value. Circuit elements include many types of analog and digital components.
Continue reading “A Breadboard In A Browser”
I became aware of harmonics and the sound of different shaped waveforms early in my electronics career (mid 1970’s) as I was an avid fan of [Emerson Lake and Palmer], [Pink Floyd], [Yes], and the list goes on. I knew every note of [Karn Evil 9] and could hear the sweeping filters and the fundamental wave shapes underneath it.
I remember coming to the understanding that a square wave, which is a collection of fundamental and (odd) harmonics frequencies, could then be used to give an indication of frequency response. If the high frequencies were missing the sharp edges of the square wave would round off. The opposite was then true, if the low frequencies were missing the square wave couldn’t “hold” its value and the top plateau would start to sag.
Continue reading “Sine Waves, Squares Waves, and the Occasional FFT”
[Kerry] set out to build a digitally controlled dual supply for his bench. He’s already built a supply based on the LM338 linear regulator, but the goal this time was to build it without a linear regulator IC, and add digital control over both the current and voltage.
In part one of the build, [Kerry] explains the analog design of the device. He had an extra heatsink kicking around, which can dissipate enough heat from this linear supply to let it run at 10 A. A NE5532 opamp is used to track a reference voltage, which can be provided by a DAC. The current is measured by a LT6105 shunt sense amplifier, then compared to a reference provided by another DAC.
Part two focuses on the digital components. To interface with the analog circuitry, two MCP4821 DACs are used. These are controlled over SPI by an ATmega328P.
Fortunately, [Kerry] also has his own DC load project to test the supply with.
This constant resistance dummy load has not yet been tested in the real world. [YS] was inspired to come up with the circuit after reading Wednesday’s Re:load dummy load post. That was a constant current load, not a constant resistance load. [YS] started with the schematic for the Re:load and made his changes to arrive at this.
For him the exercise was just to alter the design to achieve constant resistance. He didn’t actually build and test the hardware because he doesn’t really have a need for it. This image was exported from Proteus, which includes a ProSPICE circuit emulator. His slides run through test voltages from 5V to 50V, maintaining a constant 10 Ohm resistance.
When studying this project we needed a little refresher on the different varieties of dummy loads. We found this post very informative about the differences and uses of Constant Current, Constant Power, and Constant Resistance (Impedance) loads.
Disclosure: I currently work at Upverter
We’ve featured Upverter here in the past. At that time, the EDA tool was capable of collaborative schematic capture. Today, Upverter is launching version 2.0 of their tool which includes many new features allowing for end-to-end electronics design.
Upverter now has a PCB editor, allowing you to manufacture your designs. They are working with PCB manufacturers to make it easy to choose a fab and submit design files. Other new features include a Spice based simulation engine allowing in-browser simulation, and product lifecycle management features to help manage your project’s bill of materials.
When we last looked at Upverter, it was just a tool for creating and sharing schematics. With today’s launch, the tool can be used for designing electronics from start to finish. Since Upverter is free for open source projects, it will be interesting to see how hackers use it.
You can check out a tour of the new features. Any thoughts on using a cloud based EDA tool? Let us know in the comments.
[Henrik] has been working on a program to design electronic circuits using evolutionary algorithms. It’s still very much a work in progress, but he’s gotten to the point of generating a decent BJT inverter after 78 generations (9 minutes of compute time), as shown in the .gif above.
To evolve these circuits, [Henrik] told a SPICE simulation to generate an inverter with a 5V power supply, 2N3904 and 2N3906 transistors, and whatever resistors were needed. The first dozen or so generations didn’t actually do anything, but after 2000 generations the algorithm produced a circuit nearly identical to the description of a CMOS inverter you’d find in a circuit textbook.
Using evolution to guide electronic design is nothing new; an evolutionary algorithm and a a few bits of Verilog can turn an FPGA into a chip that can tell the difference between a 1kHz and 10kHz tone with extremely minimal hardware requirements. There’s also some very, very strange stuff that happened in this experiment; the evolutionary algorithm utilized things that are impossible for a human to program and relies on magnetic flux and quantum weirdness inside the FPGA.
[Henrik] says his algorithm didn’t test for how much current goes through the transistors, so implementing this circuit outside of a simulation will destroy the transistors and emit a puff of blue smoke. If you’d like design your own circuits using evolution, [Henrik] put all the code in a git for your perusal. It’s damn cool as it stands now, and once [Henrik] includes checking current and voltage in each component his project may actually be useful.