Help with opamp operation, please. - Page 1
Forum section: electronics / projects

author: Odd
author_rank: Regular Contributor
timestamp: October 28, 2024, 09:46:56 am
content: I have attached my cell sensing circuit. it feeds a microcontrollers's AD inputs. (A0,1,2,3..) (0...3v3)To operate properly the opamps need to run of the full battery pack voltage, not all opamps do that.How should the resistor values be changed in order to run the opamp of 3.3v, and still provice a scaled cell voltage (max4.2v) as about 3.1v ?it seems to be a lot of calculations to be done, and this has surely been done many times before.

author: Zero999
author_rank: Super Contributor
timestamp: October 28, 2024, 10:23:35 am
content: I answered that question in your other thread.Refer to reply #2.https://www.eevblog.com/forum/projects/how-to-better-sense-cell-voltages-6s-for-a-microcontroller/msg5590205/#msg5590205

author: David Hess
author_rank: Super Contributor
timestamp: October 28, 2024, 03:50:38 pm
content: Quote from: Odd on October 28, 2024, 09:46:56 amThe common mode input voltage is set by the voltage divider at the non-inverting input, so if all resistor values are equal, the common mode voltage is 1/2 of the input voltage. Raising the input resistor values or lowering the feedback values will divide the common mode voltage further if needed, but also lowers the differential gain.The example Zero999 shows gets around this by adding R5 and R6. R5 is in parallel with R2, so divides the common mode input voltage to be within range of the operational amplifier. Adding the matching R6 increases the differential gain back to where it was.

author: Odd
author_rank: Regular Contributor
timestamp: October 31, 2024, 04:50:26 pm
content: Thank you.In your example, you are dividing 24v down to 5.5v (100k and (30k in parallell with 100k))I expect that R1 should always be = R3 and R2=R4 - but wonder if that is correct?1: It means that the opamp (as connected above )could be driven by only 6v, and work?I see that I will need different voltage divider resistors (R1,R5 and R6,R3) to properly scale let's say 8.4voltI also wish to get to 0..3.2v output - driving the opamp of 3v3.2: Is there any meaningful difference in the two following approaches:- each opamp could have a fixed divider that scaled it's highest voltage down to 3v(on inpouts) , and all have the same gain.- all opamps use resistors that makes the highest cell be within 3v(on inputs) , - and the gain is set differently for each to have the output reach 3.1v (at 4.2v input difference.)I expect to do software calibration, so as long the output is linear, minor variance due to nearest resistor value/tolerances etc won't matter.

author: Odd
author_rank: Regular Contributor
timestamp: November 02, 2024, 08:36:43 am
content: In this example, I would be using six resistors for each cell.four as voltage dividers , and two to set gain.Is it possible to re-use the voltage dividers? - use the divided output between R3 and R6 to feed the opamp that would be below, between 16-20v in the examle?Ar is there some reason that this is not advisable (like the influence from R2/R4)

author: Zero999
author_rank: Super Contributor
timestamp: November 02, 2024, 04:34:59 pm
content: I'm not sure what your point is? Post a schematic of what you're talking aboutHave you considered the issue of cell imbalance discussed in the other thread? Why can't you just power the op-amp off the battery and use a part such as the LM324?

author: Odd
author_rank: Regular Contributor
timestamp: November 02, 2024, 09:38:05 pm
content: Sorry, here is a visualization of the change:The first in quite classic design.This second one, is saving one resistor per cell, there is once voltage divider, feeding both 8 (negative input) and 4(positive input) I wonder if this would be a "valid" design. - mainly a academic question, eventually a space-saving question.

author: Zero999
author_rank: Super Contributor
timestamp: November 03, 2024, 11:13:30 am
content: I think you've got the descriptions of the attachments the wrong way round. It's probably the fault of the forum software, which puts the attachments in the wrong order. Click on the thumbnails and you'll see what I mean.Quote from: Odd on November 02, 2024, 09:38:05 pmThat won't work. Please do some calculations (remember op-amps always use negative feedback to keep the voltages at its inputs the same) or enter the schematic into a simulator before asking such questions.QuoteThat's just the standard differential amplifier circuit with a gain of one. The common mode voltage is equal to half the positive input voltage.

author: Odd
author_rank: Regular Contributor
timestamp: November 03, 2024, 12:19:09 pm
content: Thank you, yes, the sreenshots are swapped. Thanks for confirming that it won't work - I just had to ask