Posts: 8
Joined: Sat Apr 04, 2015 3:28 pm

Solar irradiance

Fri May 15, 2015 9:37 pm


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 1855 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


import time, signal, sys
from Adafruit_ADS1x15 import ADS1x15

def signal_handler(signal, frame):
        #print 'You pressed Ctrl+C!'
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)


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),
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.



Posts: 223
Joined: Fri May 31, 2013 11:29 am
Contact: Website

Re: Solar irradiance

Sun May 17, 2015 7:49 pm

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.

Posts: 8
Joined: Sat Apr 04, 2015 3:28 pm

Re: Solar irradiance

Sat May 23, 2015 6:14 am

Hi Hampi,

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



Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Solar irradiance

Sat May 23, 2015 6:22 am

You should also take a look at 'ploticus'.

Posts: 223
Joined: Fri May 31, 2013 11:29 am
Contact: Website

Re: Solar irradiance

Sat May 23, 2015 10:29 am

You can do - of course - plots in Python too. Some examples



Posts: 1
Joined: Wed Mar 09, 2016 4:32 pm

Re: Solar irradiance

Mon Mar 14, 2016 2:58 pm


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,

User avatar
Posts: 70
Joined: Mon May 07, 2012 5:04 am
Location: Mexicali, Baja California, Mexico

Re: Solar irradiance

Wed Mar 16, 2016 8:51 pm

i think that ThingSpeak might be a possibility as well.

Have a great afternoon! :)
"The earth is one country and mankind its citizens."
"La tierra es un sólo país y la humanidad sus ciudadanos."

Posts: 1
Joined: Thu Jul 04, 2019 3:01 pm

Re: Solar irradiance

Thu Jul 04, 2019 3:07 pm

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:

Return to “Automation, sensing and robotics”