Electronic Design with Excel (VBA)  Discover BASIC for circuit design and analysis! Hands-on electronic design with Excel and VBA programming.
 Excel Circuit Design Collection | VBA Basics | Back to eCircuit Center

Learn from these VBA examples,
then modify the functions for your own designs.

Welcome to Electronic Design with Excel (VBA)! The two biggest tools I've typically used for electronic design are SPICE and Excel. Although far from perfect, Excel appears to be widely used today. But the real kicker is the BASIC programming in the form of VBA (Visual Basic with Applications) that's built into Excel. This is great news for us circuit heads who need a powerful tool to run a few equations or explore a topic.

WHAT YOU CAN DO

• Create custom VBA functions and algorithms.

• Increase your understanding of electronic circuit design and analysis.

• Explore topics such as basic circuits, waveform generators, ADCs, op amps, the Fourier Series and filters.

TOPICS

 Introduction to VBA calling a simple function. See how each resistor influences the output errors of a resistor divider. Generate a sine wave varying the frequency, amplitude, phase and offset. Generate a triangle wave using IF, THEN, ELSE statements and some simple calculations. Find the gain for the basic op amp amplifiers. Then find how gain effects bandwidth. Learn ADC concepts such as LSBs, resolution and speed using for FOR loops and IF, THEN statements. Create waveforms with Fourier Series. Generate a square wave and a sawtooth from a sum of sine waves.

WHY EXCEL/VBA?

SPICE and Excel / VBA both have a great capability - you can easily tinker, play and experiment with circuits and ideas. Is Excel a perfect tool? If you're like me, you hold your nose at many of its clunky features. BUT, here are its accolades: 1) You can play with some ideas quickly, 2) you can send the file to someone else who probably has Excel too, and 3) you get access to BASIC programming (VBA) which opens up a bigger world of circuits and algorithms to explore. Finally, beware! Excel, like SPICE, can become addictive when exploring a topic.

Let me say right here - I am not a programmer! You will not find elegant or efficient VBA code in these friendly confines. And for the purposes of this website, my lack of VBA prowess is an advantage. The focus will be on basic circuits and other EE concepts made simple. Hopefully, we can dive into some cool EE topics without stubbing our toe on esoteric code. However, if you have a passion for programming, then you might enjoy taking some functions to another level.