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

Learn from these 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.

Check back for more topics in the future.

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.