Author Topic: Poor man's programmable gain amplifier  (Read 916 times)

0 Members and 1 Guest are viewing this topic.

Offline i509VCBTopic starter

  • Contributor
  • Posts: 26
  • Country: us
Poor man's programmable gain amplifier
« on: December 04, 2024, 06:50:29 am »
I have a current sensing circuit below.

2452999-0

The first stage uses a MAX49925 which is a current sense amp with a programmable gain. Because I have an ADC with an ENOB of 8.6 I need the extra gain to see lower current values.

However for my desired range of 100 mA to ~7 uA I need more than the gain of 100. Another one of these would cost quite a bit more than reasonable. Other programmable gain amps I've found cost about the same. In the image above my thought was that the N channel mosfet when enabled would effectively create a unity gain amp. The amp in the second stage is just some cheap amp since the first stage does the majority of the precise current measurement. Is the poor man's programmable gain amplifier a bad idea to build and should I just do something else there?

 

Offline Mahagam

  • Regular Contributor
  • *
  • Posts: 59
  • Country: pl
Re: Poor man's programmable gain amplifier
« Reply #1 on: December 04, 2024, 07:39:19 am »
R5 placed incorrectly
 
The following users thanked this post: dzseki

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Re: Poor man's programmable gain amplifier
« Reply #2 on: December 04, 2024, 09:34:45 am »
What is your ADC?
Readers discretion is advised..
 

Offline Sacodepatatas

  • Regular Contributor
  • *
  • Posts: 107
  • Country: es
Re: Poor man's programmable gain amplifier
« Reply #3 on: December 04, 2024, 09:42:15 am »
The feedback network in the second opamp does nothing. R5 is connected like it was an output load, and the output is connected to Vin- either throught R4 or Q1. No difference in gain though. I see you intended to make R4/R5 a resistor divider as the feedback gain network. So then you should connect R4 between Vo and R5, and then to Vin-. Q1 can be placed, either shortcircuiting R4 for decreasing gain to 1, or between R5 and ground (i prefer this because then there is always the same voltage across Q1's gate and source), in the last case, gain control logic is reversed.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 15045
  • Country: de
Re: Poor man's programmable gain amplifier
« Reply #4 on: December 04, 2024, 01:46:25 pm »
The MAX49925 is a rather special amplifier, with a large common mode range well beyong the supplies, vey good CMRR, but as a downside also relatively high noise. Don't take the shown equivalent circuit literal - the actual ciruict can look quite different, e.g. using switched capacitors.
It makes sense to have some gain after the amplifier, as the voltage range for the output is rather limited (< +-800 mV for accuracy specs).

Depending on the required bandwidth the amplifier may be the right choice. Ane may want switching of the shunt(s) insteat of a fixed shunt and variable gain. Another question is the common mode voltage at the shunt.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20250
  • Country: gb
  • 0999
Re: Poor man's programmable gain amplifier
« Reply #5 on: December 04, 2024, 05:55:25 pm »
Put the MOSFET in series with the low side, of the lower resistor. The gain will then be higher, when the transistor is on.
 
The following users thanked this post: i509VCB

Offline i509VCBTopic starter

  • Contributor
  • Posts: 26
  • Country: us
Re: Poor man's programmable gain amplifier
« Reply #6 on: December 04, 2024, 07:21:53 pm »
R5 placed incorrectly

Yes that was a dumb mistake on my part. Probably shouldn't design circuits at 2am.

What is your ADC?

Currently I am using the ADC on an RP2040 - it's ENOB is 8.6.
 

Offline i509VCBTopic starter

  • Contributor
  • Posts: 26
  • Country: us
Re: Poor man's programmable gain amplifier
« Reply #7 on: December 04, 2024, 07:37:37 pm »
The MAX49925 is a rather special amplifier, with a large common mode range well beyong the supplies, vey good CMRR, but as a downside also relatively high noise. Don't take the shown equivalent circuit literal - the actual ciruict can look quite different, e.g. using switched capacitors.
It makes sense to have some gain after the amplifier, as the voltage range for the output is rather limited (< +-800 mV for accuracy specs).

My intention with the MAX49925 is that it appears to be able to survive my possible cases of user error (if I connected the probes backwards).

Is your concern about noise going to be an issue for uA level sensing? I do understand that the part in question is really for multi-amp sensing.

This is definitely going off topic from the original thread topic. Maybe I should just make an actual thread for this question so people don't skip this all.

Depending on the required bandwidth the amplifier may be the right choice. [One] may want switching of the shunt(s) [instead] of a fixed shunt and variable gain. Another question is the common mode voltage at the shunt.

I fully expect I'm going to need to test the circuits regardless of what approach I take. My initial test circuit here kind of meets the range, but I would like a higher current range which might force this still.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 15045
  • Country: de
Re: Poor man's programmable gain amplifier
« Reply #8 on: December 04, 2024, 08:11:01 pm »
The noise problem would be a thing at the low end of the setup and also when a fast measurement is wanted. If this is more mA or µA depends on the shunt. For small currents there is the bias / input current to take into account, even though this is mainly linear.
Usually there is a good way to protect the shunt with diodes. It still depends if the current to measure is isolated from the measurement system or connected (e.g. use the same power supply).

With nosie from a bit over 100 nV/sqrt(Hz). This translates to a bit over 100 nA/sqrt(Hz). So OK to resolve some 1 µA up to maybe 30 readings per second. It can be quite a bit worse with a sampling ADC if there is no AA filter.
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2567
  • Country: gb
  • Recovering Electrical Engineer
Re: Poor man's programmable gain amplifier
« Reply #9 on: December 06, 2024, 07:45:56 pm »
Here's my misery free, full-on lousy never buys a round 3 decade PGA.

Analog switch resistance is almost entirely eliminated from the gain eqn.
So you can go down the bins to find them, CD4016s or something.
You can hammer down on noise by limiting the bandwidth to as low as you can bear.
« Last Edit: December 06, 2024, 07:48:14 pm by Terry Bites »
 
The following users thanked this post: i509VCB, Sensorcat


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf