Skip to content

Application of Modular Thinking in Circuit Design

Designing a project from a system perspective, rather than just drawing a circuit board or devising a scheme.

Background

In software development, we often encounter a variety of complex data and situations. If left unattended, as the development progresses, the code entropy will increase dramatically. Functions and libraries have emerged to address such problems. By encapsulating the code layer by layer, we obtain a well-organized system, taking a global view without concerning ourselves with unnecessary details.

Drawing a parallel to hardware circuit design, the underlying building blocks correspond to discrete components, and the modules that implement specific functions are akin to function encapsulation. At the global level, various modules can be called upon to form a class of circuit solutions. The encapsulation and reusability concept enables us to design circuits systematically, from top to bottom, much like constructing a kingdom.

Note: The term "encapsulation" in the first paragraph is a computer programming term, while in the subsequent text, it refers to a circuitry term.

Component Layer

Component Layer

At the component level, it is essential to standardize the specifications of each element (component) as much as possible. My personal solution is to use component symbols/PCB packages that appear in my circuit designs from a library I've personally compiled.

Some might wonder why we need to do redundant work when most component symbols and packages can be easily found online, and some individuals have already organized over 90% of components into libraries. As the saying goes, the foundation determines the superstructure. For instance, what kind of symbol for a particular chip facilitates wiring, which package for a specific inductor is more readily available, which MOS package allows for effective heat dissipation, and so on. Even the most skilled individuals' standards may not fully suit your needs. Establishing your own standards and building your house on your land is the wisest course of action.

Functional Module Layer

Functional Module Layer

Building upon the foundation of discrete components, we can create various functional modules. The purpose of these modules is to facilitate rapid development. For example, in many projects, I often require voltage regulation circuits. I can select the most efficient solutions, package them as modules based on data sheets, provide function interfaces (input/output ports), and label attributes (regulation current/efficiency, etc.). When needed, I don't need to worry about the internal workings of the functional module. It's like assembling building blocks; I stack them at the top level when designing a project plan.

Altium Designer offers the ability to create snippets. We can encapsulate the functional modules we encounter in our daily work, making them easy to retrieve in the future.

Project Layer

Project Layer

At the project plan level, the modular thinking is quite evident. Through hierarchical schematic design in Altium Designer, we can focus on the interfaces of each module and directly manipulate the interfaces to achieve the overall circuit's functionality. In this design mode, the coupling between modules is not high, allowing for easy replacement of modules that perform a specific function. Multiple channels of functionality can also be achieved through module reuse. Well-structured projects have many benefits for subsequent PCB modular layout and multi-channel wiring reuse, making troubleshooting and updates easier in the future.

References and Acknowledgments

This post is translated using ChatGPT, please feedback if any omissions.