Maker Pro
Maker Pro

Trouble understanding shunt resistance for short-circuit current measurement

Neverthelessified

Nov 9, 2016
10
Joined
Nov 9, 2016
Messages
10
So in my circuit I only need one amplifier, which would amplify the voltage drop over the shunt resistance. I am now doing some research regarding which kind of op amp I could use. Is this very important? I was thinking of using a non-inverting amplifier. Can I simply connect the inverting input to the ground (0V) and to negative pole of the shunt resistance voltage circuit, and the non inverting input to the positive side of the shunt resistance voltage circuit? In that case, do I really need to use a differential-input amp configuration (as suggested in one of the above posts) ? Thanks!
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Whilst your idea for how to wire up an op-amp are kinda right, if it is done the way you suggest, the gain will be uncontrollably large. The inverting input needs to be involved with a feedback lop which sets the gain to be what you desire.

Another issue is that the op-amp needs to allow the inputs to be at 0V -- some do not. The linearity of the output near 0V may not be particularly good, but this is not the area that you're interested in, so it's no great problem.

Ob more concern is that you are amplifying a signal of possibly a couple of millivolts. You need to choose an op-amp wisely so that input offset voltages do not cause more error than you can tolerate. If the maximum input offset voltage is less than the resolution of your ADC divided by the gain of the op-amp then your error will be less than the LSB of the ADC.

For example, let's assume you decide on a gain of 100, and use a 1.2V reference for the ADC The resolution of a 10 bit ADC is about 1.2mV, and divided by the gain (100) you get 12μV. So you would want an op-amp with an input offset voltage less than this.

Let me give a good example of an op-amp that is not suitable :) Have you heard of the 741? Here is the datasheet. One really good thing is that on the first page it shows you a circuit for a non-inverting amplifier. But let's look at the problems.

Section 6.5 (Electrical Characteristics) on page 5 is a good place to start. At 25C the input offset voltage is typically 1mV but can be as high as 5mV (and it's worse if you consider a range of temperatures). Typically this is tens of times larger than we can tolerate and the worst case condition would have us off by up to ±400 counts on the ADC (which means the results would be meaningless).

If you look at the output voltage range, it doesn't get within a volt of the negative rail. Again, if we want a value that is at best only a little more than 1V above the negative rail, this is no good at all.

This datasheet does not mention it, but the inputs can't be pulled too close tot he negative rail either. And that means the 741 is not a great option. Another thing in the datasheet, you may have noticed there are several sections for various variants of the 741. Some are better than my examples, but not enough to be usable.

Can we overcome some of these? Yes. Using a dual rail (±9V should be sufficient) and referencing against 0V seemingly eliminates all of the problems other than input offset. The 741 has a couple of pins which can be used to correct the offset, so that seemingly fixes all the problems, right? For the 741A, the input voltage drift is specified as 15μV/ºC. IF (and it's a big if) we could trim the offset to zero, a change in temperature by more than 10ºC would be a limiting factor. This actually isn't too bad, but who wants to adjust the input offset?

Is there anything else...? yes. The 741 has an input bias current that is fairly huge. This requires that the impedance of the feedback loop and that of the input signal be similar so as not to introduce even more input offset voltages. To make these things worse, the two inputs can have significantly different values!

AAAAGH!

If you want to know more about what these input bias and input offset currents are, read this.

Let's look at something at the other end of the scale. I have some AD8572's. Here is their datasheet.

Starting on page 4. The input offset voltage is between 1μV (typ) and 5μV (max). The input voltage range includes both supply rails. The output can swing to within a few mV of the rails. The input bias and offset currents are about a million times smaller.

That is something you could use. However you may not be able to get hold of it, and the comments on why the 741 is so bad are probably more helpful if you want to compare the specs of the op-amps you have available to you.

It is worth pointing out that the AD8572 is a rather special device that internally monitors and corrects its offset. Page 15 of its datasheet describes the magic. Reading further in the datasheet, you will learn how even the most innocuous things can influence your accuracy. However, you're probably not seeking to work at anywhere near the limits of this device.

Earlier in this thread, I mentioned that using an op-amp as an amplifier would open another can of worms. Welcome to the worms.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,889
Joined
Jun 21, 2012
Messages
4,889
As was suggested various times in this thread, I opted for a 4-wire Kelvin measurement. As the datasheet of the resistor shows, there is both a current and a voltage connection, making it easy to wire in such an arrangement.

I think that this should work. Any objections? Thank you!
A minor objection to your choice of shunt resistor. I have used this particular resistor to monitor and control the electromagnetic "focusing" current in a prototype filtered cathodic arc high-vacuum deposition chamber. The resistor you linked to is designed for measuring very large currents, on the order of 100 A or more (depending on the resistance). Use P = I * I * R to calculate how much power your Isc will produce in the shunt for whatever resistance you have chosen. Let's say your cell has Isc = 10 A and the shunt you pick has a resistance of 0.001 Ω. The power dissipated in the shunt will be (only) 100 * 0.001 watts = 0.1 watts = 100 mW, an insignificant amount of power that is easily dissipated to the ambient air. And if, later, you decided to test cell arrangements producing considerably more short-circuit current, this shunt will do nicely. Moreover, the low resistance of 1 mΩ will add an insignificant contribution (compared to relay contacts and associated wiring) to the total series resistance. From that standpoint it is a reasonable choice.

Note, however, that the shunt you selected has a rather poor temperature coefficient of resistance, as much as 60 ppm/°C. If this were my project, I would consider using the Vishay CSM3637 for 4-terminal Kelvin current measurements. This is available with 1 mΩ resistance and ±10 ppm/°C temperature coefficient of resistance over a very wide range (-65 °C to +170 °C) of operating temperatures. Other current-sensing resistors from Vishay can be found on this catalog page, and there are many other vendors linked on this Google results page. Stability is of paramount importance when using a shunt for metrological purposes.

do I really need to use a differential-input amp configuration (as suggested in one of the above posts) ?
Yes, and not just a single op-amp but three op-amps configured in an instrumentation amplifier configuration. The Linear Technology LT1167 is appropriate for your application. Be sure to download and read the datasheet and this application note. If you use 1 mΩ for your current shunt, then at 10 A current the output voltage will be 10 mV. You need to get that up to around 1.1 V to take advantage of the full-scale input capability of the Arduino ADC using the internal 1.1 V DC reference. From this, I assume you are using an Arduino Mega or the European equivalent. You only need a differential gain of about 100 to get an output of 1.00 V from 10 mV input.

The reasons you should use an instrumentation amplifier, as compared to a simple op-amp buffer with gain, are complicated. The main reasons are noise rejection and common-mode voltage rejection. There will be common-mode voltage between your solar cell common and instrumentation common (the two commons should be tied together at a single point) because the short-circuit current flows through the "low side" current return-connection and the resistance of that circuit (which does not include the shunt resistance) creates a common-mode voltage drop that is present on both measuring terminals of the shunt resistor. This is not a constant voltage because it varies with Isc, which in turn is a function of illumination and temperature (among other factors). This common-mode potential must be rejected by your current-measuring instrumentation, and an instrumentation amplifier is purposefully designed to do just that.

Low-level signals, even sourced from very low impedances (your shunt is a low impedance voltage source), are susceptible to noise pick-up from the environment electromagnetically coupling into the sense wires. These wires should be a twisted-pair inside a foil shield, the drain of the shield at the amplifier end only connected to the instrumentation common. A differential measurement rejects these "noise" signals and allows amplification to a higher level signal that is easily shielded and processed.

My only real "objection" is your belief that the "Fill Factor" or FF can be used to calculate the maximum power point (MPP) from the two measurements of short-circuit current and open-circuit voltage. The FF is defined by dividing the MPP (which is found by measuring the I-V characteristic curve of the solar cell) by the product of Voc and Isc, Quoting from this Wikipedia article:
The fill factor is directly affected by the values of the cell's series, shunt resistances and diodes losses. Increasing the shunt resistance (Rsh) and decreasing the series resistance (Rs) lead to a higher fill factor, thus resulting in greater efficiency, and bringing the cell's output power closer to its theoretical maximum.

The FF is influenced by other things besides the effective series resistance of the cell and the shunt (leakage) resistance. It is also influenced by the illumination intensity, diode losses, temperature, and the active area shadowed by electrode structure on the exposed surface of the cell, along with any dust, dirt, condensation or whatever else that may cover the cell. In other words, the fill factor is a function of how the environment and construction of the solar cell affects its MPP.

However, if you measure the MPP over a range of illumination and temperatures, you can use this data to compute a FF for identical illuminations and temperatures for that specific solar cell, assuming the environmental conditions are also identical. By making this record, you should then be able to calculate MPP by measuring just Voc and Isc and correcting with the appropriate (previously determined) FF. I prefer to think of FF as meaning "Fudge Factor" that accounts for the somewhat reduced power you get in a real world situation by computing Voc * Isc. A value of FF = 0.8 is usually "gud enuf" for estimation purposes. And if it stays constant in the field, after perhaps correcting for temperature and illumination intensity, you may get by with using it to estimate the MPP variations among four test solar cells.

However, if it were my job to evaluate solar cells in the field, I would want to acquire the I-V curves for each cell in the field by using a programmable sourcing and sinking power supply. This is all described in a National Instruments white paper (in three sections) that you can read about here. I can appreciate the desire to just perform two measurements of Voc and Isc to speed things along and save money, but then there is science and then there is everything else. The science requires you to determine MPP from the V-I data.

Accurately determining the "fill factor" for devices in the field may be a more difficult a task than you think.

Performing accurate and reliable data acquisition is both a science and an art. Please purchase an instrumentation amplifier and learn how to use it.
 

Neverthelessified

Nov 9, 2016
10
Joined
Nov 9, 2016
Messages
10
Thanks a lot for these two comprehensive replies. They are really helping me to better understand the challenges that I face. Again, I've been researching based on your comments, especially concerning the amplifiers.

First, I should comment on the general procedure regarding the FF and MPP. I fully agree with you hevans1944, the FF is a function of how the environment affects the MPP, and that it can only be computed by first measuring MPP, Voc and Isc. The procedure you mentioned is what I called the "characterization phase": the I-V curves of the cells will be computed over a whole day at different temperatures and illumination intensity. This we must do manually, changing cell after every measurement and repeating the whole set once all cells have been measured (for example, say it lasts 30 min to characterize the population of 20 cells, this would give us a about 20 measurements per cell over the day, enabling to plot the FF in function of the relevant parameters). This gives a measured MPP and thus a computed FF for every pair of parameters (after statistical regression methods being applied).

The fact that this has to be done manually makes it interesting to use these computed FF to compute the MPP's at shorter interval times during the main experimental phase, in which these same characterized cells are used to compare different concentration/tracking strategies, by only measuring Voc and Isc with the Arduino - keeping environmental conditions as similar as possible (desertic environment, cooling for shunt resistance, sensing of cell temperature and irradiation...).

For the amplifier. Thanks a lot for the great job in introducing the main challenges I should be aware of I believe that I'm now a bit more familiar with op-amps, their main specs and the configuration as an instrumentation amplifier.

So basically, I have 2 choices:
-either use an op-amp such as a AD8572 with a very small input offset voltage, a good input voltage range, an output which can swing within small voltages of the rails and a small input bias and offset current.

-OR (better?) use an instrumentation amplifier which rejects the noise and the common-mode potential. I
unfortunately didn't fully understand the issue with the common-mode voltage drop. In the diagram I imagined/drew, I would connect the cells the the ground but VIA the common shunt resistor. Does " common-mode voltage between your solar cell common and instrumentation common" simply mean that the shunt and the negative power rail of the amplifier (instrumentation?) should be connected to a common ground? I didn't quite understand the issue that would pop up from that and how the instrumentation amplifier could solve it.

Anyway, the second option seems more accessible since it doesn't require me to find the one specific suggested amplifier. Instrumentation amplifiers seem more accessible and not harder to use (since they come as integrated circuits) - right?

Thank you!
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,889
Joined
Jun 21, 2012
Messages
4,889
Your test strategy seems very reasonable, especially the initial characterization phase. Don't forget to repeat the I-V characterization at the end of your field tests, just to confirm that none of the cells has drastically changed as a result of exposure to the environment and whatever effects the Isc tests (however brief they are) might have. The results of the I-V plots should be identical before and after the field tests, within the limits of statistical error... assuming of course there are no systematic errors introduced by the test paradigm.

Common mode signals are almost unavoidable if the measurement instrumentation is remotely located from the sensor. The magnitude of the common mode signal is strongly influenced by how the signal wiring is connected and shielded. In simple terms, any signal that appears on both the desired signal's source terminal and the desired signal's return terminal is a common-mode signal. It is very easy to unintentionally convert this common-mode signal into a differential signal at the sensor terminals, and this then adds to the desired sensor signal you want to measure. Normally all this occurs at low levels, before the desired signal is amplified, but it is not unusual to find common-mode signals that are two or three orders of magnitude larger than the desired signal. Not even the best instrumentation amplifier will completely reject all common-mode signals, but the best will attenuate them to acceptable levels.

The best strategy is to use a properly connected instrumentation amplifier and wiring practices that minimize common-mode signals. If you do both of these things, the results will usually be satisfactory. Some things are just impractical though. For example, if you were to place your current-measuring shunt in the high-side output of the solar cell (or solar cell array, if two or more cells are connected in series), then the PV output of the solar cell or solar cell array becomes the common-mode signal you would have to somehow ignore or suppress to make the current measurement. Not impossible perhaps, for just one cell, but leakage paths and common-mode voltage limitations quickly become a potential problem (no pun intended). Best to place the shunt in the low-side, close to the instrumentation ground potential, and minimize the common-mode potential.

When you introduce a shunt resistor in the return lead of a solar cell, there will be current in the "low side" terminal of the shunt back to the low side of the solar cell. This current flows through a finite (although usually small) resistance on its way back to the solar cell and produces a common-mode potential with respect to the low-side terminal of the solar cell. Since you also need to also measure the Voc of the solar cell, it would make sense to connect the instrumentation common to the low side of the shunt. Theoretically there will be no effect on Isc measurement from the common mode voltage because the instrumentation is measuring directly across the shunt resistor, and by definition, the signal it measures is the differential voltage across the shunt. When you measure Voc, there is no appreciable current in the solar cell return lead, so the common-mode voltage goes away too and has no influence on this separate measurement either. That's in a perfect world.

In the real world, there will be some distance between the measurement points and the instrumentation performing the measurements. This distance will be bridged with lengthy wires possessing distributed resistance, inductance, and capacitance, all susceptible to external influences that can create common-mode voltages. There are myriad factors that contribute to spoiling the perfect world. The instrumentation amplifier tames most of them, and proper wiring and shielding usually takes care of the rest. But the ONE thing I like most about a good instrumentation amplifier is the ability to set its gain (amplification factor) with just a single resistor, or perhaps a single fixed resistor in series with a smaller trimming potentiometer (wired as a variable resistor or rheostat) if you need to tweak the gain to match the full-scale sensitivity of an analog-to-digital converter. With higher resolution ADCs, even gain adjustment become unnecessary, because you can scale the results in software with a little math and ignore a few of the lesser significant bits in the answer.

Buy or build? Many years ago I was given the task to build the "best" possible instrumentation amplifier I could. The task took many weeks and a lot a research (I was "just" a technician then, going to night school to earn an engineering degree) but I was successful. I later found out the task was a test my boss dreamed up to find out how clever I was. Point is: you can buy very good instrumentation amplifiers or you can build (with a lot of effort) really great instrumentation amplifiers. A good engineer knows which route to take based on requirements: cost, time, performance. There is so much good stuff available today at reasonable cost that I wouldn't dream of "rolling my own" even if the parts to do so were free... unless I needed one "right now" and all I had on hand were some cheap op-amps and box full of assorted resistors.

Being retired, my time-cost is nil money-wise, but obtaining parts still costs real money. Your project probably has a budget, so unless you just want to educate yourself, buy something off the shelf and spend your valuable time somewhere else. Be sure to test your instrumentation amp for common-mode rejection ratio. A 90 db CMRR is fairly easy to obtain and will probably work with your shunt given proper connections and shielding. Buy a couple or a dozen LT1167 instrumentation amplifiers to "play" with and give it a go. These work best with bipolar power supplies, say, ±5 V or so, but single-ended +5 V circuits are available too. They have a pretty good PSRR rating too, so regulation is not as important as having filter capacitors soldered closely between the power terminals and circuit common. One to ten microfarad tantalums are good for this. If you have a really BIG budget, the National Instruments stuff I referenced in post #23 will do all you need to do in almost no time at all.:eek:
 

Neverthelessified

Nov 9, 2016
10
Joined
Nov 9, 2016
Messages
10
Thanks a lot for being so generous with your time and knowledge.
I think I got the common-mode signal issue now! Again I did some more research and testing before coming back to post. First, I should mention that the budget is extremely limited - virtually 0 except the available material, which include simple amplifiers, resistors, the precision power-resistors which i mentioned in on of the previous posts, the microcontroller, wires, relays etc. It might be possible to acquire a relatively cheap instrumental amplifier, but before I should make a first prototype with the existing material. So I started wiring things up. I attached a diagram which I followed to build my instrumentation op-amp. There is a 4th op-amp in the circuit which of which the non-inverting inout is connected to the output of a trimmer, in an attempt to compensate for the voltage offset. I built this with a simple and cheap LM324N and replaced all resistors (except the gain resistor) by 33kOhm resistors. Also, I omitted the capacitor which I thought was not necessary (?). The amplifier seems to work, but I now have to better calibrate the offset voltage. To do this, I was thinking of determining the actual gain (not the theoretical which I of course already know), by taking lots of pairs of measurement (V1/Vout) and get the slope of the obtained curve. Then, I could adjust the trimmer of the 4th op-amp to cancel out the voltage offset, hoping that the voltage offset is linearly proportional to the input voltage. If this is not the case, I definitely can't use this system.
I hope that I can get reasonable results with this method. If not, I believe it might be wise to indeed invest in an instrumentation amp. hevans1944, you suggested the LT1167. I found a cheaper and locally accessible alternative, which might fit my purpose: the AD623ANZ. It says "90 dB minimum CMRR (G = 10); 70 dB minimum CMRR (G = 1) at 60 Hz, 1 kΩ source imbalance".

What do you think, should I definitely go with an integrated circuit for the instrumentation amp?


Instrumentation_amp_diagram.jpg

Instrumentation_amp_circuit.jpg
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
One issue you may have is that the resistors in instrumentation amps should be very close tolerance devices.

If you have a large number of these resistors, measure lots of them and choose those with resistances which cluster closely together. The exact resistance matters less than how close they are to the same value.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,889
Joined
Jun 21, 2012
Messages
4,889
The Analog Devices AD623 series is a suitable commercial instrumentation amplifier. I would definitely use this integrated circuit. You can learn a lot trying to build the three op-amp version, but it is not easy to build one that works well. See discussion below.

First, the two input op-amps are basically configured as unity-gain, non-inverting buffer amplifiers, if you ignore for a moment the presence of R3, the gain-setting resistor. To do their job of creating an amplified differential signal to present to the third op-amp, these two op-amp circuits must be identical in every way, in particular with respect to gain-bandwidth product and slewing rate. The capacitor, C1, destroys that symmetry. Either leave it out, or add an identical one in parallel with R2. Problem is, it is very difficult to actually find two identical capacitors. Failure to do that will decrease the CMRR (Common-Mode Rejection Ratio) possible with the three op-amp instrumentation amplifier circuit. Best to leave both capacitors out of the circuit.

Second, the gain-setting resistor R3 allows a differential input to be amplified and appear as a differential output between U1A and U1B provided R1 and R2 are closely matched. That is not particularly useful unless you happen to require an amplified differential output signal. What you normally need is a single-ended output signal referenced to circuit common. That is the function of R4, R5, R6, R7 and op-amp U1C. In some circuits this stage can also be used to provide some additional gain, but normally all four resistors are exactly the same value. If this condition is obtained, the third op-amp will reject common-mode voltages applied to signal inputs V+ and V-. If the resistors are not exactly matched, some of the common-mode voltage will be converted to a differential signal applied to the inputs of U1C. This conversion will be indistinguishable from the differential signal between V+ and V-. In other words, part of the common-mode voltage will appear superimposed on the desired (amplified) differential input voltage.

Third, the use of a fourth op-amp connected as a unity-gan buffer to create a low-impedance offset controlled by RV1 is not generally necessary. If you do this, the circuit shown has an offset adjustment range of 0 to +5V when what is usually necessary is a range of a few millivolts. If well-matched resistors and low-offset op-amps are used for U1A, U1B, and U1C, the off-set voltage from U1C should be only a few millivolts. If this needs to be reduced further, you should use a voltage divider in series witn RV1 to allow perhaps a 0 to 10 mV adjustment range. Almost every off-set adjustment circuit I have seen introduces its own problems of noise and sensitivity to temperature. Best to avoid off-set adjustments if you can remove off-set outputs in software after analog-to-digital conversion.

Fourth, the resistors you show in the photograph of the solderless breadboard are only 5% tolerance (gold band). As Steve mentioned in post #27, the resistors have to be closely matched. Even 1% tolerance resistors do not provide a close enough match to preserve the CMRR possible with the three op-amp instrumentation amplifier. Either measure and hand-select to obtain equal values from a large batch of resistors, or use a commercial instrumentation amplifier whose manufacturer uses laser-trimming of the resistors to meet a specified CMRR specification. It is extremely important that R4, R5, R6, and R7 be very closely matched in value. It is also important to match the values of R1 and R2.

How well did your breadboard circuit perform? If you can connect the V+ and V- differential inputs together and drive them from a 0 to +1V with a low-impedance variable voltage source, and NOT see any change in the output of U1C with a gain of 100 or so, you have done well.
 

TedA

Sep 26, 2011
156
Joined
Sep 26, 2011
Messages
156
It seems to me that you need to review your functional requirements for the entire system, create a "specification", and possibly a high level block diagram, before you become too deep in worrying about resistor precision, IC selection, and other circuit details that might not even apply to solving your actual problem.

If you could do this, and share the information here on the forum, the help you get could be more useful.

I realize that the system's over-all shape is dependent on how it can be implemented, but we are missing essential information about the basic requirements. I expect that the design and specifications will evolve to better fit your needs, but we need a concrete starting place.

It would be helpful to know things such as how many cells or panels are to be monitored at once, the accuracy required in your measurements, and the expected cell characteristics.

Key considerations would include how close to zero volts across the cell you must have for your short circuit measurement. If 100mV is good enough, the measurement circuit can be much simpler than if you need something closer to 100uV. The curves posted earlier indicate that 100mV may be perfectly good, since the curves have no slope between 0V and hundreds of mV.

Of course, I can't help but get involved in the discussion in recent posts about circuit design. The LM1458/LM324 circuit is more complex than you need for this project. Just the part of this circuit using pins 8, 9 and 10 of the quad op-amp will provide a differential amplifier that's good enough. The impedances of your signal sources are low, so the simpler circuit will do the job. Resistor values can be adjusted to provide some voltage gain.

As already pointed out, once you have some computing power available, your measurement accuracy depends mostly on the stability of the gain. Zero error and initial gain error can be calibrated out. It will be prudent to adjust your zero levels each measurement cycle. Voltage gain can also be easily checked every cycle.

Ted
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,889
Joined
Jun 21, 2012
Messages
4,889
Ted, I agree with most of your post. The OP must define his project in greater detail and specificity with regard to measurement accuracy and test protocol. At a former employer, we would spend months detailing every aspect of our field operation. This included contingency plans if something were to go wrong. It is very difficult to make corrections or obtain forgotten items (usually spares) in the field. Most of our deployments had very specific time windows in which data collection had to occur, because the flight path of the overhead sensor platforms for which we were providing "ground truth" data could not be easily changed. We had to get it right the first time every time.

I would hesitate to recommend just the four-resistor differential-to-single-ended circuit to anyone, especially a newbie to field data acquisition. There are just too many ways to screw it up if you don't know what you are doing and there is any appreciable distance separating the shunt resistor and the data acquisition system input. The two op-amps preceding it are there to provide a very high input impedance, both for differential and common-mode signals, as well as a low source impedance for the balanced bridge that converts their differential outputs to a single-ended signal. As mentioned in other posts, it is not easy to make a stable, balanced bridge, insensitive to real-world variables such as temperature and vibration. Putting everything on one integrated circuit die pretty much solves most of the problems a discrete component design experiences.

OTOH, one could mount the signal conditioning circuit in close proximity to the shunt (like right on it), power an op-amp with a small replaceable battery, and get away with just one op-amp for gain. The battery isolates any common-mode signals that could/would occur, so an instrumentation amplifier is not needed, just either an inverting or non-inverting op-amp circuit with a gain of about one hundred. I think I would try a non-inverting buffer circuit, 1 kΩ from inverting input to common and 99 kΩ from inverting input to output for a gain of 100. Mount that puppy right on top of the shunt, along with one or two 3V lithium coin cells. Connect the voltage sensing terminals of the shunt between the non-inverting op-amp input and circuit common. Connect the now high-level output of the op-amp and the circuit common to a twisted pair of shielded wires, connected at the far end to the Arduino data acquisition system, connecting the shield only to the Arduino analog common, and leaving it disconnected at the op-amp end of the cable. Dirt cheap solution, but it does require changing out the battery ever so often.

And I agree a block diagram and maybe a field installation map (or sketch) showing distances and locations of solar panels, the shunt (or shunts, if more than one), power source(s) and data acquisition system would be helpful.
 

TedA

Sep 26, 2011
156
Joined
Sep 26, 2011
Messages
156
Hop,

I think I was agreeing with you that designing an elaborate instrumentation amplifier is not the best plan. If you want to use an LM324, better stick to applications where a simple circuit will work well enough.

Getting a breadboard amp working can be very educational, though. Learning about this stuff may be a major objective.

Again, it seems to me that we need to know more about this project before we can offer really useful help, though it's interesting to speculate.

At least the thread hasn't yet been shut down because the OP might possibly suffer from sunstroke while implementing his project.

Ted
 

Neverthelessified

Nov 9, 2016
10
Joined
Nov 9, 2016
Messages
10
Hi all, thanks again for being so supportive. I'm uploading here one block diagram explaining the procedure and what the system must do, and a circuit diagram as an possible way to implement this. 100mv across the solar cell would indeed be perfectly fine for this application, even 150-200mv wouldn't influence the current output that much.

The Analog inputs A0 to A3 are used to measure Voc, and A4 is used to measure the voltage drop over the shunt, thus Isc.
Here are the diagrams, I hope it's possible to read them:

Block Diagram.jpg

Diagram.jpg
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,889
Joined
Jun 21, 2012
Messages
4,889
Looks okay. Be sure to test the hardware and the software before carting it out to the field. Take along a few spares.
 

TedA

Sep 26, 2011
156
Joined
Sep 26, 2011
Messages
156
Thanks for posting your diagrams. Cause some eyestrain, but convey the information.

There are some problems with the circuit that will keep it from working at all. And of course, I have suggestions that may or may not be helpful. I expect others will chime-in.

The four ADC inputs for voltage, A0 - A3 are all connected together.

The amplifier for the current shunt needs some work. The lower end of the shunt should go directly to ground. Rg should run from this ground to the inverting input of the amplifier. Then Rf and Rg set the gain of the resulting non inverting amplifier.

It might be wise to add one more resistor between the non inverting input and the top of the current shunt. Make it the same value as Rg. If these input resistors are a few k ohms in value they will help protect the inputs from transient voltages. If they are the same value, they may reduce offset errors, depending on the op-amp used.

Did you intend for the cells to be shorted when the relays are off? That is, most of the time? How would you make an open circuit measurement?

Some suggestions:

Make the shunt resistance larger. If the measurement will still be good with 50mV to 100mV across the shunt, getting a clean amplified signal for the ADC input will be much easier. Less of your dynamic range will be used-up allowing for possible zero errors. 0.010 to 0.025 ohms might be good.

Consider grounding the negative terminals of the cells and switching the positive ends. In part because there are sometimes stray fields out in the real world, and a nice ground may save your bacon.

Consider using power FET transistors in place of the relays. 0.005 ohm on-resistances are easily had. If you decide you need to vary the load on the cell to find the actual Pmax, or to plot the curve for E vs. I, The same FET can help you do this. An analog multiplexer can be used to select and drive the FETs. (It seems a shame not to gather as much data as you can.)

If you decide to measure the cell voltage under load, analog multiplexers can route the correct cell voltage to a single differential amplifier on the way to one ADC input. CMOS multiplexers work really well.

If your ADC inputs are unipolar, you will want to introduce a small (5%?) offset into your amplified signals to assure a positive value at the ADC input. Otherwise you will not be able to cancel zero errors if they go the wrong way.

Ted
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,889
Joined
Jun 21, 2012
Messages
4,889
Thanks @TedA for taking a closer look. Lots of things wrong with the diagram, but you appear to have covered it. Sorry, @Neverthelessified, I wasn't paying close enough attention when I said, "Looks okay."
 

Neverthelessified

Nov 9, 2016
10
Joined
Nov 9, 2016
Messages
10
Thanks a lot for your comments.

I've updated the circuit diagram, which can be found below. Indeed the voltage ADC inputs were all connected, which is now not the case anymore because they are placed between the cell and the switch, which is now placed on the positive side of the cells.

Updated_diagram_Voc_Isc.jpg

I also changed the OFF position of the relay. In the previous diagram the relays were change-over relays, which I intended to represent as normally connected to ground, and closing the circuit when the relay is charged. I did this because I thought that the open-circuit voltage should be measured between the positive side of the cell and a ground connected directly to the negative side of the cell (without any component connected in series) - however I now think that the shunt resistance between the ground and the cell does not influence the open circuit voltage since no current is flowing through the shunt when the circuit is closed. So now I think that a normally open relay is what I need, instead of a change-over relay switching to ground.

To make the open-circuit measurement I can thus simply read the voltage of the voltage ADC pin of the cell which I'm interested in, with all relays opened and with respect to ground (connected to the negative side of the shunt resistance, which plays no role when the circuit is open). As can be seen on the diagram, I also changed the position of the shunt resistance. It didn't make much sense before because I created a short-circuit for the cell without forcing the current through the shunt resistance!


Concerning the value of the resistance: indeed, using such a small resistance may bring in quite some errors. I have 8 of these power precision resistors available. For this reason I'd like to use them. If they were normal 2T resistors I would be confident in putting these in series to obtain 0.008 Ohm. However, can I also do this with 4-wire Kelvin resistors? I added a diagram to share my guess of how I could connect them, but I don't fully trust it. I represented the 4-wire resistors with rectangles which look like lego blocks, because that's how they look like in reality and it helps to show the connections.

4-wire-in-series.jpg

The offset is also a good idea in order to be sure to have only positive values. However, I wouldn't know how to do this with an amplifier. But I will look it up on internet to find out.


So the suggestion to switching to FET transistors is mostly in order to be able to vary the load and get the IV curve, right? If I don't do this I can stick with the relays, right? I'd like to keep it relatively simple for now, and once I have a working prototype I can improve it. Or is it definitely better in this situation (switching occurs only once per minute approximately) to use FET transistors?

Many thanks!
 

TedA

Sep 26, 2011
156
Joined
Sep 26, 2011
Messages
156
This is better!

The mechanical relays will work, but might be more costly, and less versatile. When driving a relay from a solid state device, you need to add a snubber across the coil to avoid excessive voltage across the coil on turn-off. A simple diode across the coil usually works. Be sure to keep the relay coil current out of your analog measurement circuits! Use a separate power and ground system for the digital control circuitry.

The array of current shunts will sort-of work, but the accuracy of the array will not be as good as that of a single shunt. With such a low resistance value, the resistance of the terminations and connections will be significant, and less stable, than the resistance of the shunts themselves. OK for proof of concept, perhaps not a good idea for actual use.

Chopper stabilized amplifiers can make the lower shunt resistance work, but may be fussier to work-with, and not already reside in your parts stash. They have become inexpensive, though more $$ than an LM324.

If you want to measure the cell voltage under load, you may need to take a differential measurement with connections right at the cell. The wiring and connections may have enough voltage drop to matter.

How this system is wired-up is very important; a simple schematic does not convey how the wiring and connections should be arranged for maximum accuracy.

You can introduce a small offset in the current signal to the ADC by connecting a resistor from the non-inverting input of the op-amp to a positive voltage. Relatively large value resistor, stable reference voltage.

Ted
 
Top