Logging my solar panel output, how do I want to do this?

Thread Starter

Lectraplayer

Joined Jan 2, 2015
123
I went and got one of those 100 watt Harbor Freight solar systems to see what I can expect from solar, and am trying to decide how I can log it since I can't necessarily be there to take measurements all day, every day. I'm trying to get an idea how much it will actually put out since I have a less than ideal installation, though hopefully it can still work adequately. If there is a 12 volt solar regulator that will log for me, that would be great. Otherwise, something like a voltmeter that can send to a PC or smartphone running an app that takes down voltages every so often over the day would be my next thought. I haven't found anything that describes my intent though.

Right now, my tests include a home "installation" with 4 25 watt panels thrown down in the yard or on the roof that run inside to a regulator and either a 17 AH battery or a 60AH (or so) trolling motor battery hidden behind a recliner, depending on what I'm doing, as well as a mobile "installation" where a 1.5 watt panel is placed on the dash of the vehicle, again with the regulator and a smallish battery littering the passenger's floorboard. In both cases, there may or may not be a load. My goal is to watch the solar panel and maybe the battery voltages over time as I move them around and operate my intended loads to see what the systems will run effectively. Loads may typically be lights or other relatively resistive loads. No real effort is made on elegance since I will be changing things often as I take my measurements. However, I would like to be able to have the measurements taken automatically as I do other things (such as work) since the measurements will have to be taken over a very long period of time. ...or would my best bet be to use a trial and error method? Maybe rig up a latching protection circuit and let it operate a chosen load for a couple days, then see if battery voltage dips below a certain setpoint and turns the load off?
 

danadak

Joined Mar 10, 2018
4,057
Use an ESP8266 or ESP32. Tons of videos on youtube for datalogging and
plotting. Using Arduino IDE.

I just searched youtube "esp8266 solar logging", lots of hits.

Ubidots, Thingspeak, net interface to handle the data produced by ESP8266 or
ESP32.


Regards, Dana.
 

Thread Starter

Lectraplayer

Joined Jan 2, 2015
123
Hmmm.... So far, I do not see my goal. I pretty much want to measure voltage at my solar panel and maybe my battery, and write the measurements to a text file every 10 minutes or so with a time/date stamp. ...though I'm not familiar enough to know what kind of components to use for voltage measurement for a project like this. ...or if there's a ready made solution, that would be nice as well.
 

danadak

Joined Mar 10, 2018
4,057
The ESP8266 or 32 allows you to run a webserver, code examples already written,
that take A/D measurements, transmit them over WiFi, and using either Ubidots
or Thingspeak or Adafruit plot or record the values, accessable over the net.

Here is a weather station where several sensors data is sent over the net. In
that case they did not use the onboard A/D, which is what you would do in
your case.



Regards, Dana.
 

Reloadron

Joined Jan 15, 2015
7,887
If you want a simple turn key off the shelf solution depending on your pocket book you can use one of these. They are sold by distributors globally. You plug it into a USB port on your computer and program it with the provided software and then it becomes a stand alone data logger. The input range is 0 to 30 volts You choose the sample rate. I use one for logging temperature and humidity in a safe. You get a chart when you download the data and can export the data in any of several formats. Here are a few examples:

Note the graph runs from Saturday December 9th through Sunday December 10th with the complete date & time group.
Sample 1.png


Here I go ahead and choose to export the data I collected for the period. I decided to choose a CSV file from the choices available.
Sample 2.png

I dump the CSV (Comma Separated Value) text file into an Excel spreadsheet. Below are the upper and lower sections of my sheet.
Sample 3.png

Sample 4.png

Using spreadsheet software like Excel or Open Office (Free) Calc you can apply any math functions you want to your data. You set the sample rate.

There are other off the shelf turn key solutions which may require a few added parts. Any number of companies offer small inexpensive data acquisition systems.

Ron
 

Attachments

Last edited:

Thread Starter

Lectraplayer

Joined Jan 2, 2015
123
That's a definite possibility.

...though I've also been wondering about the arduino possibility, though I don't know much about it. I know that I can use a couple ADC's to quantize the voltage on (assuming a 3.3V refreence) a 1:10 scale and just record the raw output every ten minutes or so to a text file on an SD card. ...but would that time stamp? ...or would I need to go with more a Raspberry Pi as the controller?
 

djsfantasi

Joined Apr 11, 2010
9,237
That's a definite possibility.

...though I've also been wondering about the arduino possibility, though I don't know much about it. I know that I can use a couple ADC's to quantize the voltage on (assuming a 3.3V refreence) a 1:10 scale and just record the raw output every ten minutes or so to a text file on an SD card. ...but would that time stamp? ...or would I need to go with more a Raspberry Pi as the controller?
The Arduino family has several built-in ADC pins. There are restrictions. You can only measure up to 5VDC. Your 3.3 volts can be measured fine on the 5VDC scale. I’ve never done this, but I think there’s an analog reference pin, to which you could connect 3.3VDC.

The Arduino command returns a value from 0 to 1023 which you can map to the actual voltage with a simple calculation. If ARef has 3.3VDC on it, then this statement

V = ((float(analogRead(pin)) / 1024.0) * 3.3

Other microprocessors may have better date and time capabilities. The Arduino requires an external real-time clock (RTC).
 

Reloadron

Joined Jan 15, 2015
7,887
That's a definite possibility.

...though I've also been wondering about the arduino possibility, though I don't know much about it. I know that I can use a couple ADC's to quantize the voltage on (assuming a 3.3V refreence) a 1:10 scale and just record the raw output every ten minutes or so to a text file on an SD card. ...but would that time stamp? ...or would I need to go with more a Raspberry Pi as the controller?
You, can as mentioned, use an Arduino. You would need to divide down the input voltage and scale your code accordingly. You mentioned data logging and the Arduino alone will not do that so you will need an Ethernet Shield (or other board with an SD slot) to piggyback on the Arduino. Then also, as mentioned, the Arduino does not have a real time clock so if you want a date / time stamp on your data that needs considered. While all of this is very doable it will involve some programming of the Arduino and the addition of a few software libraries to your code.

There are several ways to get where you want to go. It just becomes a matter of what works for you.

Ron
 

danadak

Joined Mar 10, 2018
4,057
Same, I figure for $10 the most I am out is ten bucks. I did notice the seller doesn't take returns. :)
That may be because inputs not protected ? Just a thought. On stuff
like that I start with a 1K ohm R in series with input, to make sure if
I misconnect input I don't blow the part up. Then I pull them out when
I am confident design good to go. Or leave them in to limit current if
the inputs have transients on them that exceed supply rails (the
"typical" limitation for inputs).


Regards, Dana.
 
Top