Author Topic: Circuit Design Patterns?  (Read 6249 times)

0 Members and 1 Guest are viewing this topic.

Offline LoFiTopic starter

  • Contributor
  • Posts: 29
  • Country: us
  • Madness, put to good use
Circuit Design Patterns?
« on: January 11, 2018, 06:30:24 pm »
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 Inventors

What 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.   8)

 
« Last Edit: January 11, 2018, 06:39:14 pm by LoFi »
"Don't play stupid with me... I'm better at it."
 

Offline Mukrakiish

  • Contributor
  • Posts: 42
  • Country: 00
Re: Circuit Design Patterns?
« Reply #1 on: January 11, 2018, 07:11:52 pm »
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.  :popcorn:
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Circuit Design Patterns?
« Reply #2 on: January 11, 2018, 07:34:19 pm »
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?
 

Offline Mukrakiish

  • Contributor
  • Posts: 42
  • Country: 00
Re: Circuit Design Patterns?
« Reply #3 on: January 11, 2018, 07:46:02 pm »
James_s

I 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?
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Circuit Design Patterns?
« Reply #4 on: January 11, 2018, 09:11:01 pm »
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.html

Maybe 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.
 

Offline LoFiTopic starter

  • Contributor
  • Posts: 29
  • Country: us
  • Madness, put to good use
Re: Circuit Design Patterns?
« Reply #5 on: January 11, 2018, 09:14:40 pm »
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?

Yes, 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.
"Don't play stupid with me... I'm better at it."
 

Offline LoFiTopic starter

  • Contributor
  • Posts: 29
  • Country: us
  • Madness, put to good use
Re: Circuit Design Patterns?
« Reply #6 on: January 11, 2018, 09:24:37 pm »

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.

Yes, 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. |O )
« Last Edit: January 11, 2018, 09:26:17 pm by LoFi »
"Don't play stupid with me... I'm better at it."
 

Online paulca

  • Super Contributor
  • ***
  • Posts: 4038
  • Country: gb
Re: Circuit Design Patterns?
« Reply #7 on: January 11, 2018, 09:33:28 pm »
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.
« Last Edit: January 11, 2018, 09:48:37 pm by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline LoFiTopic starter

  • Contributor
  • Posts: 29
  • Country: us
  • Madness, put to good use
Re: Circuit Design Patterns?
« Reply #8 on: January 11, 2018, 09:43:53 pm »
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!"
Yeah, 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.  :palm:  Or nearly so...
"Don't play stupid with me... I'm better at it."
 

Online paulca

  • Super Contributor
  • ***
  • Posts: 4038
  • Country: gb
Re: Circuit Design Patterns?
« Reply #9 on: January 11, 2018, 09:45:35 pm »
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!"
Yeah, 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.  :palm:  Or nearly so...

Yep.  That's why I keep wanting to put buffer amps between everything.  "Isolation of concern" ;)
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Circuit Design Patterns?
« Reply #10 on: January 11, 2018, 09:52:49 pm »
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.
 

Online paulca

  • Super Contributor
  • ***
  • Posts: 4038
  • Country: gb
Re: Circuit Design Patterns?
« Reply #11 on: January 11, 2018, 09:55:36 pm »
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.

Yes sir. 

:) 
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline rfeecs

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: us
Re: Circuit Design Patterns?
« Reply #12 on: January 11, 2018, 10:02:11 pm »
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_tmb

The table of contents, starting at Chapter 3 goes through all the basic circuits used in analog ICs:

Quote
CHAPTER 1
Models for Integrated-Circuit Active
Devices

CHAPTER 2
Bipolar, MOS, and BiCMOS
Integrated-Circuit Technology

CHAPTER 3
Single-Transistor and Multiple-Transistor
Amplifiers

CHAPTER 4
Current Mirrors, Active Loads, and
References

CHAPTER 5
Output Stages

CHAPTER 6
Operational Amplifiers with
Single-Ended Outputs

CHAPTER 7
Frequency Response of Integrated
Circuits

CHAPTER 8
Feedback

CHAPTER 9
Frequency Response and Stability of
Feedback Amplifiers

CHAPTER 10
Nonlinear Analog Circuits

CHAPTER 11
Noise in Integrated Circuits

CHAPTER 12
Fully Differential Operational
Amplifiers

Two 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.

 

Offline LoFiTopic starter

  • Contributor
  • Posts: 29
  • Country: us
  • Madness, put to good use
Re: Circuit Design Patterns?
« Reply #13 on: January 11, 2018, 10:11:47 pm »
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.

Maybe... 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...
"Don't play stupid with me... I'm better at it."
 

Offline LoFiTopic starter

  • Contributor
  • Posts: 29
  • Country: us
  • Madness, put to good use
Re: Circuit Design Patterns?
« Reply #14 on: January 11, 2018, 10:23:09 pm »
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_tmb

The table of contents, starting at Chapter 3 goes through all the basic circuits used in analog ICs:

...

Two 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.

Thanks... 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. 
"Don't play stupid with me... I'm better at it."
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Circuit Design Patterns?
« Reply #15 on: January 11, 2018, 10:42:16 pm »
Yeah, 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.  :palm:  Or nearly so...
The 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.
 

Offline lem_ix

  • Regular Contributor
  • *
  • Posts: 192
  • Country: cs
Re: Circuit Design Patterns?
« Reply #16 on: January 11, 2018, 11:15:21 pm »
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 ... etc

Then 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 on www.electronics-tutorials.ws and you're good.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Circuit Design Patterns?
« Reply #17 on: January 12, 2018, 01:02:06 am »
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.

There 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/w2aew

To get started:



« Last Edit: January 12, 2018, 01:10:41 am by rstofer »
 

Offline Old Printer

  • Frequent Contributor
  • **
  • Posts: 747
  • Country: us
Re: Circuit Design Patterns?
« Reply #18 on: January 12, 2018, 03:00:02 am »
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 :).
 

Offline LoFiTopic starter

  • Contributor
  • Posts: 29
  • Country: us
  • Madness, put to good use
Re: Circuit Design Patterns?
« Reply #19 on: January 12, 2018, 04:18:54 am »
For analog circuit building blocks, refer to ADI and TI opamp application handbooks, there are A LOT OF goodies from those free PDFs.
Also, Jim William's analog circuit book trilogy is a good reference book collection as well.

Thanks for the suggestions.  I'll try to check them out...
"Don't play stupid with me... I'm better at it."
 

Offline LoFiTopic starter

  • Contributor
  • Posts: 29
  • Country: us
  • Madness, put to good use
Re: Circuit Design Patterns?
« Reply #20 on: January 12, 2018, 04:23:32 am »
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 :).

Agree... 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...
"Don't play stupid with me... I'm better at it."
 

Online paulca

  • Super Contributor
  • ***
  • Posts: 4038
  • Country: gb
Re: Circuit Design Patterns?
« Reply #21 on: January 12, 2018, 07:53:01 am »
There are very few ways to code a circular queue.  It's pretty clear how the head and tail pointers have to work.

But that is only one of many ways to write a queue.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Circuit Design Patterns?
« Reply #22 on: January 12, 2018, 01:56:04 pm »
 

Offline Mukrakiish

  • Contributor
  • Posts: 42
  • Country: 00
Re: Circuit Design Patterns?
« Reply #23 on: January 12, 2018, 02:08:17 pm »
Following on what you did there Wimberleytech...

https://archive.org/search.php?query=subject%3A%22Data+Book%22&page=2

Just 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)  :scared:
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Circuit Design Patterns?
« Reply #24 on: January 12, 2018, 05:49:30 pm »
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.
 
The following users thanked this post: Mukrakiish


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf