madbeanpedals::forum

Projects => How Do I? Beginner's Paradise. => Topic started by: Raz78 on January 25, 2018, 03:52:57 AM

Title: Single vs dual supply
Post by: Raz78 on January 25, 2018, 03:52:57 AM
Hi, after 2 years of self taught learning to read schems, draw pcb´s, draw graphics/drill temps, mod, etch boards and enclosures and build the actual pedals etc. etc i realised i both have to and need to learn the math to progress. I know theres plenty electronics info online but i hope someone can point me towards some effect/pedal orientated reading learning.
Fx. single vs dual supply - signal to non inverting IC input, i understand the input bias on single sup is often halfway (4.5 from a divider) between Vc and ground, but then between Vb/4.5V  and signal to input theres is further a resistor (470K - 1M on alot of pedals) -
so input pulldown, coupling cap and then fx 470K from Vb to +input.
Id love to try out whether to run things single or dual supply and be able to breadboard whatever i feel like, how do i get my head around this stuff.
I hope my questions makes sense, in advance thanks a lot.
Title: Re: Single vs dual supply
Post by: midwayfair on January 25, 2018, 06:57:59 AM
This question isn't exactly electronics math related ...

All devices expect a voltage swing between two points, a high and low voltage. Transistors are the basis of everything, and they come in PNP or NPN, depending on whether they will want their voltage supply pin to be above or below the voltage of circuit ground in typical usage. (I am being purposefully vague about the pin labels here, because you could, conceivably, use the pins in different ways.) The middle pin is typically going to need to be somewhere between the highest and lowest DC voltage for the transistor.

Op amps are just a bunch of NPN and PNP transistors. They require a positive, negative, and in-between voltage. For best performance, you want that to be exactly halfway.

Understand that +V/-V is NORMAL for most circuits involving op amps, and guitar pedals only use an artificial bias voltage point of 4.5V because we use a power supply that only gives +9V relative to a common ground. Many electronics have a transformer and take AC voltage, rectify it to +- voltages, and ground is Vb. That's all Vb is: It's a fake ground. The op amp doesn't care what the voltage is.

I think you can get away with just knowing how to do the following with guitar pedals -- because this is all I ever used and I think I did just fine:


Most of the typical math in EM beyond the basics is covered in part of a university physics progression (often there's an entire class dedicated to EM), calculus textbooks (download Strang's free calculus textbook and just do the electrical engineering problems), differential equations, and linear algebra (Anton's Elementary Linear Algebra applications version, which you can find "extreeeeeeeemely" "cheap" if you look hard enoupdf has an entire chapter dedicated to analyzing current flow via linear systems). This might be a lot of work that you may decide could more profitably be used to build. If you already know some calculus, though, you might have an easier time of it, and you don't need a full linear algebra course with the abstract math to understand matrix math, so you can skip all the parts of Linear Algebra that I personally enjoyed and just do the irritating part :).

