Test Arduino system without all components

Hi all,

I've been working on a project in which I measure open-circuit voltage Voc and shirt-circuit current Isc of solar cells. The system measures both of these parameters along with others such as temperature and irradiance, (almost) simultaneously for 4 different cells, during a whole day, every minute. Now that I have my sketch which compiles fine, I would like to test it. But since I'm still quite newbie with Arduino and electronics, I'm sure that I will struggle for a while to get the circuit to work fine, and I will need to make modifications both to the sketch and the electronic circuit. So I don't want to go to the field with my solar cells to test the circuit which I'm building. Therefore, I was wondering whether it was reasonable to model the 4 solar cells with batteries?

I attached a diagram of my circuit. The shunt resistance is very small (0.001 Ohm), but I'm considering to put 8 of these in series to obtain a 0.008 Ohm shunt resistance.

Yes, very reasonable. Just be careful as the short-circuit capability of most batteries will be much higher than a solar cell. The battery will heat up very quickly. It might get hot enough to explode. Keep the Isc measuring period very short, like 1/100th of a second.

I think you could use batteries in place of solar cells to test your Arduino to see if it can read the values correctly compared to (say) your multimeter.

However I don't think I would describe the batteries as "modelling the solar cells" because solar cells have very different characteristics to batteries.

And to follow what @MorganS has said, don't use the shunt resistors as the load for the batteries. Use a suitable load resistor as well - then there will be no risk of the batteries discharging too quickly.

...R

In a similar vein, what are the specifications for these solar cells? Putting a virtual short across any source with the capability to supply large currents seems like a spectacularly bad idea.

Big solar cells behave the same as small solar cells. Only the current will be different.

Buy some $1 solar powered garden lights, pull them apart and extract the solar cells. Scale the components to match the current you expect to see indoors under artificial light. Once you have something that works, upscale for the ones you have in the field.

Thanks a lot for all these answers;

Good to know that I can use batteries to test the circuit. I will thus use a larger resistance as a load, indeed it is a bad idea to short the batteries. I wanted to test the amplifier as well (still not sure which amplifier to use for such small voltage drops), but I guess I will need to do that outdoors with real solar cells.

1/100th of a second seems super fast no? Would that give enough time to read pass the current through the shunt, amplify it, and read the analog input? Maybe it should be enough yes, but then I guess I need to take into account the delay of the relay which needs to charge to close the circuit, right?

The cells to be measured are single cells, 0.5V/6A. So I expect currents between 5.5A and 6A.

Nongsai:
1/100th of a second seems super fast no?

I think that time was suggested in the context of there not being a load resitor to limit the battery current.

What Arduino are you using?

If you are NOT using an Uno then it probably can measure the differential voltage between two Analog pins and probably includes an amplifier.

...R

Hi @Robin2,

I am using an Arduino MEGA ADK. Really, does it include an op amp? Since the shunt voltage drops are so small (about 6mv), the choice of the amp is actually quite a challenge. For instance, the input offset voltages should not cause more error than you I tolerate, and from what I understood I should ideally use an instrumentation amp for noise rejection and common-mode voltage rejection. For now I tried to configure three op-amps in an instrumentation amplifier configuration, but I have high tolerance resistances and I know that the way the connections are soldered can considerably influence the performance of the amplifier. So if indeed an internal amplifier exists that would be awesome - didn't find much on the internet though.

Nongsai:
Hi @Robin2,

I am using an Arduino MEGA ADK. Really, does it include an op amp?

Yes. It can have gains of 10x or 200x.

This feature is not included in the normal convenient Arduino capabilities so you need to study the Atmel Atmega 2560 datasheet and, in particular Section 26 on the Analog to Digital Converter.

This Youtube video may help - the principles will be the same.

...R

Current sensors are available, no need to build your own. In your final design you should take into account any wires, which also contribute to the resistance in measuring the short-circuit currents. The sensors and relays should be mounted close to the panels.

For fast data acquisition you can use a separate sensor and analog input for every panel, and turn on all sensors at the same time. Then measure the currents, and turn the relays off again.

Switching DC currents will stress the relay contacts by electric arcs, which after some time can melt and solder the contacts together. Eventually 2 relays should be used for each panel, with one protective relay closed first, with no current flow, followed by the working relay. Turn off the relays in reverse order, so that the protective relay never switches while current flows. This will allow to break the circuit even if the working relay won't break any more. Take one more current reading after switching the working relay off, to detect a permanent short. Once a relay failed, skip this panel until the defective relay has been replaced.

Thanks a lot. The 2-relay safety system sounds very reasonable.

I decided not to use current sensors because I would get a very low precision. Indeed, my Isc currents will vary only very little, say between 5.5A and 6A. I have done some calculations and realized that I would only have a couple of ADC values over my desired range. For this reason I thought amplifying the voltage drop over a precision shunt would give me better results.

The shunt resistance would be connected in a 4-wire Kelvin configuration which I believe limits the errors due to wiring etc.

I think I will go for a home-built instrumentation amp or a purchased instrumentation amp, since I need a gain of about 180x, 200x being too much.

The current sensors take all issues into account. But however you do it, you won't get any improvement from a precision shunt. For better resolution you have to subtract a base value, corresponding to e.g. 5A, before digitizing the remaining voltage or current.

Subtracting a base value analogically? Like by imposing a counter-current or something?
The thing is that the Hall-effect based current sensor only come in 5, 20 and 30Amp, and I would have to use the 20Amp version for a 6Amp solar cell. The ACS will give me ~450 A/D values spread over 20Amp, so only ~22 values per Amp. This is not enough. If I amplify a voltage drop over a shunt I can have more A/D values per amp. Right?

I could find Hall effect sensors for almost every current, e.g. also for 6A and 7A.

These sensors may require some additional circuitry, because they typically have an offset of Vcc/2 (2.5V), and add only 0.5-1.5V at the nominal current. But their linearity may allow to also measure 6A with a 5A sensor.

Depending on the sensor construction, it may be possible to overlay the magnetic field by a solenoid, to adjust the offset voltage. Otherwise an opamp can be used to both shift the offset voltage and spread the output range.

What other circuit and sensor type do you have in mind?