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

Solar irradiance

Fri May 15, 2015 9:37 pm

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

hampi
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.

B-VE
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...
Thanks!

Regards,


Bob

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: Solar irradiance

Sat May 23, 2015 6:22 am

You should also take a look at 'ploticus'.

hampi
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

http://matplotlib.org/

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

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

Re: Solar irradiance

Mon Mar 14, 2016 2:58 pm

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,

User avatar
frazelle09
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."
Bahá'u'lláh
"La tierra es un sólo país y la humanidad sus ciudadanos."

Aggotrom
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”