Nanoamp current source troubleshooting - Page 1
Forum section: electronics / beginners

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: April 11, 2019, 06:41:20 am
content: I built a simple nanoamp current source.Op amp is the MCP602. The circuit runs on 3VDC.I have attached the circuit diagram, R7 is the load through which I measure the current.Instead of V2 I have used LM4041 For the reference, its a 1.225V fixed reference. The series resistor for the reference is 22K (not shown in schematic).The input at the voltage divider node R8/R9 shows around 12mV in both LTspice and the practical circuit. However when I check the output voltage across the load the real world circuit shows around 130uV while LTspice shows 13uV?What would be the cause for this anomaly?

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: April 11, 2019, 08:05:28 am
content: So here are the different voltages LTSpice vs PracticalMCP602Vout 6.95mV 693uVVin- 136mV 659uVVin+ 1.12mV 556uVVref 1.224VVref div 11.96mV 12.117mVVL 133uV 13.3uVThe first column is the practical circuit and the 2nd column is LTSpice. For some reason the Vin- and Vin+ is showing a huge variation. Probably due to the multimeter leads.

author: exe
author_rank: Unknown
timestamp: April 11, 2019, 01:25:59 pm
content: I'd try a bipolar power supply for your opamp. The output may not be able to swing that wide. Or, you can increase R4 or add a diode to increase required voltage drop.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: April 11, 2019, 01:46:31 pm
content: Quote from: exe on April 11, 2019, 01:25:59 pmYes I thought so too, but I guess the MCP602 is a single supply opamp. Also when I check the datasheet of the Op-amp the Common mode input range isMin: Vss- 0.3Max: Vdd-1.2So I think the operating range should fall within the spec of the Op-amp.I am powering the op-amp using a 3V supply.I didn't get the part of increasing R4 or adding a diode?

author: exe
author_rank: Unknown
timestamp: April 11, 2019, 02:08:56 pm
content: Quote from: ZeroResistance on April 11, 2019, 01:46:31 pmThe input may be fine, but output is not. You are asking your opamp to swing down to less than 1mv to ground. I never seen an opamp that could do that. So, my theory is, you want impossible from opamp. Solutions: 1) bipolar supply 2) move operating point so that output is within the range of opamp capability. So, if you increase R4 then for the same current output should be higher, right? If not, then forget this suggestion. Same with diode, if you place diode on output, then opamp will have to raise the output further away from ground to "overcome" additional dropout. Dave has a video about these technique, in this video:

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: April 11, 2019, 03:45:46 pm
content: Quote from: exe on April 11, 2019, 02:08:56 pmSeems like you are on the dot here.Don't know how I missed that

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: May 03, 2019, 02:24:29 pm
content: Quote from: exe on April 11, 2019, 01:25:59 pmWould it be possible to use the existing opamp MCP602 which is not bipolar and shift the operating point to VDD/2 so that the opamp operates at the center of the supply rails ?

author: exe
author_rank: Unknown
timestamp: May 03, 2019, 03:44:49 pm
content: Quote from: ZeroResistance on May 03, 2019, 02:24:29 pmShort answer is yes. The thing is, division between bipolar and non-bipolar opamps is... sort of artificial. An opamp doesn't care about power supply at all as long as input/output within the range of what the opamp can do. So, bipolar power supply just offsets the input signal to make it within the range (from opamps point of view) and extends output range. So, when adding, say, -3V supply to opamp, for opamp the input signal becomes shifted by +3V. May be I'm not the best to explain this, try watching some youtube videos, they should be better at it.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: May 04, 2019, 06:06:02 am
content: Ok so I changed the circuit to use dual supply's but after this the circuit does not respond well to when I change the input voltage? It does respond well to changes in output load, it keeps the current constant there.But when I change the Input voltage from the reference the current does not linearly increase?

author: mvs
author_rank: Frequent Contributor
timestamp: May 04, 2019, 07:48:26 am
content: Quote from: ZeroResistance on May 04, 2019, 06:06:02 amIt should be linear. But linear means in general casef(x)=a*x+band your b is not zero.MCP602 has +/-2mV input offset voltage. It is around +/- 45nA of output current in this schematic.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: May 04, 2019, 08:31:35 am
content: Quote from: mvs on May 04, 2019, 07:48:26 amWoah! +/-45nA is huge! I am practically trying it out with an LMC662 and that has a offset voltage like 6mV!!Also caught an error in the schematic the lead R7 had to be 1Meg i have entered 1M and Ltspice considers that as milli

author: mvs
author_rank: Frequent Contributor
timestamp: May 04, 2019, 10:34:36 am
content: Input offset voltage is more or less constant, so you can try to add correction and calibrate it out.Or you can use chopper stabilized opamp (Zero-Drift, Auto-Zero, etc) like MCP6V* series.

author: Kalvin
author_rank: Super Contributor
timestamp: May 04, 2019, 01:41:38 pm
content: In this particular case where using a battery, it is possible to introduce approx. 200 mV offset voltage between the signal ground and the negative power supply using a simple  diode.Without the offset voltage created by the diode, the rail-to-rail op amp will not be able to swing its output all the way down to the signal ground. However, introducing the diode, the negative power supply is now about 200 mV below the signal ground and the op amp is now able to swing its output down to signal ground potential without difficulty.Although the signal reference ground will have some ripple (60mV in this particular case) relative to the op amp's negative power supply even with the 10uF bypass capacitor, the typical power supply rejection ratio (PSRR) of an op amp will be able to take care of this "problem". Similarly, any temperature effects introduced by the diode will be attenuated by the op amp's PSRR.Br,Kalvin

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: May 04, 2019, 04:02:39 pm
content: Quote from: Kalvin on May 04, 2019, 01:41:38 pmI had done something similar and tried it out practically, with the LMC662, based on whatexehad suggested above. Basically he said to insert a diode in series with the load so that the op-amp works extra and is forced to raise the output above 0.7V, above its output swing limit of 0.1V, however I found something interesting in the datasheet.The output swing seems to be load dependant and seems to go as high as 0.7V when the load is 600ohm or so. Pls have a look at the attached image.I inserted a 1N4148 diode, and then 2 and then went upto 4 in series to mitigate this issue. However I found that at loads above 100K to 1Meg, the circuit wasn't performing well, I sort of thought that well the diode wasn't able to conduct at these low currents, and gave up on the idea. But I may well be wrong.

