I am leading a project for my High School NASA Club, and am looking for some advice. The goal of our project is to use a Raspberry Pi to control a camera that takes photos of the sky, and uses the photo to calculate sky glow, and create a map of where it in the sky is there the most sky glow. After calculating sky glow the device would add it to a plot that shows how sky glow varies throughout the year, and creates a nightly twitter post rating the night for Astronomy. I currently have working code that when given a picture, it will convert down to greyscale, and then find the brightness map, and find an average sky glow. The part that I am stuck on is in figuring out what kind of camera to use. I don't know if the RPi camera module would work for taking photos of the stars, or if I would be better suited using a USB webcam with it. I am not sure what factors are important in this decision at all. Also, once the camera is set up, what would be the best process for calibrating it to get values that agree most closely with accepted ones? I couldn't decide if this should go on the Astronomy, Raspberry Pi, or Photography Stack Exchange, but I chose this one since sky glow may be something astronomers calculate a lot. Thank you for your help.

  • 1
    $\begingroup$ Definitely sounds like an interesting and useful project, I wish you the best of luck! I would think you need a camera that can "see well in the dark", possibly one that can take a digital picture over a period of time. I am not an expert in this area, just my personal thoughts. $\endgroup$
    – Jonathan
    Sep 21, 2014 at 10:30
  • $\begingroup$ Also remember that you'll need a tracking device if you have longer exposure times in order to accurately estimate the sky glow. $\endgroup$
    – Takku
    Sep 23, 2014 at 17:15
  • $\begingroup$ Why would it need a tracking device if it is looking at the whole sky? Even if stars streak, shouldn't the average brightness levels stay about constant? If not, what do I track, where zenith was? $\endgroup$
    – rp.beltran
    Sep 23, 2014 at 21:38

2 Answers 2


I would recommend the PiNoir Camera. Since it has no IR-filter attached, it's perfectly made for nightly observations. If you need the Raspberry just to calculate Skyglow in general, you could try to collect all light and bundle it to a beam, then measure its intensity.

What also came to mind is: When calculating the rating of the night, or a point in the sky, consider moon phases in your calculations. A bright and full moon will significantly raise average sky-glow and vice versa.

  • $\begingroup$ Thank you for your help. Would the lack of an IR filter create misleading results since light pollution is not IR? I would expect that this would contribute to noise, but I could be mistaken. $\endgroup$
    – rp.beltran
    Oct 3, 2014 at 23:44

Well, light, and the resulting sky glow comes in a lot of different wavelengths, so the first question you need to ask yourself is what range are you looking for? If this project is intended to give someone a good idea as to whether it is worth their while to drag out the telescope on a given night, chances are you only care about human visible wavelengths (but don't underestimate the amateur radio astronomers in your area!). My phone's camera will pick up light in the near-infrared, so you want to be careful.

Secondly, you need a camera with very low noise. If you go into a windowless room with the lights off, and take a picture, you want to have as close to 0x000000 rgb measurement from every resulting pixel as possible. A magnitude 0 star will only produce 2.08 microlux, so electrical noise can alter your results significantly.

Third, and this may be obvious, make yourself a cardboard "horizon shield" (a name I made up) to block any direct sources of light.

And if it isn't of vital importance to use an actual camera, since you are using a raspberry pi, you might just want to go with a lux meter instead. This one has a separate meter for the human visible wavelength, and the noise should be very low, depending upon how you wire it and what voltage you supply.

  • $\begingroup$ Thanks for the advice. My problem with the lux meter is that I would like to map out where the light pollution is like in the photo on this page on sky and telescope .Do you know what other camera specs will be important? For example, I am not sure what kind of exposures, gain, megapixels, etc. I would need for this project. Thanks again. $\endgroup$
    – rp.beltran
    Oct 3, 2014 at 23:39
  • $\begingroup$ I don't think megapixels would be an important factor. I would imagine that multiple short exposures would be of more use in mapping than a single long one. I don't know anything about gain I'm afraid, so I'll have to let someone else take up this torch. $\endgroup$
    – IchabodE
    Oct 5, 2014 at 5:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .