First Project Help

Hey everyone, I just started with Arduino and have little experience with any programming and circuits.

I am using an Arduino to measure the watt hours of 2 different solar arrays over the course of a day, each with 40 .5v solar cells. I also have an Arduino UNO in the mail.

In order to measure the watthours, I am going to need a script to run, probably measuring voltage drop over a source of known resistance. How would I go about doing that?

From what I have heard, the uno only measures up to 5 volts. with 2 circuits with 20 volts (what I assume to be the max voltage) each, I would need to split it up.

The Uno also has 6 analog inputs. Should I be able to split each circuit into 3, with each having a max of 7v or less? Would it still record it, but only say that it was above 5 volts?

Or would I need to use a multiplexer?
ive heard that those make scripting even harder to do.

Would just adding a resistor do the trick?
if so, which one?

I know its alot of questions, but hopefully I'll get the hang of it.
Thanks

You need a voltage divider. Connect a 15K resistor to your 20V+ and a 4.8K resistor to your 0V. Join the other ends of the resistors together. The voltage across the 4.8K resistor will be approx. 5V. For current measurement, you'll need a series resistor but, as you've not told us what the max current will be, I can't tell you the value you'll need. R=V/I. You want a 5V drop, so divide 5 by the max current (in Amps) to give the value of resistor you need and multiply V*I to give the wattage of the resistor you need. To be on the safe side, double the calculated wattage so as not to overheat your resistor.

You don't want to drop 5 volts across your current sense resistor, that's a lot of wasted power. You'll want to use a small value resistor with a differential amplifier to increase your resolution. With a bit more info on your specs we can help with that.

Just to give a pointer in the general direction, I have a 0.05 Ohm resistor to measure the current from a 12v 80 watt solar panel. 1 amp corresponds to a voltage of 5 millivolts across the resistor.

At the maximum of about 7 amps from the panel there would be a voltage drop of 35 mV and an energy waste of 7 x 0.035 = 0.245 watts or 0.3 percent.

I don't have this connected to an Arduino, I just check it occasionally with my multimeter. To use it with an Arduino I would need to amplify the voltage across the resistor so that (roughly) the 35 mV becomes 4.5 volts. Alternatively I could amplify it to 0.9v and use the Arduino ADC's internal 1.1v voltage reference.

...R

in response to Jiggy-Ninja, to give more info on specs:

I have 2 solar arrays, each with 40 of these cells: (info below is per cell)
Average Power (Watts): 0.28 Wp
Average Current (Amps): 0.56 Imax
Average Voltage (Volts): 0.5 Vmax
Effeciency: 17.6%

http://tiny.cc/71e7bx

One is a normal one, the other is an experimental placement (if you wanna know, I'm redoing Aidan Dwyer's project better)
He measured only voltage, but that is independent. I will measure watt hours over the course of a day.

I also had a suggestion from a friend that I could connect each array to a battery and charge it from empty for an entire day, then measure how much juice is in the battery. That would be easier, but I want to track it over the course of a day, to see when each cell collects how much.

Oh, and I don't want a 5v drop from 7v, I want it to drop TO 5v from 7v. A 2v drop.

I think it would be best (but definitely could be wrong) if I got 6 of the same resistors for each circuit and then fed each one into the analog inputs with a max voltage of 5.

Are there any current restraints that I need to be worried about?

It might be easier for me to reduce voltage with a voltage divider.

lmboyer:
Oh, and I don't want a 5v drop from 7v, I want it to drop TO 5v from 7v. A 2v drop.

You are mixing up the measurement of voltage and the measurement of current.

Measuring the voltage is easy - as you say use a voltage divider to reduce the voltage to a suitable level for the Arduino.

Measuring current involves passing the current through a very low Ohm resistance and measuring the tiny voltage across that resistance. Current = Volts / Ohms. The problem is that the Arduino's ADC won;t be able to measure the tiny voltage unless you amplify it.

The comment by @Jiggy-Ninja referred to the voltage drop across the current sense resistor.

I'm not sure how sophisticated your project is intended to be but one of the complications of solar panels is that they are most efficient at different output voltages (i.e. different loads) when the sunshine level is different. If you have a constant load resistance (which is often the reality in practical projects) it will only be optimized at a particular sunshine level and will be less efficient at other sunshine levels and you won't be able to measure the error. Solar panel manufacturers usually provide graphs that show how the output varies with sunshine level and at each level what output voltage is most efficient.

...R

Ok. I think I figured a way out to reduce the max voltage to 5v.

This is with the smaller circuits with a total of 7v and .56amps

If I use 3watt resistors, 200 ohms and 500 ohms:

It goes in this order: solar cells-200 ohm resistor-arduino-500 ohm resistor-solar cells

lmboyer:
It goes in this order: solar cells-200 ohm resistor-arduino-500 ohm resistor-solar cells

This suggests to me that you haven't grasped what is needed. You don't need high wattage resistors for a voltage divider because there should be little or no current flowing through it. You do need a high wattage resistor for the load. You may not need a high wattage resistor for the current sense resistor because, while the full current is flowing through it the voltage across (and thus the energy wasted) it should be very small.

This is a very crude diagram of the sort of circuit you need.

...R

