Circuit Design Patterns? - Page 1
Forum section: electronics / beginners

author: LoFi
author_rank: Contributor
timestamp: January 11, 2018, 06:30:24 pm
content: I'm a new eevblog member (have lurked for awhile). I'm a hobbyist, have dabbled in electronics off and on for many years, and am now getting more serious about it and want to understand it better. I spent over 30 years in the computer industry as a software developer, tech consultant, etc. My recent foray into electronics began when I started playing with Arduino and designing simple circuits for my own amusement. That piqued my interest in more fundamental circuits... I've been reading and experimenting with some fundamental circuits (voltage dividers, oscillators, etc) and have gotten a small assortment of supplies and tools (decent multimeters, a power supply, a Siglent scope). At some point I'd like to design and build some new guitar effects (i.e. stompboxes) and perhaps some modules for modular synthesizers.I like learning by example... using example circuits and trying to understand them and what makes them work. The best books I've found so far are two that are frequently recommended here:- The Art of Electronics- Practical Electronics for InventorsWhat I haven't yet found are any electronics books that are similar to ones that have caught on in the software world... centered around commonly found and useful Design Patterns. Something that in the EE world might be called 'Circuit Patterns'. In the software world, design patterns are used to document and provide examples of software patterns that crop up repeatedly as part of more complex designs: things like Singletons, Factories, Facades, Proxies, Iterators, etc. It provides a very useful catalog of commonly needed functions, and provides a widely understood way discuss elements of software design. It also can provide a jump-start for new programmers who need to learn about essential software design patterns.Is there anything like a 'Circuit Patterns' book in the EE world? Circuit 'patterns' certainly exist. The two books I listed above are full of them, spread throughout a great deal of theoretical text. What I'm looking for would be more succinct, more like a catalog of examples with accompanying brief description and operational explanations.Circuit patterns would include common sub-circuits like Voltage Dividers, RC circuit patterns, RL circuit patterns, Oscillator patterns, etc. Such a book would provide a relatively succinct reference, a catalog of essential widely-used circuit designs. It would include example circuits (grouped by category), explain their function and the needs they satisfy, describe their use and applicability, show schematics, and contain explanations about how the circuits work... what makes them tick.I'd love to use a circuit patterns book as aid to getting a more intuitive feel for electronics. Any suggestions for books I may have missed? Anyone want to tackle writing such a thing? Next week would be great.

author: Mukrakiish
author_rank: Contributor
timestamp: January 11, 2018, 07:11:52 pm
content: That's actually a good point, being a budding electronic hobbyist as well...that would be pretty interesting. Essentially common "building blocks" used in circuits (few come to mind that I know from concepts albeit elementary like zener traps, opamp buffers, rectifier circuits, etc)I've seen some from many years ago as TTL or CMOS "Cookbooks" but nothing more than that really.I'm adding a reply so I can see what the seasoned veterans have to say.

author: james_s
author_rank: Super Contributor
timestamp: January 11, 2018, 07:34:19 pm
content: There are lots of books out there that have examples of oscillators, amplifiers, voltage regulators, etc, and even more examples on the net. Maybe I'm missing some aspect of what you're looking for?

author: Mukrakiish
author_rank: Contributor
timestamp: January 11, 2018, 07:46:02 pm
content: James_sI think it's in that OP (and myself and probably others) simply don't know how to look for that particular kind of book. Could you list a couple titles or perhaps a common naming convention to find those kinds of books outside of AoE and the like?

