User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Solar eclipse experiments

Mon Mar 02, 2015 1:42 pm

Given a class of twenty 11 to 12 year olds, an "ICT" lesson and a concurrently occurring partial solar eclipse ... what computer based science could be done?

Obviously, light v time, also temp v time and even sound levels v time.

Are there any other interesting and exciting ideas that could happen, there will be raspberry pi's with battery packs, a couple of laptops and loads of student's own portable devices (blackberrys, android phones etc.)
:?:

User avatar
DougieLawson
Posts: 36142
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Solar eclipse experiments

Mon Mar 02, 2015 2:04 pm

In the days before the eclipse do some temp, pressure, humidity, rainfall readings see if you can predict (with some help from http://www.metoffice.gov.uk) clear skies for the day of the eclipse, you'll also get some useful data when it's clouded out (like in July 1999).

Use a telescope or one side of a pair of binoculars to project an image of the eclipsed sun on a screen (or piece of paper), set up a Raspberry Pi with a camera to record a timelapse from first contact through totality to last contact. You'll not only track the eclipse you'll also track the rotation of the Earth by doing that.

Don't point the camera at the sun, your delicate electronics won't like being burned alive. (Same rules for the MK I eyeball.)
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5086
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Solar eclipse experiments

Mon Mar 02, 2015 2:09 pm

DougieLawson wrote: Don't point the camera at the sun, your delicate electronics won't like being burned alive...
Although several layers of exposed & developed old B & W (negative) film works wonders as an extreme "ND filter".
(Well it did for me and a camcorder last time ;) )
For the "budding naturalists" what about recording/observing changes in (other) animal behaviour, esp. birds(ong)?
Trev.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my 2xP3A+, P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
DougieLawson
Posts: 36142
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Solar eclipse experiments

Mon Mar 02, 2015 2:23 pm