author: exe
author_rank: Unknown
timestamp: May 05, 2019, 08:04:25 pm
content: Quote from: ZeroResistance on May 04, 2019, 04:02:39 pmTo me it looks like Vmin and Vmax are swapped in the datasheet. Anyway, that's expected, as there is a current limiting resistor. The more current you draw, the more dropout there. But it shouldn't be a problem when there are nanoaps.Quote from: ZeroResistance on May 04, 2019, 04:02:39 pmDid you check on a real circuit, or in a simulator?

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: May 06, 2019, 08:34:40 pm
content: Quote from: exe on May 05, 2019, 08:04:25 pmI checked in a real circuit.My next step is to connect a bipolar supply to it. Hopefully I won't run into any issues.

author: exe
author_rank: Unknown
timestamp: May 06, 2019, 09:33:00 pm
content: If it's a real circuit you can measure current and voltage drop on diodes, as well as opamp output voltage swing.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: May 09, 2019, 01:17:23 pm
content: Quote from: Kalvin on May 04, 2019, 01:41:38 pmI built the circuit as suggested. And then connected another 2 stages across, the load 1 a unity gain buffer and then a 100 gain non-inverting amp however at the final output I can see 50Khz noise, this noise seems to be riding on the dc signal, around 200mV p-p. My input is a 20mV dc signal.I was hoping to get some mains noise instead I end up with 50Khz noise.Circuit is powered by 6V battery and op-amp is LMC662

author: exe
author_rank: Unknown
timestamp: May 09, 2019, 01:58:45 pm
content: Quote from: ZeroResistance on May 09, 2019, 01:17:23 pmDid you put compensation? Without compensation network it may not work stable as each element in feedback loop creates a delay. Delay == phase shift. May be at 50KHz phase shift is 180 degrees.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: May 09, 2019, 02:14:56 pm
content: No I didn't put any compensation. Do I need to put in compensation for the 100 Gain amplifier?

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: May 09, 2019, 02:38:37 pm
content: Quote from: exe on May 09, 2019, 01:58:45 pm1. Would decoupling caps do the trick? I didn't bother to add decoupling since it was battery powered.2. I thought that heavy capacitive loads on the op-amp output is one of the factors that cause unstability. However I don't have any load here except a scope probe.

author: Kalvin
author_rank: Super Contributor
timestamp: May 09, 2019, 05:50:12 pm
content: Try adding a 1 uF ... 10 uF capacitor in parallel with the BAT54. The capacitor will keep the ground reference stable and reduce noise. While you are at it, add 100 nF ... 1 uF capacitors across the op amps' U1, U2 and U3 power supply pins (although the circuit is battery powered) which will reduce noise in the power supply and reduce noise coupling in the circuit.You can try to tame the oscillation further by adding a small capacitors (1 nF, for example) across U1's and U3's In- and Out. Just check with simulator that the circuit is still stable and performs as you expect. Tweak the capacitors as necessary in the real circuit.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: May 09, 2019, 08:21:40 pm
content: Quote from: Kalvin on May 09, 2019, 05:50:12 pmI add a 22uF cap across the schottky but didn't make any difference.The 0.1uF decoupling made lot of difference and the 50Khz noise seems to have diminished now I get spikes at the output at 10ms intervals.Please see attached.

author: Kalvin
author_rank: Super Contributor
timestamp: May 10, 2019, 07:20:21 am
content: 10 ms equals to 100 Hz, so your circuit is picking up some noise from the rectified 50 Hz mains.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: May 10, 2019, 07:32:20 am
content: Quote from: Kalvin on May 10, 2019, 07:20:21 amI have a laptop next to the circuit but that's again not connected to mains but running on battery. I can see the noise even on the input. Is there a way to reject the power supply noise?

author: Kalvin
author_rank: Super Contributor
timestamp: May 10, 2019, 08:04:13 am
content: If you have a light dimmer or similar nearby, the circuit wiring might act as an antenna and pickup the rectified 50 Hz mains from the dimmer (100 Hz ie. 10 ms).

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: May 10, 2019, 08:24:56 am
content: Quote from: Kalvin on May 10, 2019, 08:04:13 amExcellent suggestion, I have a light dimmer at a distance of 2 feet but its load is switched off, and there are other light dimmers about 4 to 5 feet away.I guess the best way to circumvent this is by using proper pcb layout correct? I have built the circuit on a dotter board, not the ideal scenario for a low noise circuit. Having said that can I add any external components to qwell that noise?

author: Kalvin
author_rank: Super Contributor
timestamp: May 10, 2019, 08:36:35 am
content: Place the circuit inside a metallic cookie jar. Just make sure you have some insulation so that the circuit nor the battery won't short-circuit. Make holes for input and output signals/connectors and possibly a battery on-off switch. If you have some common-mode chokes at hand, you may also want to experiment with those whether they will help with reducing the noise. Anyway, I would first try the metallic container. And you will have some cookies, too