Author Topic: Help with opamp operation, please.  (Read 832 times)

0 Members and 4 Guests are viewing this topic.

Offline OddTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: no
Help with opamp operation, please.
« on: October 28, 2024, 09:46:56 am »
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.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20250
  • Country: gb
  • 0999
Re: Help with opamp operation, please.
« Reply #1 on: October 28, 2024, 10:23:35 am »
 
The following users thanked this post: Doctorandus_P, Odd

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17369
  • Country: us
  • DavidH
Re: Help with opamp operation, please.
« Reply #2 on: October 28, 2024, 03:50:38 pm »
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.

The 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.
 
The following users thanked this post: Odd

Offline OddTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: no
Re: Help with opamp operation, please.
« Reply #3 on: October 31, 2024, 04:50:26 pm »
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.4volt
I 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.


 

Offline OddTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: no
Re: Help with opamp operation, please.
« Reply #4 on: November 02, 2024, 08:36:43 am »
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)
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20250
  • Country: gb
  • 0999
Re: Help with opamp operation, please.
« Reply #5 on: November 02, 2024, 04:34:59 pm »
I'm not sure what your point is? Post a schematic of what you're talking about

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

Offline OddTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: no
Re: Help with opamp operation, please.
« Reply #6 on: November 02, 2024, 09:38:05 pm »
Sorry, here is a visualization of the change:

The first in quite classic design.

2423223-0

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. :)

2423227-1

 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20250
  • Country: gb
  • 0999
Re: Help with opamp operation, please.
« Reply #7 on: November 03, 2024, 11:13:30 am »
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.

Sorry, here is a visualization of the change:

The first in quite classic design.

2423223-0
That 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.

Quote
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. :)

2423227-1
That's just the standard differential amplifier circuit with a gain of one. The common mode voltage is equal to half the positive input voltage.
 

Offline OddTopic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: no
Re: Help with opamp operation, please.
« Reply #8 on: November 03, 2024, 12:19:09 pm »
Thank you, yes, the sreenshots are swapped. Thanks for confirming that it won't work - I just had to ask :)

 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf