OpAmp input using half supply voltage - can a single "bias source" be used? - Page 1
Forum section: electronics / beginners

author: nursey
author_rank: Newbie
timestamp: May 10, 2020, 02:34:43 am
content: Hi everybody,Pretty much a total electronics newb here, so advanced apologies for low IQ questions! Just for the record I'm a software guy, which might explain why I think like I do, and ask what I askBackground: I see a lot of amplifier circuits with multiple op-amps configured as inverting amplifiers, and so far I understand they gradually provide more gain, stage by stage. When they only have a positive power supply available, I see them biasing the non-inverting input at half-supply.Question: Why is each op-amp being provided its own pair of resistors for biasing? Why aren't all the op-amps biased from just one pair of resistors? (ref:https://www.sparkfun.com/images/tutorials/GuitarAmp/GuitarAmp.pdf)I think the obvious answer would be there might be interaction between the opamps if only one pair is used, but at the end of the day there is only one power supply too, so why is the biasing "supply"/input any different.BTW, I'm loving the YouTube channel and learning so much, and gradually trying to understand more.Many thanks in advance to the community!

author: PartialDischarge
author_rank: Super Contributor
timestamp: May 10, 2020, 04:02:40 am
content: In general that would be a bad practice, as it would limit your design choices over just a few resistors. Also you’d have to route another separate trace for each opamp, whereas the supply rail is already there.Also, a filtering cap at least 10 nF would be most appropiate at each + input, since pulse-like input signals usually couple into the other opamp input creating inrush currents

author: nursey
author_rank: Newbie
timestamp: May 10, 2020, 05:31:12 am
content: Many thanks for the response, especially during you're weekend!My prototype uses a pair of resistors for each op-amp (TL074CN quad op-amp). So I was wondering if the design could be more optimal.Are you saying it's just not good practice, or it just wouldn't work (be stable if mass produced)? ...just asking out of interest.My final design will certainly use your advice of taking a resistor from supply and ground, as the non-inverting input pins are adjacent.I have a 1uf cap in series with each (non inverting) input, but other than the resistors to vcc/ground for the bias, I don't have any caps on the non-inverting inputs, or any path to ground through another resistor, which I've seen on some circuits.Just FYI, what I'm trying to do is make a hexaphonic guitar pickup, each string having it's own signal path. I want to amplify each string so much that I'm just left with a square wave of the fundamental. Then I can count the cycles at the zero crossing point to work out the frequency of each string. This kind of thing has been done before, but in a slightly different way. I'm trying to understand more about the electronics of it. I'm pretty close other than I currently have noise or instability in the circuit...At the moment I have noise in my output signal (no inputs are connected and my circuit is built on a breadboard). Image attached.I've seen 50Hz hum, and today as I'm typing the signal looks like 50Hz with a lot of noise in it, my scope is reporting all sorts of frequencies close to multiples of 50, I think because the signal is so noisy, as opposed to being a clean 50Hz sine/square wave.I have a screened input cable which would come from my test guitar, but it's only connected to my circuit, not to a guitar, as I wondered if the guitar pickups were picking up the noise.I've tried shielding the whole board and it made no difference. I used alfoil clipped to an earthing point, to make a bubble around the whole board.Any thoughts on how to isolate / fix this would be appreciated.The final question I have, is how would I create a filter for each inverting input which only allows frequencies through between 70Hz and ~1.32Khz? I'm not brilliant at maths / calcs so I think I understand I need to add some (ceramic?) caps, but not sure what values.Many thanksChris

author: PartialDischarge
author_rank: Super Contributor
timestamp: May 10, 2020, 09:15:23 am
content: It can be done, but it rises other issues like trace board routing and the bias current that each opamp takes from the resistors.It’d be better if u could post a schematic to better understand your idea

author: nursey
author_rank: Newbie
timestamp: May 10, 2020, 11:48:47 am
content: Sure, schematic attached.Notes:- It has ridiculous values in it, i.e. I have 10M feedback resistor with a ~100 ohm resistor on the input. These are place holders.A challenge that lays ahead is that the pickup for each string will only have a small coil, and would have to have a fairly weak magnet.Space between strings is 10mm so this restricts the size of the coil, and we can't have a magnet picking up an adjacent string. So in total, this is going to limit the strength of the input signal.I start to think I need a circuit that would be similar to that used for a record player to amplify what comes off the needle.- BIAS represents where I'll put the pairs of resistors to provide half-supply- With a quad op-amp package I'm trying to get one chip to handle two strings- All outputs arrive at a 6 channel comparator so I can simply pick a threshold level and send a 1/0 to a microcontroller for each string to represent the frequency of the string- The microcontroler (not shown) reads the digital inputs as a single input port (8 bits) and then checks the bit that represents each string, and I count the hi/lo transitions to get the frequency of each string and then send midi signals on to a host. You'd play guitar and be able to then control synthesisers.The concept is similar to what you get with a Roland VG99 and a Fishman TriplePlay. These are both very expensive, so I want to create a low cost, open source, alternative.Thanks again,Chris

author: Zero999
author_rank: Super Contributor
timestamp: May 10, 2020, 04:16:16 pm
content: Quote from: nursey on May 10, 2020, 02:34:43 amInverting amplifiers don't provide any more gain, than non-inverting amplifiers. If anything, non-inverting configuration is better for high gain, than inverting, because they enable a higher input impedance.It's possible to use the same biasing resistors for multiple op-amps, but it's often not done because it can cause unintended feedback and interference.Quote from: nursey on May 10, 2020, 11:48:47 amPlease use proper op-amp symbols, rather than the pinouts like that, it makes the schematics much easier to understand. I have to squint to read that and don't have the time to try to decode it.

author: PartialDischarge
author_rank: Super Contributor
timestamp: May 10, 2020, 04:16:24 pm
content: Since the TL074 is JFET input the input bias is very low so ok for all the shared bias, but use another bias source for the comparators, it is just good practice. And add a 10nF capacitor as noise filter at these dividers.Any high impedance resistor will pick-up 50Hz noise, keep that in mind.Always add decoupling capacitors in the supply lines.As for the filter, it is not that difficult, look online on how to design them, but since their response depends on their load I suggest you install LTSpice and simulate the results with it changing the values. You will find it very useful in making this kind of circuit work.

author: rstofer
author_rank: Super Contributor
timestamp: May 10, 2020, 04:49:35 pm
content: I would think a constant reference across all op amps would be a goal. I use a spare unity gain op amp to drive the Vcc/2 signal. I certainly wouldn't use 4 resistor pairs for a quad op-amp package.

author: TimFox
author_rank: Super Contributor
timestamp: May 10, 2020, 05:00:34 pm
content: When biasing the non-inverting input to half-supply, the bias network must be "clean", free from hum, feedback, and other power-supply issues (use appropriate bypassing), since there is no rejection of noise on the non-inverting input in an inverting feedback amplifier. A good op-amp will reject noise on the power-supply terminals (PSRR).

author: rstofer
author_rank: Super Contributor
timestamp: May 10, 2020, 05:44:19 pm
content: Quote from: nursey on May 10, 2020, 11:48:47 amIt would be nice to know what values you think you are going to actually use. A gain of 100,000 is pretty ridiculous. The thing is, a high value feedback resistor is a good way to add noise. Really high impedances are just wrong.Dave did a video about cascading op amps to get more bandwidth by staying low in the gain component of the gain/bandwidth spec. But limiting gain also helps with keeping resistor values rational. Personally, I get nervous about 1M resistors in op amp integrators but to get to real-time, a 1M resistor and a 1 ufd capacitor work out mathematically and seem to be pretty common. Besides, integrators tend to eliminate noise. That is for the specific application of analog computing and audio is completely different. I would try to keep the resistors at or below 100k and probably at or below 10k. I don't think I would try for a gain > 100 at any one stage. In fact, if you look at Figure 9, you will see that for about 20 kHz of bandwidth, the gain can be no higher than 100.https://www.ti.com/lit/ds/symlink/tl074.pdf?&ts=1589130205672There's some truly ugly phase shift below 100 Hz. Are you sure this is the right op amp? Does phase shift matter in audio?There is a lot of information re: band-pass filters on Google including: "It's All In the Math"Apparently there are two predecessor videos describing the low-pass and high-pass filters that make up the band-pass filterYou may want sharper attenuation slopes, check out 'active bandpass filter' or 'second order bandpass filter'. This design process gets out of hand pretty quick so I'm going to avoid it. There are MANY other types of filters with varying characteristics.

author: Benta
author_rank: Super Contributor
timestamp: May 10, 2020, 06:37:34 pm
content: There is no problem at all in using a common bias voltage source for your application, providing it's clean and well filtered. In fact it's often an advantage, as resistor tolerances between amp stages no longer play a role.The reason for using a divider per op amp is more likely layout laziness, routing gets more difficult.

author: gcewing
author_rank: Regular Contributor
timestamp: May 11, 2020, 09:59:10 am
content: I don't think the LMV7231 window comparator is the best thing to use here. First, it's overkill -- you don't need a window comparator, just a single comparator per channel. Second, you want some hysteresis, so that you don't get spurious transitions if there is some noise on your signal. You'd be better off using Schmitt triggers.

author: nursey
author_rank: Newbie
timestamp: May 12, 2020, 02:40:37 am
content: Thank you so much to everybody for the advice and input. There is quite a bit to absorb and implement. I get the basics of what you are all suggesting so I can go do further learning and advance the prototype. My key takeaways from all the advice so far (except for go learn more)...1. I am relieved to see the advice of the high impedance resistors picking up 50Hz, because that is exactly what happened in my last prototype version.2. Using another op amp to drive half supply to other devices would be a good idea. I might get routing challenges (this is actually ok as I only need a functional prototype as a proof of concept, after that I can hand off to a professional and provide a more educated specification).3. Use schmitt triggers to take the final amplifier outputs to the inputs of the micro controller.4. Add bypass on the bias. I need to understand if this is required in view of the advice at 2 above.3. "Good op-amps" won't let noise in.4. Don't choose stupid resistor values, and target <=100x gain at any one stage.5. Use bigger text in my images (I'm an old guy, so I should have thought of this!)Other stuff:So far the comparator isn't in circuit. The function I want here is to ensure the squarest possible wave goes into the micro, when the signal goes above/below a set level (maybe half supply +20%). For my current prototype I've got an LM339. The one in my schematic was selected (in an uneducated fashion) because it has 6 channels and I have 6 strings to process. All-round, I wish 6 channel packages were still as readily available as they appear to once have been it would provide a great problem/solution fit for me.For the current prototype as of yesterday, here is my circuit config:TL074CN (quad package) using three cascading op-amps:Stage 1: input resistor 1K, feedback resistor 4.7K, outputs to...Stage 2: input resistor 1K, feedback resistor 1M, outputs to...Stave 3: input resistor 1K, feedback resistor 38K, outputs to scope probeMy signals at output are square looking (highly deisred), with a 9v supply, and they measure at 6v p/p. I'll obviously need to adjust this for the logic level of the selected micro controller.The signal quality of the low E-String (around 82Hz) is square but has spikes in between each cycle of the fundamental. This needs to be improved. Would I be right in thinking the circuit is struggling to hold the output square wave for such long cycles, due to the lack of bypass? On the top E string (320Hz+) it looks stable and clean. I'll attach images to make all this more visual in my next post.BTW, I'm using easy EDA for my schematic and future PCB layout, as it connects newbs like me to a PCB production service, and that looks like heaven to a guy at my level of experience. I also use TINA from TI, so I can simulate as suggested above.Again, thank you all for the patience and mountains of experience. No doubt I'll return in a couple of days with an update and some more questions.

author: Zero999
author_rank: Super Contributor
timestamp: May 14, 2020, 08:19:32 am
content: Just a few comments:What constitutes a ridiculously high resistor value depends on several factors: the op-amp, input impedance, routing, noise sources etc. J-FET op-amps such as the TL074 have a very high input impedance, so can stand much higher resistor values, than BJT input device. High resistor values generate more thermal noise, which can dominate that of the op-amp, at low signal levels. High impedance nodes are more prone to noise pick-up from external E-fields such as mains hum.If the voltage thresholds aren't critical, then use a Schmitt trigger IC, such as the 74HC14, rather than a comparator IC. It doesn't need any external components and will work out much cheaper.Lastly, regarding my comment about drawings, yes clear, decent sized fonts help, but it's much easier if the proper op-amp symbol is used, rather than the pin-out from a data sheet. The person reading the schematic can easily see where the inputs and outputs go, just by the shape of they symbol, without having to look closely at the text. In multiple op-amp packages is easier to see which op-amp is which. Various conventions exist for showing which op-amps are on which IC such as U1A, U1B, U1C, U1D denoting the op-amps on a quad IC. The power rails are often only shown on U1A or as a separate symbol, U1.http://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/opamp.html