I knew that my resistors didn't need that much wattage. Although Henry_Best said above that if I take V*I, that gives me the wattage I need and that will get me 2.6w. Will it hurt to have extra wattage? Because it would actually be easier for me to get 3watt resistors. Will it dampen the current or voltage extra? I thought that was just how much power it could take running through it.

I guess I haven't grasped it if you are saying I need an amplifier, current sense resistor and a load. I thought that a load was actually undesirable in this case because it mooched off of the juice in the circuit. Also, I thought I only needed to measure voltage because I know what resistance is, so I can solve for the current, and then calculate watt hours.

I originally thought that it would only need the voltage dividers and the Arduino voltage measurement.

I thought that I only needed to change voltage so all I needed was a voltage divider. A 200 ohm resistor on one end, and a 500 ohm resistor on the other end, and then the Arduino voltage measurement.

Do I need that other stuff

From you first post ...

I am using an Arduino to measure the watt hours of 2 different solar arrays over the course of a day, each with 40 .5v solar cells. I also have an Arduino UNO in the mail.

You need to do a lot (and I mean a LOT) of reading about electricity. Four or five hours with Wikipedia might get you started.

A watt is the product (multiplication) of 1 amp at 1 volt. So you need to measure volts and amps (and time to get watt hours).

If the solar panel isn't connected to a load no current will flow so you will have volts but no watts. The load has to be matched to the solar panel so that it produces the desired voltage. If the load resistance is too low the solar panel voltage will fall and you won't be using it efficiently. If the load resistance is too high you won't be using the full amount of current that the panel is capable of producing.

Your information on the individual solar cells isn't a lot of use. You need to know how the cells are connected within the panel. If they are connected in series (one after the other) the overall voltage will be 40 x 0.5 = 20volts and the max current will be the same as for a single cell - 0.56amps. But they might be wired up another way.

Some Homework .... What load resistance would you need to get a voltage drop of 20volts and a current of 0.56 amps? What wattage would it need to be?

...R

Robin2:
Your information on the individual solar cells isn't a lot of use. You need to know how the cells are connected within the panel. If they are connected in series (one after the other) the overall voltage will be 40 x 0.5 = 20volts

That's how I read it. I don't know where he gets 7V from. I can't think of a logical way to wire 40 * 0.5V cells that will give 7V.

and the max current will be the same as for a single cell - 0.56amps. But they might be wired up another way.
Some Homework .... What load resistance would you need to get a voltage drop of 20volts and a current of 0.56 amps? What wattage would it need to be?

Also his suggeted values (500 and 200 Ohms) for the voltage divider are far too small, putting an extra load on the solar cells. I would go for at least 5K and 2K, if he actually has 7V.

I get 7v by splitting the 20v circuit into 3. (its not exactly 7, but I rounded up) I only have 2 circuits with 20v in them, but the arduino has 6 analog inputs. I split the 2 20v circuits into 6 7v(approx) circuits. then I don't need to lose 15 volts on each circuit, I only need to lose 2 per circuit.

I already knew that I needed to wire them in series, and I know V=IR

Ok, a load works then. What do I use then, a lightbulb that I know the resistance of?

as for the resistors, just make them 5k and 2k instead of 500 and 200? Do I keep the wattage at 3, or drop it still?

I didn't know what to do about your homework because it doesn't seem that you understood my circuits. I don't have 20v on each circuit. Each array has 20v, and I am splitting each array into 3 circuits of equal voltage wich rounds to 7v. making 6 7v circuits instead of 2 20v ones.

hopefully you understand. sorry for the confusion.

lmboyer:
as for the resistors, just make them 5k and 2k instead of 500 and 200? Do I keep the wattage at 3, or drop it still?

As you've now got 10 times the resistance there will be 1/10th the current flowing through them.

I didn't know what to do about your homework because it doesn't seem that you understood my circuits. I don't have 20v on each circuit. Each array has 20v, and I am splitting each array into 3 circuits of equal voltage wich rounds to 7v. making 6 7v circuits instead of 2 20v ones

How did you exactly divide 40 cells by 3? Did you cut one cell into thirds?

I made circuits of 14, 13, and 13. I even said I rounded.

Would I be able to split exactly into thirds by splitting the main wire into 3 after it is connected to the solar cells?

I'm a bit confused. Are you connecting those 3 sets of 14, 13, and 13 solar cells directly in parallel? If so, you might as well toss out the one extra solar cell and make it equal sets of 13 each. The extra voltage generated by the one extra solar cell is just going to push some current back into the other panels and be wasted as heat.

Electronics do not round things off.

I don't know what you mean by directly in parallel, but I do understand that you think that I should just make all of them 13. I agree, and I don't know why I haven't thought of that. Thanks.

I will have 2 separate solar arrays, with (now) 39 cells on each. All 39 will be together, but 13 cells will be wired into 3 circuits on each, producing 6 circuits with 6.5v in them and .56amps.

By directly in parallel, I mean with no intervening circuitry. It would be a wise thing to use one diode on each to block reverse current, in case one or two panels gets shaded (or even just dirty) to prevent current from flowing back into a panel.

Yes, that does sound like a good idea. So I will need a diode, a load, and 2 resistors.

Don't you mean 3 diodes? One for each set of panels.