FTrevorGowen wrote: For the "budding naturalists" what about recording/observing changes in (other) animal behaviour, esp. birds(ong)?
Trev.
The partial eclipse (unless you're in the Faroe Islands or north of there) won't have any effect on wildlife this time.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Solar eclipse experiments

Mon Mar 02, 2015 3:58 pm

DougieLawson wrote: Use a telescope or one side of a pair of binoculars to project an image of the eclipsed sun on a screen (or piece of paper), set up a Raspberry Pi with a camera to record a timelapse from first contact through totality to last contact. You'll not only track the eclipse you'll also track the rotation of the Earth by doing that.
What about a pin-hole camera, could that work?

hmmmm ....

<wanders off to look for some sort of a tin and some opaque paper>

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Solar eclipse experiments

Mon Mar 02, 2015 4:07 pm

Groovy!
Image

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Solar eclipse experiments

Mon Mar 02, 2015 4:16 pm

Okay, after highly scientifically rigorous experimenting with 2 post-its, one of which has a jumper wire hole in, you need about 50 cm of separation to project an image of the sun thats about 5mm in diameter. (Also, you need to make it dark inside.)

User avatar
DougieLawson
Posts: 36142
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Solar eclipse experiments

Mon Mar 02, 2015 4:50 pm

I can see a design for a patent Raspberry Pi pinhole camera enclosure coming up. Mount the PiCamera on the back of the box just below the pinhole and you'll be just OK for focussing on the image from the pinhole on the other end of the box.

I can feel a visit to Tesco and some playtime with my A+, my camera, some blu-tack and gaffer tape happening in the very near future. Today has been an excellent day for testing things, lets hope the weather stays like this.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Solar eclipse experiments

Wed Mar 04, 2015 9:31 am

Regarding monitoring temperature (as a result of radiated heat from the sun) and light levels for this...

I've got a few arduino kits that I'm planning to use (connected via serial to a raspberry pi) which includes 4.7kOhm thermistors (never used one of these before).

I'm thinking of calibrating this by dunking it in ice and then in boiling water?


Students can remotely monitor readings from "solar-pi" on their desktop-pi's, and do conversions in lumens / degrees C themselves using an appropriate method.

A couple of queries regarding thermistors and light sensitive resistors:

Whats the best way of preparing the thermistor so it is mostly effected by radiant energy and less so by, say a cold gust of wind?

Any ideas how best to calibrate a 100KOhm LDR so that we can compare the levels against some useful value?

I suppose we could just start on Friday 13th by taking average readings for that time of day... :?

User avatar
PeterO
Posts: 5019
Joined: Sun Jul 22, 2012 4:14 pm

Re: Solar eclipse experiments

Wed Mar 04, 2015 9:40 am

DougieLawson wrote:
FTrevorGowen wrote: For the "budding naturalists" what about recording/observing changes in (other) animal behaviour, esp. birds(ong)?
Trev.
The partial eclipse (unless you're in the Faroe Islands or north of there) won't have any effect on wildlife this time.
During the last partial eclipse that I saw, all the rooks that live in the line of pine trees here started flying back to their roosts/nests.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

fruit-uk
Posts: 609
Joined: Wed Aug 06, 2014 4:19 pm
Location: Suffolk, UK

Re: Solar eclipse experiments

Wed Mar 04, 2015 10:07 am

IME it's noticeable how quiet wildlife becomes for the duration, I think there will be enough of an eclipse here for that to happen this time too.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Solar eclipse experiments

Wed Mar 04, 2015 5:33 pm

Could I connect a microphone input to something like a Darlington pair of transistors to get a noise to voltage and then measure mean value over the same hour on the Friday before the eclipse?
Students could then compare against this on the actual day.

....

I wish there was a way to measure if *up* / towards Sun and moon gravitational pull increased too. I did wonder if you weighed something would it appear slightly lighter but of course the base of the scales would be pulled up as much as the object you try to weigh so it would cancel out.

User avatar
mrpi64
Posts: 931
Joined: Sat Feb 16, 2013 5:13 pm

Re: Solar eclipse experiments

Wed Mar 04, 2015 5:38 pm

I guess you'll have fun telling them what to do :D :

In 2012, Randall Munroe of the webcomic xkcd published a description of the Saturn V rocket using only the 1000 most frequent words in English. Under this restriction, the rocket was called "up-goer five," the command module was "people box," and the liquid hydrogen feed line was "thing that lets in cold wet air to burn."

(from mentalfloss.com)

But again, I may be wrong. But make sure you do something awesome!
I'm happy to help.
https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=51794 - List of games that work on the Pi.

PiGraham
Posts: 3608
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Solar eclipse experiments

Wed Mar 04, 2015 6:01 pm

morphy_richards wrote:Could I connect a microphone input to something like a Darlington pair of transistors to get a noise to voltage and then measure mean value over the same hour on the Friday before the eclipse?
Students could then compare against this on the actual day.

....

I wish there was a way to measure if *up* / towards Sun and moon gravitational pull increased too. I did wonder if you weighed something would it appear slightly lighter but of course the base of the scales would be pulled up as much as the object you try to weigh so it would cancel out.
The variations of gravity were measured with a high precision LaCoste-Romberg D gravimeter during a total solar eclipse to investigate the effect of solar eclipse on the gravitational field. The observed anomaly (7.0±2.7)×10−8 m/s2 during the eclipse implies that there may be a shielding property of gravitation.
http://arxiv.org/abs/1003.4947

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Solar eclipse experiments

Mon Mar 09, 2015 12:26 pm

Somewhere between putting the finishing touches to a document which is pointless but required, doing something depressing that needs doing urgently but not quite urgently enough that I have no space for prevarication I have become somewhat dissasociated from my work and I am now totally distracted.

During moments like this I've been idly working on an arduino sketch and this python program on a Raspberry Pi.

My 'solarpi' python program uses pyserial to send a byte every second to the arduino and that triggers either a temperature or light level reading which is sent back to the python program. (and also save an image via a pin hole camera)

All the data to a file in /var/www like this: (by opening the file in append mode, writing a line then close it again)

Code: Select all

06-03-2015-15-00-08,38
06-03-2015-15-00-09,38
06-03-2015-15-00-10,38
06-03-2015-15-00-11,38
06-03-2015-15-00-12,37
06-03-2015-15-00-13,37
06-03-2015-15-00-14,38
06-03-2015-15-00-15,37
06-03-2015-15-00-16,37
06-03-2015-15-00-17,37
06-03-2015-15-00-18,37
06-03-2015-15-00-19,37
06-03-2015-15-00-20,38
06-03-2015-15-00-21,37
....
The idea being that on the day students can monitor live light, temperature and a live-ish second by second updating image of the sun. Later on they can do some further analysis of the recorded data.

I think I need to record date/time data better, I was just having a play with gnuplot and it really seemed to be struggling with the none numeric first (datetime) column. What I think I should do instead is record it as a number of seconds elapsed since some date/time. Not sure what would be a good date/time to use as a start point, as it would be fairly arbitrary, mainly symbolic. Some famous eclipse or event in astronomy :?

I would like students to be able to stream the data into gnuplot on their own desktop pis somehow so they can see a live, constantly updating graph of light and temp v time changing. I dont think that will work with my second by second updating CSV files. Is there some better method?

User avatar
DougieLawson
Posts: 36142
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Solar eclipse experiments

Mon Mar 09, 2015 12:32 pm

Turn the date round to "2015-03-09 12:32:00".

Thanks for starting this thread, I've discovered my new binoculars have a tripod mount so I'm going to use those (one lens only) to project an image of the sun. I'll use a RPi with a temp/pressure sensor (BMP180) and some code I've written for a future MagPi magazine article to record some environmental data. I'm also going to run a PiCamera and shoot a timelapse of the projection from the binoculars. Not sure whether to use one RPi or two (I've got six to choose from).

Test day is Thursday this week (from the forecast) when I'll be sitting in my front garden looking like an idiot.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Solar eclipse experiments

Mon Mar 09, 2015 1:42 pm

What are you going to use for the time-lapse?

I was thinking of just using something like SimpleCV from within the Python program and just saving shed loads of separate images.

User avatar
DougieLawson
Posts: 36142
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Solar eclipse experiments

Mon Mar 09, 2015 1:49 pm

morphy_richards wrote:What are you going to use for the time-lapse?

I was thinking of just using something like SimpleCV from within the Python program and just saving shed loads of separate images.
https://github.com/DougieLawson/Raspber ... apseCam.py (that gets one shot per minute).
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Solar eclipse experiments

Mon Mar 09, 2015 3:51 pm

I'm struggling a bit with gnuplot.

Given some data

Code: Select all

09-03-2015 15:45:27,305
09-03-2015 15:45:28,305
09-03-2015 15:45:29,305
09-03-2015 15:45:30,305
09-03-2015 15:45:31,305
09-03-2015 15:45:33,304
09-03-2015 15:45:34,304
09-03-2015 15:45:35,304
09-03-2015 15:45:36,304
09-03-2015 15:45:37,304
09-03-2015 15:45:38,304
09-03-2015 15:45:39,304
09-03-2015 15:45:40,304
09-03-2015 15:45:41,304
09-03-2015 15:45:42,304
09-03-2015 15:45:43,304
09-03-2015 15:45:44,304
I want the date/time on X axis and the value on Y.

I try:

Code: Select all

gnuplot> set timefmt "%Y-%m-%d %H:%M:%S"
gnuplot> set datafile separator ","
gnuplot> plot '09-03-2015light.csv';
And this is not exactly what I am expecting to see :?
Attachments
gp1.png
gp1.png (7.43 KiB) Viewed 6113 times

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Solar eclipse experiments

Mon Mar 09, 2015 4:04 pm

On a side note - this looks like a good way to get gnuplot to plot a live data stream:
Using commands pause and reread

Code: Select all

set xrange [0:20]
set yrange [0:400]
plot "plot.dat" using 1:2 with lines
pause 1
reread

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Solar eclipse experiments

Mon Mar 09, 2015 5:24 pm

And this details how you can connect gnuplot to a file via http.
http://www.bmsc.washington.edu/people/m ... _test.html

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Solar eclipse experiments

Wed Mar 11, 2015 4:51 pm

Here's the pinhole camera we're going to use. Itw as sunny today, originaly the camera was just the box at the end but the projected disk of the sun was tiny so I've stuck a big long tube thing on the front in the hope I can get a better sized disk.

But then the sun went in :evil:

On the back inside the box is a sheet of white paper where the image gets projected, a web cam will point at that, there is a tiny pinhole made with a compass in the centre of the foil at the front. I will stick the arduino with light and temperature sensors on the front of the long barrel.

That will be connected to an (solar)pi and to the network with a long patch cable. Data to be shared via http.

Hoping to do a trial run on this Friday morning as the class will need practice connecting to it, however weather forcast does not look favourable.
Image
Also needs some sort of quick and dirty Dobsonian mount.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Solar eclipse experiments

Thu Mar 12, 2015 8:08 am

So...
Tomorrow morning's lesson is going to be about eclipses as a starter.

I'm then going to show the class the temp, light sensor and camera.

We'll hook it up to the network to demonstrate they can get readings from their desks, analyse data in libreoffice calc or gnuplot and look at pictures.

I'm then going to introduce the problem that to monitor the camera can't directly point at the sun and the sensors need to be outside.

I'll then bring in the pinhole camera and they will (I hope) suggest putting the cam inside and mounting the sensors on the front and poking the whole apparatus out of the window.

Bingo, 7D will have then created and be able to use their own equipment for a computing and physics experiment.

Edit - its sunny ! if the sun stays out for ten more minutes I can test the image gets projected.

Edit edit - it works! Although the image is a bit dim, still it should be okay when everything is sealed up and dark with the web cam inside.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Solar eclipse experiments

Thu Mar 12, 2015 9:38 am

This is the arduino sketch we will be using:

Code: Select all

int lightPin = 4;    
int tempPin = 3;
int incomingByte = 0;                       
int val = 0;           

void setup()
{
  Serial.begin(9600);          
}
void loop()
{
  if (Serial.available() > 0) {
                // read the incoming byte:
                incomingByte = Serial.read();
                if (incomingByte == 84){ //84 is byte / ASCII value of the 'T' sent from python
                  //it was T
                  val = analogRead(tempPin);    
                  Serial.println(val);                   
                }
                else if (incomingByte == 76){ //76 is L
                  //it was L
                  val = analogRead(lightPin);    
                  Serial.println(val);  
                }
        }    
}
And the Python program

Code: Select all

from SimpleCV import Image, Camera
import time
import serial #comms with Arduino

ser = serial.Serial('/dev/ttyACM0', 9600)

#Give it a couple of seconds, sometimes seem to get connection issues.
time.sleep(2)
secs = 0
lightfile = "/var/www/" + time.strftime("%d-%m-%Y-%H-%M-%S") + "-light.dat" #filenames have date and time to the seond of the beginning of aquisition.
tempfile = "/var/www/" + time.strftime("%d-%m-%Y-%H-%M-%S") + "-temp.dat"
while True:
	#read temp and write to file
	line = str(secs) # X axis will be the number of seconds elapsed since aquisition began
	ser.write('T')#Send 'T' to the arduino to tell it to take a temperature reading
	line = line + " " + ser.readline()
	file = open(tempfile, "a")
	print("t= " + line)
	file.write(line)
	file.close()
	#read light and write to file
	line = str(secs)
	ser.write('L')#Send 'L' to the arduino to tell it to take a light reading
	line = line + " " + ser.readline() #read the value returned by th arduino
	file = open(lightfile, "a")
	print("l= " + line)
	file.write(line)
	file.close()	
	
	cam = Camera()
	img = cam.getImage()
	img.save("/var/www/dcim/" + time.strftime("%Y-%m-%d-%H-%M-%S") +".jpg")
	time.sleep(1)
	secs = secs + 1

poing
Posts: 1131
Joined: Thu Mar 08, 2012 3:32 pm

Re: Solar eclipse experiments

Thu Mar 12, 2015 12:25 pm

morphy_richards wrote:Here's the pinhole camera we're going to use. Itw as sunny today, originaly the camera was just the box at the end but the projected disk of the sun was tiny so I've stuck a big long tube thing on the front in the hope I can get a better sized disk.

But then the sun went in :evil:

On the back inside the box is a sheet of white paper where the image gets projected, a web cam will point at that, there is a tiny pinhole made with a compass in the centre of the foil at the front. I will stick the arduino with light and temperature sensors on the front of the long barrel.

That will be connected to an (solar)pi and to the network with a long patch cable. Data to be shared via http.

Hoping to do a trial run on this Friday morning as the class will need practice connecting to it, however weather forcast does not look favourable.
Image
Also needs some sort of quick and dirty Dobsonian mount.
Seeing the thread I was about to propose this. Around 10-12 years ago there was a partial eclipse here while I had young children. I got some cores from rolls of carpet from a shop nearby, added a pinhole to one side and cut a viewing hole on the other side where the sun was projected on white paper. The cores were about 4 meters long and were kept upright by sticking them through a piece of board with a slightly over sized elliptical hole. You need to adjust the angle constantly as the sun travels with a speed of close to 1 degree per 15 minutes while the angular size of the sun is about 0.5 degrees.

Return to “Staffroom, classroom and projects”