# Trying to make a constant current source with Opamp [SOLVED]

#### anishkgt

Joined Mar 21, 2017
537
Hello All,
I am trying to make a jig to measure the voltage drop on a 4 AWG weld cable to determine its resistance. What i have in mind is to supply a constant current on the cable and measure the voltage drop at either ends. In the simulation when i reduce the 'Load' resistance between 1 to 3 mOhm while keeping the Rsense constant at 7.641Ohms the current stays constant.

To measure a weld cable more amps would be needed to see a resonable voltage drop so i change the value of the Rsense and everything goes crazy. What am i doing wrong here.

#### Attachments

• 1.4 KB Views: 29

#### crutschow

Joined Mar 14, 2008
25,991
What am i doing wrong here.
For normal operation the drain of an N-MOSFET should be more positive than the source.

Last edited:

#### anishkgt

Joined Mar 21, 2017
537
Oh stupid me. Thanks

#### anishkgt

Joined Mar 21, 2017
537
Rite so here is what i think i would get.

The opamp here subtracts the supply voltage from the voltage seen at the mosfet's drain to get the voltage drop of the load. The voltage is off by a couple of mV at the 'ADC'. I could add a trimpot and adjust it. Is there a better way to accomplish this task ?

Unlike the earlier one, the AD8675 has good precision that i am looking for but the price is 3$. are there any equivalent spec'ed ones. #### Attachments • 2.1 KB Views: 12 Thread Starter #### anishkgt Joined Mar 21, 2017 537 One with constant current with load varying from 1 to 4mOhm #### crutschow Joined Mar 14, 2008 25,991 Unlike the earlier one, the AD8675 has good precision that i am looking for but the price is 3$. are there any equivalent spec'ed ones
Possibly, but you'll need to do a search to find them.
Mostly, the cost of an op amp is proportional to its precision.

Possibly just easiest to add a pot to adjust the current and calibrate out all the circuit tolerance errors.

#### anishkgt

Joined Mar 21, 2017
537
Last edited:

#### anishkgt

Joined Mar 21, 2017
537
Besides the slewrate, what other parameters should i be watching out for ?

#### crutschow

Joined Mar 14, 2008
25,991
Besides the slewrate, what other parameters should i be watching out for ?
Since this is a low-frequency application, slew rate or frequency response are not significant parameters of interest.
The main parameter for DC accuracy is input voltage offset.

Last edited:

#### ci139

Joined Jul 11, 2016
1,696
Last edited:

#### anishkgt

Joined Mar 21, 2017
537
Thank you @crutschow i've decided to go with the TSZ122IDT has a typical an offset of 1uV
Those notes were handy, thanks @ci139

#### crutschow

Joined Mar 14, 2008
25,991

#### anishkgt

Joined Mar 21, 2017
537
Thanks missed that. The MAX44251 is rated 2.7-20v with an offset voltage of 3uV guess that offset would be fine. can't find a better balance between price and offset.

#### crutschow

Joined Mar 14, 2008
25,991
What's the maximum current you want?

#### anishkgt

Joined Mar 21, 2017
537
The max current for the weld would be between 800A to 1500A. Doing the schematic, would it be ok to drive the MOSFET driver via the opamp this way using a BJT to trigger it via the microcontoller ?

#### anishkgt

Joined Mar 21, 2017
537
Managed to keep it at 1kA assuming that the weld cable is 1.5mOhm. Haven't considered the pcb trace and others in the path. Not sure if the opamp can be switched with a BJT.

#### ci139

Joined Jul 11, 2016
1,696
the mosfet drivers seem to be a "jewel find"
Electrical Characteristics: Unless otherwise indicated, TA = +25°C, VDD = 5.0V, VSS = GND, VCM = VSS, VOUT≈VDD/2, VL=VDD/2, and RL = 10 kΩ to VL
Common-Mode Input Voltage Range VCMR -0.3 min 3.7 max V
Output Short Circuit Current ISC ±20 mA $$\leftarrow$$ driving fast 6x 25pF = 150pF (Pg.2) ... RL never specified under 10k
Slew Rate SR 2.3 V/μs $$\leftarrow$$ although the input mosfet and Schmitt make the edge sharper your undetermined timing is somewhat 1µs range

you could ask Microchip for the capabilities/substitute of the MCP6L1
, also a while (some years) ago there still were old folks active in https://cr4.globalspec.com/

Last edited:

#### anishkgt

Joined Mar 21, 2017
537
Thank you @ci139. For now i've decided to go with the MAX44251. Once i have the prototype ready and get it working the way i want then i will start consolidating the BOM that includes cutting down on components and making compromises on the cost to precision. Still optimistic if the above opamp would be able to drive the drivers when microcontroller sends a pulse.

#### anishkgt

Joined Mar 21, 2017
537
One the way i found this good site that calculates resistance based on lenth and cross-sectional area.

Last edited:

#### sparky 1

Joined Nov 3, 2018
401
Making it yourself and using a mosfet with a good heat sink can give very impressive performance.

Looking at the LM317 configured as an adj voltage regulator the darlington is placed into the feedback loop.
By comparing the functional block diagram 8.2 page 9 to precision the current limiter figure 9.3.3 that is how I built my first op amp current control.
This finally made sense the output to the zener's base.