Hey guys, I have trouble making my project work. It's about measuring the voltage and current of a solar cell when I change the load.
Here is a simplified schematic:
The idea is that the top non-inverting opamp amplifies the voltage by 2 and the bottom transimpedance amplifier converts the current to 430 times the voltage. Don't worry about damaging the Arduino, the voltage is about 2V and current is a less than 10 mA. R1 isn't really needed, I think it helps with impedance matching(?) and C1 and C2 are to stabilize the readings. However I get a significant change in the ADC readings without doing anything and sometimes I get crazy results with the current reading staying stable no matter what I do. Does anybody know what is wrong? Should I connect resistors in parallel with C1 and C2 and would that change the readings? The power supply (LM7805) is fairly stable and filtered with a 470uF electrolytic cap so I don't think that is the problem.
Did you obtain this circuit from somewhere? Looking at it, I don't see how it's supposed to be measuring solar cell current since none of that current will be flowing to the bottom op-amp circuit.
C1 and C2 are pretty high to be driven directly by an op-amp -- I'd recommend a small resistance before each capacitor (say 100 ohms).
Try getting a stable voltage reading first by grounding the negative terminal of U2. We'll worry about current later.
And what op-amp are you using? Is it a rail-to-rail I/O (RRIO) op-amp? What are its power supply voltages?
Loading the outputs of op-amps with capacitors isn't generally a good thing to do. If you need to make the design less sensitive to noise, the usual solution is to add capacitance between the output and the non-inverting input, i.e. in parallel with R2 and R3.
The purpose of R3 is to equalise the voltage offset at the op-amp inputs cause by the input current. It can be replaced by a short unless the op-amp input current is significant.
Your voltage amplifier at the top looks OK, but the transimpedance amplifier is designed to convert the input current into a negative voltage (which will not be acceptable to the Arduino input), and to do that, it will need a negative voltage supply. However, if RV1 is the load, the load current bypasses the current to voltage converter anyway. You would need to connect the bottom end of RV1 to ground instead of to the solar cell.
Unless you have a negative voltage supply available and are prepared to use another op-amp to invert the output of the transimpedance amplifier to make it positive, I would suggest something like the attached schematic. You need to get both the voltage and current outputs into the same 5v range, so I've done away with the x2 voltage multiplier and reduced the gain of the transimpedance amplifier. You'll also need to use an op amp with rail-to-rail output, or else drive it from a supply greater than +5v.
Thanks for the reply! As you can see, since the top opamp virtually draws 0 current all of the current will go through the RV1 and into the bottom opamp and converted to voltage by passing through R2, this is how a transimpendance amplifier works, at least how I understand it, you can google it to find a schematic if you want. The circuit seems to work but there seems to be noise in the results and think it might be the ADC.
If I ground the negative terminal how would I measure the current? I don't want to use a small resistor in series with RV1 as it would influence the result. The opamp is a Microchip MCP602 rail to rail with 5-0V power and according to the datasheet it's fine for this purpose.
As you can see, since the top opamp virtually draws 0 current all of the current will go through the RV1 and into the bottom opamp and converted to voltage by passing through R2
Close...but not quite. The current flows in a loop, from the source of the current potential (the solar panel in this case), through some circuitry, and must somehow get back to the source from whence it came.
In other words, current will flow from the solar panel, through RV1, then back to the solar panel, thus completing a circuit. dc42 has the right idea with his schematic and suggestions.
Grounding the negative terminal was just intended to be a temporary suggestion to get a handle on measuring the voltage, worrying about current later. The MCP602 should indeed be fine.
--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons
You are completely right, I drew the circuit in a haste and I made a mistake. Here is the actual circuit:
As I understand it, the voltage is negative in respect to the direction of the current, so I am fine. Like I said the circuit works but it has noise, that's the problem. I will try using the capacitors in parallel with R2 and R3. RV1 is indeed the load. I don't understand how the load is connected in your schematic, it seems to be disconnected from the solar cell.
That looks better, and I think it should work if you move the capacitors. My original comment about U2 trying to produce a negative output was incorrect.
jmknapp:
A transimpedance amp is supposed to be fed by a current source, which has high (ideally, infinite) output resistance.
Not necessarily, you can feed a transimpedance amplifier from any source you like. A transimpedance amplifier presents a very low input resistance to ground, so that you can insert it into a circuit without affecting the current flow - regardless of the output resistance of the current source (as long as it is much higher than the input resistance of the transimpedance amplifier).
jmknapp:
The output resistance of your current source is RV1 which is 1K max. So it seems that U2 is really just an inverting voltage amplifier with gain 430/RV1.
That's a valid way of looking at the circuit. Combining "Vout = Vcell * 430/RV1" with "Vcell = Icell * RV1", we get "Vout = Icell * 430". Whis is exactly what @secretagent wants.
jmknapp:
The output resistance of your current source is RV1 which is 1K max. So it seems that U2 is really just an inverting voltage amplifier with gain 430/RV1.
That's a valid way of looking at the circuit. Combining "Vout = Vcell * 430/RV1" with "Vcell = Icell * RV1", we get "Vout = Icell * 430". Whis is exactly what @secretagent wants.
True, which is why I deleted my post just before you replied.