This course will have "some" math in it:
https://www.edx.org/course/circuits-electronics-1-basic-circuit-mitx-6-002-1x-0
Also stuff, so check the MIT site to find out if the material is the same. Maybe budget more time than they tell you.
https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-002-circuits-and-electronics-spring-2007/
The actual course has diff eq and physics as a requirement ... so ....... Good luck.
Title: Re: Single vs dual supply
Post by: EBK on January 25, 2018, 07:42:53 AM
To answer the original op amp question in a different way: 
The input cap blocks whatever DC voltage the signal is riding on, but the op amp inputs need to have some sort of path available through which they can draw a DC bias current (else some of the transistors can't work their magic).  This DC current path for the non-inverting input is provided by that resistor going to Vb. 

(In hindsight, I actually like Jon's answer a bit better...)
Title: Re: Single vs dual supply
Post by: Raz78 on January 25, 2018, 08:18:14 AM
Jon, thanks a lot for a very fullfilling answer, actually i already know most what you mention (or know the relative subjects and where to dig in), i see likely its just a matter of more hands on experience/breadboarding, i think sometimes if its simple i cant believe its so simple, doubt strikes me and i freeze.

Just so you know what got me here, on one breadboard is a optical comp (single supply), on another a variable active sallen key highpass powered a dual supply, now, tweaking components to change frequenzy response, clipping or gain is one thing but i came to a halt when i decided to perhaps combine theese.
If there is even a tiny audible difference running the comp or xx circuit on dual sup or vice versa im fine as i care more about my ears than cost, but if theres no perceivable difference saving space on a board is nice too.

For reference to get an idea with  the power supply i compared PC´s timmy with GCFX Catch 22, 470K to Vb/510K to ground etc.
Dividing the voltage to get 4.5V, virtual ground -  check, but either way what how do i interpret the resistor between Vb (or ground for +/-) and input signal, what does it do?
English is not my native langauge so im trying hard to make sense with this question, thanks again.


Title: Re: Single vs dual supply
Post by: EBK on January 25, 2018, 08:36:35 AM
That resistor sets the DC voltage for that input to Vb.   
Title: Re: Single vs dual supply
Post by: Raz78 on January 25, 2018, 08:38:44 AM
Quote from: EBK on January 25, 2018, 07:42:53 AM
To answer the original op amp question in a different way: 
The input cap blocks whatever DC voltage the signal is riding on, but the op amp inputs need to have some sort of path available through which they can draw a DC bias current (else some of the transistors can't work their magic).  This DC current path for the non-inverting input is provided by that resistor going to Vb. 

(In hindsight, I actually like Jon's answer a bit better...)

EBK thanks! Yes, i understand (i think i do) but not fully, how do i figure out the resistor value for the DC path between input and Vb and... is this value constant for a dual supply except for +/- that path/resistor goes to ground?
Im sorry if i keep repeating myself, i really would like to understand it.
Title: Re: Single vs dual supply
Post by: Raz78 on January 25, 2018, 08:41:21 AM
Oh you answered while i was typing, i get it but how do i know what DC voltage is needed, hahahahah i think that is what i should have asked in a single line, thanks again.
Title: Re: Single vs dual supply
Post by: EBK on January 25, 2018, 08:50:48 AM
The short answer is that the resistor value is arbitrarily large.  The actual value affects the input impedance, but doesn't really affect the DC voltage that the pin sees.  It does have an impact on the AC voltage....

In an ideal op amp, no current flows into the inputs.  The DC voltage at that input (considering the capacitor as on open circuit) is Vb.  The AC voltage at that input (considering the capacitor as a short circuit) is determined by the voltage divider formed by that resistor and the source impedance.  I hope that makes a little sense....
Title: Re: Single vs dual supply
Post by: midwayfair on January 25, 2018, 09:05:10 AM
Quote from: EBK on January 25, 2018, 08:50:48 AM
The short answer is that the resistor value is arbitrarily large.  The actual value affects the input impedance, but doesn't really affect the DC voltage that the pin sees.  It does have an impact on the AC voltage....

Just to clarify this: Look at the source impedance of the device connected to the pin requiring the biasing resistor, which in your example is 470K. You will be forming a voltage divider (I'm not lying! Everything's a voltage divider) created as follows: (1) the source impedance and the 470K form a restive divider, that is, not frequency-specific; (2) if a capacitor forms a high-pass filter with the 470K, then you have a frequency-dependent voltage divider that you can calculate the cutoff frequency of; (c) somewhere, somewhere, in this system, there is capacitance and there may be inductance, but you will have to look carefully to find them in some circumstances, because you also form high pass and possibly bandpass filters. You might make a judgement call on whether it's worth finding such things.

As an example of the last one, if your input device is a guitar, then 470K will form a filter with the cable capacitance. Assume 40pF per foot, and work out via the low pass filter formula what the cutoff frequency is. Human hearing is roughly 20Hz to 20KHz. A guitar amplifier struggles above 7KHz. Is 470K good enough for a typical guitar cable and typical guitar pickup?

Start to jot down questions. Can that resistor be arbitrarily large? Do you want any current flow? Could you imagine wanting to arbitrarily limit the bandwidth?

I don't know your native language, but you might want to see if there's a translation of The Art of Electronics or a similar text. I tend to learn well from books, though I don't know about anyone else.
Title: Re: Single vs dual supply
Post by: EBK on January 25, 2018, 09:14:33 AM
Again, I like Jon's answer better than mine, which ignores filtering effects.   ;) 
Title: Re: Single vs dual supply
Post by: midwayfair on January 25, 2018, 10:42:40 AM
Quote from: EBK on January 25, 2018, 09:14:33 AM
Again, I like Jon's answer better than mine, which ignores filtering effects.   ;)

'Cept I hopelessly overthink things, whereas your answer actually gets someone to finish a circuit. :P
Title: Re: Single vs dual supply
Post by: Raz78 on January 25, 2018, 10:52:13 AM
Thanks both of you.
Jon, ill check out that book, also the sengpiel link will turn out very usefull. By langauge barrier (dane here), english is fine, i merely mean that asking online about very specific subjects is quite different from how one could go about it if some grumpy old radio or amp tech lived just down the road, i drop by with cake and ask him, draw on napkins, smell coffee and listen to vinyl on his tube amplifier...

Yes, now i see, a highpass filter, input cap and resistor, 47n and 470k, cut off (ca. 7hz) way below our low E at ca. 80hz, that makes me think i could use 100k and still be fine but one thing is filtering, another is the impedance, a pulldown R before the coupling cap also effects the impedance to some degree etc. and then add the output impedance, suddenly the often significantly lower values in the 2nd part of dual IC´s makes a little sense, well, i know exactly what to read up on now, im glad i asked.
Thanks again.
Title: Re: Single vs dual supply
Post by: reddesert on January 26, 2018, 12:09:23 AM
Here is a nice, digestible read about "How to Bias an Op-Amp" : https://ocw.mit.edu/courses/media-arts-and-sciences/mas-836-sensor-technologies-for-interactive-environments-spring-2011/readings/MITMAS_836S11_read02_bias.pdf (https://ocw.mit.edu/courses/media-arts-and-sciences/mas-836-sensor-technologies-for-interactive-environments-spring-2011/readings/MITMAS_836S11_read02_bias.pdf)

Typically in a musical instrument context we want to amplify the AC signal of the music while powering from DC (either via a bipolar supply, or fudging a bipolar supply by providing a reference voltage halfway between 0 and our power supply). So we wind up using things that look a lot like the AC-coupled inverting or non-inverting amplifiers drawn in the first few diagrams in that PDF.

I second the recommendation for Horowitz and Hill's "The Art of Electronics." It's the bible. It's gone through 3 editions now, but for simple analog effects circuits, the technologies used are pretty old, the 1st ed will cover them, and the older editions are often inexpensive as used books.
Title: Re: Single vs dual supply
Post by: Raz78 on January 28, 2018, 03:35:02 PM
Thanks everyone! Ive recognise most everything in basic pedals on schematics etc. but decided its time to learn what it is they actually do.