author: james_s
author_rank: Super Contributor
timestamp: January 11, 2018, 09:11:01 pm
content: Growing up I had a few of the Forrest Mims books, they were generally good. There was another I remember, the name escapes me, some kind of encyclopedia of electronic design? I think there were 2 or 3 volumes. There are a couple of classic Jim Williams books, though they tend to be a bit heavy on the technical/theory side, also various electronics textbooks you can find in used book stores.Usually when I need a circuit I just look online though, let's say for example that I want to build a crystal oscillator, I can put "crystal oscillator circuits" into a search engine and come up with something like this.http://www.electronics-tutorials.ws/oscillator/crystal.htmlMaybe I want a single transistor audio amplifier?http://www.instructables.com/id/Simple-Audio-Amplifier-Using-Single-Transistor/These are just examples, I'm not trying to be that "let me google it for you" smartass but it really does work for a great many basic building blocks.

author: LoFi
author_rank: Contributor
timestamp: January 11, 2018, 09:14:40 pm
content: Quote from: james_s on January 11, 2018, 07:34:19 pmYes, the two books that I listed as favorites (Art of Electronics, and Practical Electronics for Inventors) both have examples of such circuits. And they're really excellent books, and I'm working my way through both of them. But they seem primarily organized around teaching the theory of electronics, illustrated with example circuits. And such books are indispensable.But I think I'd also find another kind of book very helpful. One that is organized more around examples of commonly-used circuit patterns (actually sub-circuits). Not necessarily complete finished circuits, but the commonly-used building-block circuits, organized by function. Each example building block circuit would contain succinct explanations about why it's needed, it's application and limitations, and how it works. Start with the simplest examples that provide a particular function, and then add some more complex (but still commonly-used) variations or examples. To be used as a reference and catalog and as a learning tool for us less-experienced folks who aren't yet familiar enough with electronics to recognize the common building-block sub-circuits when they show up in a schematic.BTW, I'm talking primarily about the fundamental building block circuits that are made up of discrete components. Not op-amps (at least not in Volume 1). Analog circuit building blocks. Volume 2 could add common op-amp circuit patterns. Volume 3, digital circuit patterns.I hope this clarifies the kind of thing I'm looking for. Maybe such a book would be impossible to write and make clear without 'jumping ahead' too much. Electronics is so complex, broad, and deep that perhaps such a thing is impractical... but I hope not. I'd like something that taught via examples, with adequate explanations (perhaps intuitive) about what's going on. Perhaps there are books or online materials that are already organized this way, but I haven't yet found them.

author: LoFi
author_rank: Contributor
timestamp: January 11, 2018, 09:24:37 pm
content: Quote from: james_s on January 11, 2018, 09:11:01 pmYes, me too. But I'm not just looking for specific examples, but a compendium that shows widely-used essential circuit building blocks and descriptions of why they're important and how they work; many of which I may not yet have heard about.(I have a few examples of the old Forrest Mims stuff. They're great... I just wish they weren't hand-printed on graph paper.)

author: paulca
author_rank: Super Contributor
timestamp: January 11, 2018, 09:33:28 pm
content: I think it's more about knowing what to use, rather than how example circuits and circuit components are built and work.I am picking up a few things slowly. Things like if you have a sensitive voltage and want to "divide" a circuit and stop the next bits interacting with that voltage and altering it you might use a unity/buffer op amp to keep the impedance from interacting. Then there are the obvious voltage divider, RC circuit and so on.Just like when learning software design you find yourself over compartmentalising and not realising that parts of a circuit actually 'cancel out' and together have no effect or are superfluous and can be completely removed. I've seen that dozens of times in junior software code too. I know I do it in electronics. Like buffering a voltage before feeding it to a differential amp and being told things like I can effectively remove that buffer and tweak the resistors a little and it will work. How are you meant to learn that? Circuit analysis. In software we would use things like sequence diagrams, uml/erd/class diagrams, flow charts even. The interactions and commonality that can be taken advantage of come out and a small reorganisation will simplify things as things cancel out or get shared.I gather it will just take time, experience, patience and practice. Borrowing from the bag of luck to fill the bag of experience and all that.By the way, my software engineering head keeps thinking dumb things in electronics. Like I have a 10:1 voltage divider somewhere and I think, "Can I not just pass this voltage through that too?" and stop myself with "DOH!", "It's not a ____ing function!"A quick software example. There are tutorials on sorting and tutorials on finding only unique values. However one performant way to find unique values is to sort the items first the duplicates will then be adjacent. Thus the coupling of two basic concepts yields a much better design. I see things in electronics schematics that I just can't work out and when I see similar circuits explained by the likes of Dave I find it's because they have done something similar to the Sort then Unique pattern and combined two circuits and taken advantage of how they interact.

author: LoFi
author_rank: Contributor
timestamp: January 11, 2018, 09:43:53 pm
content: Quote from: paulca on January 11, 2018, 09:33:28 pmYeah, I'm often guilty of visualizing circuits as operating in step-by-step functional software terms, when they often operate more like everything-is-happening-everywhere-at-once.Or nearly so...

author: paulca
author_rank: Super Contributor
timestamp: January 11, 2018, 09:45:35 pm
content: Quote from: LoFi on January 11, 2018, 09:43:53 pmYep. That's why I keep wanting to put buffer amps between everything. "Isolation of concern"

author: james_s
author_rank: Super Contributor
timestamp: January 11, 2018, 09:52:49 pm
content: It sounds like you may be trying to skip ahead here. If you take the time to understand the theory then you will know what kinds of circuits are available for specific needs. There is no real shortcut here, it's important to know what you're doing and why. I'm not sure a book exactly like what you describe exists because that is not how the process typically works. Circuits are not software, they do not behave like software and they are not designed like software. Do whatever you have to do for this mindset to sink in.

author: paulca
author_rank: Super Contributor
timestamp: January 11, 2018, 09:55:36 pm
content: Quote from: james_s on January 11, 2018, 09:52:49 pmYes sir.

author: rfeecs
author_rank: Frequent Contributor
timestamp: January 11, 2018, 10:02:11 pm
content: Look at a book on circuit design. For example "Analysis and Design of Analog Integrated Circuits" by Gray and Meyer et al:https://www.amazon.com/dp/0470245999/ref=rdr_ext_tmbThe table of contents, starting at Chapter 3 goes through all the basic circuits used in analog ICs:QuoteTwo issues come to mind:1. It's difficult to apply a basic circuit without a lot of background on the operation of the circuit. For example, applying Op-Amps requires some knowledge of feedback and stability.2. Most people don't actually design circuits down to the transistor level. More often, they use ICs: voltage regulators, op-amps and other amplifiers, PLLs, VCOs, DACs, ADCs, micro-controllers, FPGAs. Here you still need to know the background theory, then you can get specific information from datasheets and application notes.

author: LoFi
author_rank: Contributor
timestamp: January 11, 2018, 10:11:47 pm
content: Quote from: james_s on January 11, 2018, 09:52:49 pmMaybe... I hope not. Although I am sometimes guilty of thinking of circuit operation in step-by-step software terms, I can't help but suspect it would still be useful to have a compendium of frequently-encountered circuit building blocks, even if they are not truly analogous to software functions. But then again, I can't rule out cluelessness on my part...

author: LoFi
author_rank: Contributor
timestamp: January 11, 2018, 10:23:09 pm
content: Quote from: rfeecs on January 11, 2018, 10:02:11 pmThanks... I'll try to check that out.Re. #2: Yes, I understand. One of the charms of using the Arduino is that the microcontroller (and it's code) does most of the heavy lifting and all that's often needed are relatively simple input and output circuits. But I'd like to gain a better knowledge and feel for what goes on at the discrete component level. I don't know why... it's probably somewhat impractical and certainly out-of-step with current design practices.

author: dmills
author_rank: Super Contributor
timestamp: January 11, 2018, 10:42:16 pm
content: Quote from: LoFi on January 11, 2018, 09:43:53 pmThe time this really bites is the first time you try to write a design for an FPGA, it looks sort of like code (especially verilog looks almost like C!), but for the most part everything happens in parallel and order expresses priority not time line.The shift in mindset is hard for most experienced programmers to grasp.regards, Dan.

author: lem_ix
author_rank: Regular Contributor
timestamp: January 11, 2018, 11:15:21 pm
content: As previously mentioned a standard analog/microelectronics book teaches you transistor characteristics and basic building blocks of circuits. After that it's experience and app notes(someone else's experience). You can always copy circuits straight from the manufacturer but without understanding how they work your design will always be sub-optimal. The most basic example of this being the ideal model of the diode and the real characteristic. We tried to get an ideal switch but instead ended up with that curvy mess. When doing a design you need to be aware how and when that imperfection is relevant. For example why you want a Schottky in your buck converter but you wouldn't rectify mains with it. Even selecting the right capacitor type takes quite a bit of understanding. Why is my LDO oscilating? Aren't ceramic caps the best ... etcThen again if you just wanna have fun and connect stuff to arduino it's fine to copy stuff. People tried it and it'll probs work. Read up the basics onwww.electronics-tutorials.wsand you're good.

author: rstofer
author_rank: Super Contributor
timestamp: January 12, 2018, 01:02:06 am
content: Quote from: paulca on January 11, 2018, 09:33:28 pmThere are very few ways to code a circular queue. It's pretty clear how the head and tail pointers have to work.That is simply not true even for a circuit as simple as a common emitter amplifier. Voltage gain, input impedance, output impedance, load current, bandwidth, Bode' response, all can vary widely in a design.Even the arithmetic gets somewhat involved when calculating all the parameters.Google for 'w2aew' videos - he has a couple on the topic of transistor amplifiers and they are excellent.https://www.youtube.com/user/w2aewTo get started:

author: Old Printer
author_rank: Frequent Contributor
timestamp: January 12, 2018, 03:00:02 am
content: I think I am in the same boat as you guys, just not as far upstream. A tinkerer heading towards retirement years and trying to give myself a good basic education in hobby electronics. I love books, always have, and I have a collection from all the varied things I have been interested in throughout my life. A truth is that good technical books take a lot of time to assemble, and that translates into dollars. With the advent of the Internet, the paying market for technical books, particularly for the hobbyist, has dwindled dramatically. Just ask Barns And Knoble.

author: LoFi
author_rank: Contributor
timestamp: January 12, 2018, 04:18:54 am
content: Quote from: blueskull on January 12, 2018, 01:41:36 amThanks for the suggestions. I'll try to check them out...

author: LoFi
author_rank: Contributor
timestamp: January 12, 2018, 04:23:32 am
content: Quote from: Old Printer on January 12, 2018, 03:00:02 amAgree... it seems like it used to be easier to find more good technical books . But of course we have the internet... something I could only dream about when I was very young. But I still like having a few choice printed books to refer to and study at leisure...

author: paulca
author_rank: Super Contributor
timestamp: January 12, 2018, 07:53:01 am
content: Quote from: rstofer on January 12, 2018, 01:02:06 amBut that is only one of many ways to write a queue.

author: Wimberleytech
author_rank: Super Contributor
timestamp: January 12, 2018, 01:56:04 pm
content: While you are at it, check this out.https://archive.org/details/NationalSemiconductorLinearApplicationsHandbook1994

author: Mukrakiish
author_rank: Contributor
timestamp: January 12, 2018, 02:08:17 pm
content: Following on what you did there Wimberleytech...https://archive.org/search.php?query=subject%3A%22Data+Book%22&page=2Just refine the search to look for other "data books". There is a treasure trove of old manuals they used to publish. Wow! This is quite the rabbit hole of old-world application specs just clicking on various tags/collection types (basically what this thread is about but from the 70's and 80's)

author: james_s
author_rank: Super Contributor
timestamp: January 12, 2018, 05:49:30 pm
content: Most of the building blocks under discussion in this thread haven't really changed since the 70s or earlier anyway so that doesn't really matter. Good info.