Page 1 of 1

Solar irradiance

Posted: Fri May 15, 2015 9:37 pm
by B-VE
Hi,

I'm working on a tiny project to learn how to show real-time data from a analog source on a display connected to the Raspberry through HDMI.
This is what I've planned;
Solar irradiance.jpg
Solar irradiance.jpg (55.49 KiB) Viewed 1590 times
I've written some code, which now displays the irradiance directly on the screen... it works perfect.... but it's plain text, not very nice looking :-)

Code: Select all

#!/usr/bin/python

import time, signal, sys
from Adafruit_ADS1x15 import ADS1x15

def signal_handler(signal, frame):
        #print 'You pressed Ctrl+C!'
        sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
#print 'Press Ctrl+C to exit'

ADS1015 = 0x00  # 12-bit ADC
ADS1115 = 0x01	# 16-bit ADC

# Initialise the ADC using the default mode (use default I2C address)
# Set this to ADS1015 or ADS1115 depending on the ADC you are using!
adc = ADS1x15(ic=ADS1015)

print("\033c");

output = " "
while True:
	# Now do a differential reading of channels 2 and 3
	voltsdiff = adc.readADCDifferential23(256, 8)
	solar = (voltsdiff/70)*1000

	# Display the solar irridiation
	print '\r%.1f' % (solar),
	sys.stdout.flush()
What can you advice me to use for visualizing it on a big screen (like the part on the right, some text and a 24hrs. log in a graph)?
Would it be easier to read the data real time in a HTML document and show it in a web browser?

The Raspberry should show this screen after power-up... automatically.

Regards,

Bob

Re: Solar irradiance

Posted: Sun May 17, 2015 7:49 pm
by hampi
Something like this for example: PHP, Java Script, Ajax, Cascading Style Sheets... Very simple plots can be done with PHP GD alone.

For offline plots gnuplot is popular.

Re: Solar irradiance

Posted: Sat May 23, 2015 6:14 am
by B-VE
Hi Hampi,

I'll take a look at PHP GD & Gnuplot! Btw it'll be offline...
Thanks!

Regards,


Bob

Re: Solar irradiance

Posted: Sat May 23, 2015 6:22 am
by ame
You should also take a look at 'ploticus'.

Re: Solar irradiance

Posted: Sat May 23, 2015 10:29 am
by hampi
You can do - of course - plots in Python too. Some examples

http://matplotlib.org/

http://www.python-course.eu/tkinter_canvas.php

Re: Solar irradiance

Posted: Mon Mar 14, 2016 2:58 pm
by ivesa10
Hi,

I've got a raspberry and I would like to play with it, acquire analog signals, display send data through the network and so forth. Can someone tell me please, which libraries in Python do I need to install in order to start playing with the device

Thank you,

Re: Solar irradiance

Posted: Wed Mar 16, 2016 8:51 pm
by frazelle09
i think that ThingSpeak might be a possibility as well.

Have a great afternoon! :)

Re: Solar irradiance

Posted: Thu Jul 04, 2019 3:07 pm
by Aggotrom
Hi B-VE,

could you share the what you are using to capture the solar energy? Basically the first tool in your chain, the one that is connected to the A/D converter?
I would also like to build a simplified, low cost pyranometer to measure global horizontal irradiance in W/m2 but have absolutely no background in electronics.
I read that a reference PV cell would work or a photodiode.

Thanks heaps! :geek: