Pages: [1] 2 3 ... 6   Go Down
Author Topic: Measure nightsky with TSL237  (Read 7623 times)
0 Members and 1 Guest are viewing this topic.
Sweden
Offline Offline
Jr. Member
**
Karma: 0
Posts: 80
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, i am working on a program that is gonna use the TSL237 sensor to measure the night sky darkness
That sensor is way more sensitive for low light than for instance the TSL235 that some other has been using, i believe it has a output frequency @ 21.8 μW/cm2 instead of the TSL235 that has 430 μW/cm2.

It may be some other differences to? Here is the PDF for it: https://docs.google.com/viewer?a=v&q=cache:Plvrk-_pFQwJ:www.ams.com/eng/content/download/250250/975933/file/TSL237-J.pdf+TSL237&hl=sv&pid=bl&srcid=ADGEESjUTdu6N77Fo19CfVUS9QH3XGxoRrMVamEsH0Ks55GQgOfOke8V-DaDA0qYjHfaNHOmm9-tUJVo5ovLYqdlAONPu6ZyLsKOm_iwdDCqSC2U_2hMFH2ynBy48mAt6bFnG9jLaAYl&sig=AHIEtbShhuCFzTVDeFqfAbEUaVrjHy2ypw

The reason i want to use this is that when i push a button i want to take a reading from the sensor, (or two-three readings and use a median value for better accuracy) and then calculate that value to Magnitude / square arc second http://old.nightwise.org/magnitudes.htm

so i dont wanna do a continous reading, just when i press a button, take a reading, display the magnitude/ square arc second on a lcd for about 10 sec. and then my arduino will continue with the rest of my code (witch is stepper motor controll with steps printout and a DHT-sensor.

Can this be done with some existing code? Do i have to include a frequency library?

BR/ Daniel
Logged

Offline Offline
Edison Member
*
Karma: 27
Posts: 2033
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That google link is not usable.
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 58
Posts: 3983
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The link got me the datasheet.

I wonder how well could be done using a clear IR led as a sensor? Assuming it could be calibrated.

Logged

Examples can be found in your IDE.

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@GoForSome, Using a LED as a sensor you mean?. I think the photosensitive area is pretty small here (and then the current it generates will be in the range of 1pA or even less), but it would be interesting to test them as their are super cheap and you can get them with any spectral range you want (different led colors).

The TSL237 is one of the most sensitive (well, tied with the TSL238, which is just the same but in other package format) photodiodes with integrated amp op and voltage to freq in the market now, but you will probably want to use some kind of IR-cut filter to cover the sensor because it's sensibility peaks on the red - near IR. The Sky Quality Meter (SQM) uses it as it's sensor, I think Corpze just want to build one of those himself.

One of the problems of these sensors is the huge range of frequencies you want to measure, from ~ 0.1 Hz (or even less in 'pristine skies' !) to nearly 1MHz.

I'm also doing some test in this field with the TSL238 and arduino, using FreqCounter (High Frequencies) and pulseIn for low frequencies, but this mix is far from perfect and it's giving me some headaches hehe.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 505
Posts: 31332
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Can this be done with some existing code?
I doubt it, this sounds unique to me.
Still the code you need is fairly trivial.

Quote
Do i have to include a frequency library?
No you don't. You might be better off writing your own frequency measuring code because then you will know what impact it is having on the rest of your system.
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 58
Posts: 3983
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@GoForSome, Using a LED as a sensor you mean?. I think the photosensitive area is pretty small here (and then the current it generates will be in the range of 1pA or even less), but it would be interesting to test them as their are super cheap and you can get them with any spectral range you want (different led colors).

There's a led as a light sensor sketch where you park a led and resistor between two pins. You charge the led as you would a capacitor and that <= 1 pA degrades the minute charge over time. In the dark it could take a few msecs at least, in the bright it could take less than 50 usecs. Mitsubishi Labs uses it for rock solid, dirt cheap wireless and to make self-adjusting brightness LCD's.

You're not trying to measure low current except as the time it takes to bring a digital pin LOW. It would only be as good as the calibration at best. But then just how to calibrate closely, I dunno.

Charge in a clear-lens IR led would degrade with near-IR and every higher frequency light. Leds with colored lenses filter what they get IIRC, and even that is used in some apps.

Logged

Examples can be found in your IDE.

Sweden
Offline Offline
Jr. Member
**
Karma: 0
Posts: 80
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@GoForSome, Using a LED as a sensor you mean?. I think the photosensitive area is pretty small here (and then the current it generates will be in the range of 1pA or even less), but it would be interesting to test them as their are super cheap and you can get them with any spectral range you want (different led colors).

The TSL237 is one of the most sensitive (well, tied with the TSL238, which is just the same but in other package format) photodiodes with integrated amp op and voltage to freq in the market now, but you will probably want to use some kind of IR-cut filter to cover the sensor because it's sensibility peaks on the red - near IR. The Sky Quality Meter (SQM) uses it as it's sensor, I think Corpze just want to build one of those himself.

One of the problems of these sensors is the huge range of frequencies you want to measure, from ~ 0.1 Hz (or even less in 'pristine skies' !) to nearly 1MHz.

I'm also doing some test in this field with the TSL238 and arduino, using FreqCounter (High Frequencies) and pulseIn for low frequencies, but this mix is far from perfect and it's giving me some headaches hehe.

Yep, thats right, i am gonna build my own SQM, IR and UV-filter is already on its way smiley But i still haven´t found any lens that matches the SQM-L lens... (40 degree, -20 - +20 degrees)

This is the code i am talking about: http://arduino.cc/forum/index.php/topic,21536.msg160200.html#msg160200

Wouldn't that go?

I wonder how the conversion from uW/cm2 to mag/sq arc second would look like, and print that out to the LCD :/
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

SQM lens is just a half-sphere ball lens (you can get them from Edmund Scientific). Those lenses have a really short focal length and a decent aperture.

About the code, every time I try to write an interrupt-driven counter, I end forgiving it and looking for alternatives because of problems like overflows, freezes with intense light (you can fix them, but I think it's not trivial). And they don't solve themselves the 'slow' frequency reading mode needed in very dark nights (mag>21). For that, you need to count the pulse period (which can be as long as 10 seconds or so on unpolluted skies).

The mag/arcsec2 conversion is as simple as doing

ZP - 2.5*log10(frequency)

where ZP is the zero point, which depends on each individual photometer (sensitivity of *your* sensor, the filter you are using, the lens characteristics). It's probably the hardest part of the project if you want to be accurate and you won't probably get 'scientific-level' values unless you can access already calibrated photodiodes / lamps to study the response of your system.

The LCD output is nearly trivial  in arduino (both in normal LCDs and I2C ones) ;-)
« Last Edit: February 26, 2013, 10:29:56 am by minaya » Logged

Sweden
Offline Offline
Jr. Member
**
Karma: 0
Posts: 80
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is the breadboard of the SQM, i wonder what kind of lens it is?
http://jatobservatory.org/SQM/SQM_kit.html

Is the ZP specified in the datasheet or do i have to find that out for myself?
« Last Edit: February 26, 2013, 03:05:44 pm by Corpze » Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 58
Posts: 3983
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Best I could hope for would be a relative haze and back-scatter meter.  smiley-mr-green
I'll leave the rest to you guys, the weather service and NASA.

Just a thought... If you know a star's magnitude as seen from orbit then could you judge sky quality by the apparent brightness?


Logged

Examples can be found in your IDE.

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@GoForSmoke, each star contributes to the 'total' flux on the sky with the same amount of photons no matter how the sky is polluted. In fact, in urban observatories it's very possible to do some limited photometry with objects that are bright enough. You just need to 'subtract' the background flux to the total (background object) flux and you get the net object flux.

The problem with light pollution is the 'photonic' noise it adds. This photonic noise, that scales with the root square of the flux (in photoelectrons) tends to make the observation of a particular object in the sky just impossible if it is dimm. This idea applies to digital astronomical images, but with your eyes the idea is somewhat similar.

@Corpze, the zero point needs to be measured for each individual photometric system, no matter if it's a telescope ccd, a camera with an objective lens or your little TSL photometers with IR-cut filter and lens. One way (maybe the recommended one) to measure it is using calibrated lamps and calibrated photodiodes as reference. But in the end, you can approximately calibrate it if you know someone who has a SQM or you have a digital camera capable to take fixed exposures images (you calibrate the camera   filter   lens system with absolute photometry as usual in astronomy, then determine the Night Sky Brightness at some point in the sky with your already calibrated camera, take some measures with the TSL pointing at that direction and derive an approximate Zero Point to match both measures).

As I said, this ZP calibration is (repeat after me) *hard* if you want to make your instrument scientific-grade. Depends of course in your particular interest, but sometimes people (even in scientific projects) just use them 'differentially'. If you just need to measure how the sky at some location compares to the sky at other locations (or how it changes over the time), you can even use the direct 'frequency' as your variable, no need to mess around on these strange unit systems hehe.

The frequency measured with these photodiodes increases linearly with the number of photons.
« Last Edit: February 26, 2013, 04:47:07 pm by minaya » Logged

Sweden
Offline Offline
Jr. Member
**
Karma: 0
Posts: 80
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@GoForSmoke, each star contributes to the 'total' flux on the sky with the same amount of photons no matter how the sky is polluted. In fact, in urban observatories it's very possible to do some limited photometry with objects that are bright enough. You just need to 'subtract' the background flux to the total (background object) flux and you get the net object flux.

The problem with light pollution is the 'photonic' noise it adds. This photonic noise, that scales with the root square of the flux (in photoelectrons) tends to make the observation of a particular object in the sky just impossible if it is dimm. This idea applies to digital astronomical images, but with your eyes the idea is somewhat similar.

@Corpze, the zero point needs to be measured for each individual photometric system, no matter if it's a telescope ccd, a camera with an objective lens or your little TSL photometers with IR-cut filter and lens. One way (maybe the recommended one) to measure it is using calibrated lamps and calibrated photodiodes as reference. But in the end, you can approximately calibrate it if you know someone who has a SQM or you have a digital camera capable to take fixed exposures images (you calibrate the camera   filter   lens system with absolute photometry as usual in astronomy, then determine the Night Sky Brightness at some point in the sky with your already calibrated camera, take some measures with the TSL pointing at that direction and derive an approximate Zero Point to match both measures).

As I said, this ZP calibration is (repeat after me) *hard* if you want to make your instrument scientific-grade. Depends of course in your particular interest, but sometimes people (even in scientific projects) just use them 'differentially'. If you just need to measure how the sky at some location compares to the sky at other locations (or how it changes over the time), you can even use the direct 'frequency' as your variable, no need to mess around on these strange unit systems hehe.

The frequency measured with these photodiodes increases linearly with the number of photons.

Thanks for your very good answer, i will use the meter for my own, to measure different sites where i do my astrophotographing.

For the ZP i have a luxmeter that i can use, it will not be scientific grade, but good enough for me!

It´s just one thing left, does anyone know what kind of "lensmodule" i have marked on the picture?


* SQM-board.jpg (41.98 KB, 676x449 - viewed 42 times.)
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 58
Posts: 3983
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@GoForSmoke, each star contributes to the 'total' flux on the sky with the same amount of photons no matter how the sky is polluted.

There must be something you say that I don't understand.

Parts of the sky, especially at low alt, do get a lot of particles/dust from natural and man-made sources. At night here we have electric generation stations do their stack cleaning (evidenced by the crap laid down for miles with lead, cadmium and mercury as well as sulfur compounds). For well over 10 years now the pall running from India clear across China has cut sunlight by 15% and more, reducing crop yields. Even CLOUDS reflect light back to space... water and dust pollution!

Somehow I don't think that all the photons from Sirius make it to Earth surface. Flying over Earth it's possible to see how much dust and humidity in the lower atmosphere blur details compared to up in the mountains from the same AGL. And up in the mountains where the air is thinner and doesn't have such a load of junk (first time I really understood was on Pike's Peak) objects miles away look very clear where at sea level they're blurred in less than 2 miles.

When a big volcano pops (Krakatoa around 1880) the whole planet cools just from the dust.

Does starlight get through all that with the same photon count? Sunlight doesn't and the Sun is a  star.

I've had the chance to see the night sky from 6500 ft (the saddle between Mauna Loa and Mauna Kea) and 8000-9000 (central north New Mexico) up away from any cities before and wow, the sky doesn't just look more clear but far brighter.

Logged

Examples can be found in your IDE.

Sweden
Offline Offline
Jr. Member
**
Karma: 0
Posts: 80
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Thanks for your very good answer, i will use the meter for my own, to measure different sites where i do my astrophotographing.

For the ZP i have a luxmeter that i can use, it will not be scientific grade, but good enough for me!

It´s just one thing left, does anyone know what kind of "lensmodule" i have marked on the picture?


Oh, and one more question; The code i am gonna start out with is this: http://arduino.cc/forum/index.php/topic,21536.msg160200.html#msg160200

But will that work? it is written for a Arduino duemilanove?
« Last Edit: February 26, 2013, 10:30:03 pm by Corpze » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@GoForSmoke.

I didn't mention the important 'extinction' effect (I was just talking about the 'light pollution' effect only, the photons added by human activities). Of course, dust particles extincts and scatters the radiation of objects that are outside the atmosphere, but normally the human effect here isn't as important as one thought (maybe in heavy polluted cities). The main effect of those particles is to reflect the scattered light that comes from cities to the outside.

In high altitude mountains like Mauna Kea, Atacama, Roque de los Muchachos aerosols (these atmospheric particles you mention) abundance is relatively low, and thus is the effect on the night sky.

But of course, if the sky is foggy/cloudy o very polluted (like in Pekin or even at desert with sand storms), you won't see anything. smiley-wink.
Logged

Pages: [1] 2 3 ... 6   Go Up
Jump to: