Thursday, October 12, 2017

Raspberry Pi Skycam w/ NoIR V2 Camera and Light Pollution Filter




NASA seems to assign any scientific instrument a contrived acronym. This camera detects rocks from space. Therefore, may I present WHAMMO - the Wadsworth Hillbilly Automated Meteor/Meterology Observatory.

Introduction

I am interested in building a sky camera for capturing meteors, and also for checking sky conditions. I had a Raspberry Pi and camera. Initial tests were done with a normal V1 camera, which is limited to a 6 second exposure. I switched to a No-IR V2 camera, which allows 10 second exposures and doesn't have an infrared filter. The V2 camera produced much better results.

I added a simple cell phone medium-wide angle lens and found through experimentation that a light pollution filter normally used for observing improved the contrast considerably.

The camera is weather resistant and mounts a shared directory on a network computer, rather than writing to the Pi's flash card. This is to improve reliability, since the Pi's flash would wear fairly rapidly due to the high rate of writes during capture.

This post documents the development of this system and outlines next steps.

Example Video

The camera captures 10 second frames all night long. The frames can easily be stitched together with ffmpeg into a video. The command line I used was:

ffmpeg -thread_queue_size 512 -r 30 -f image2 -i sky_%04d.jpg -vcodec libx264 -preset slow -crf 22 -profile:v baseline -pix_fmt yuv420p test.mp4

The video is best viewed in full resolution rather than a small window - the stars are single pixels, in many cases. The MP4 is available for download here or you can follow the link below to Vimeo and full-screen it there.


Raspberry Pi Skycam w/ NOIR v2 Camera and Light Pollution Filter from Jason Bowling on Vimeo.


The camera was in my back yard in Wadsworth, a bright orange band on the dark sky finder map.




Still Frame + Star Chart



A full resolution copy of this image is here

The image is the result of stacking a set of 25 images in Deep Sky Stacker with the default settings. A single raw frame is available for comparison here.

You can then take that image and do a simple level adjustment to improve contrast - at that point there are far more stars in the image that I can see by eye alone. The Pleides are easily resolved into multiple stars in the image, and it's only visible at my house with some effort.


Full resolution version of the stacked and level-adjusted image is here.

V1 vs V2 camera

I tried the V1 camera first, since I had one, but wasn't very happy with the results. I found the results with the V2 NoIR camera to be much better in terms of sensitivity and noise. The V1 did work reasonably well with the saturation increased. Example video from the V1 camera is here.

Wide Lens

I used a cell phone lens kit similar to this one - the exact kit is no longer available on Amazon. I used the medium-wide lens - the widest resulted in significant distortion and I have too many trees in the back yard to make much use of a wider view anyway. I just tacked the lens to the 3d printed camera case with hot glue, since it's easily removable. I considered cyanoacrylate glue but didn't want to fog the lens.

Capture method

The command below captures the images in timelapse mode, at a resolution selected because it uses 2x2 binning to effectively increase pixel size. This improves low light sensitivity and signal to noise ratio.


#1640x1232 is 2x2 binning mode with v2 cam

mkdir /home/pi/storage/"$(date +"%d-%m-%Y")"

#note: this command is all one line
raspistill -o /home/pi/storage/"$(date +"%d-%m-%Y")"/sky_%04d.jpg -t 500000000 -tl 0 -ss 9900000 -ISO 800 -bm --nopreview -w 1640 -h 1232 &


Light pollution filter 

I found that the addition of a light pollution filter significantly improved contrast for images taken from my home. The filter works reasonably well for visual observation, but the improvement is much more noticeable with a photograph. A comparison is given below. This image is best viewed at full resolution. 



The mount was just a disk of foam board friction fit to the wide angle lens body. The filter is again secured to the mount with hot glue.

The filter does cause a bit of vignetting. I think it's worth it for my purposes.






Mounting A Filesystem On Another Computer

To avoid wear and tear on the flash, and since the Pi wouldn't be up to the image processing tasks I had in mind, I chose to use SSHFS to mount a directory on a Linux server in the house over WiFi.

The command below, all one line, has worked well for me. Without the included options, I occasionally had the mount point drop out between writes sometimes - it has been very reliable since the keep-alive options were included.

sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 jbowling@192.168.1.105:/home/jbowling/skycam storage

If you prefer, you can also mount a share on a Windows computer.

Black Out Those LEDS...

I turned off the board LEDS in software, and blacked out the LED on my WiFi adapter with primer to avoid leaking light up into the dome.

Mechanical Construction

I chose a 6x6x4 junction box from Home Depot (marked Item 10030 on the display case). It doesn't have an IP rating I could find, but has a nice gasket and I've found it held up well under the garden hose.

I chose this acrylic dome and this gasket material.

I drilled holes to mount the Pi on standoffs, and also a radial pattern of larger holes in order to dump heat from the box up into the dome, to reduce dew. 5W isn't a lot of heat, but it might as well get used. A slot is also cut for the camera cable.




I traced the dome with an ink pen and cut it out with scissors, with a final trim by a razor hobby knife.




A shingle nail worked well to punch holes to pass the screws through the gasket. This passed several tests with the garden hose. I am going to use cable glands to waterproof the power line when done.  This design has not been tested long term in heavy weather. 


Power

So far, the camera has just been powered from a 12V jump start battery's USB output. I considered several options for when the camera is mounted permanently.

I considered running an AC power cord into the box and using a standard USB power block to power it, but then I have 110AC in my junction box, and that's not something I want. I decided the way to go was to run 12V over a an extension cord with the ends removed - that way it's nice, heavy double insulated wire being fed by an approved 12V power supply kept nice and dry in the garage. That also gives me spare capacity to install some resistors to reduce ice and dew on the dome, if I choose to. I can install an appropriate low amperate fuse in the line too, in case some water does make it's way in.

If you happen to have a Power Over Ethernet (POE) switch, there are converters that can power the Pi from POE. In my case, that wasn't economical. 

Next Steps

1) The next interesting part will be software to sift through the many thousands of frames and find the meteors and airplanes. That will be a neat challenge.

2) Dew heater. I'll probably add a small network of power resistors under the dome to improve resistance to dew and to melt light ice and snow. The existing setup usually doesn't dew up, but I've had it happen once.

Saturday, September 9, 2017

Sunspots AR 2679, AR 2675, AR 2673 on 09-Sept-2017


Sunspots AR 2679, AR 2675, AR 2673 on 09-Sept-2017 w/ 127SLT and ASI290MC at prime focus.


Given the unusual sunspot activity over the last few days, I made a Scheiner mask to aid in focusing, since you can't use a Bahtinov mask without a star to focus on. The laptop was set up in the back of our SUV to shield it from glare and I used my DIY solar filter mount w/ Thousand Oaks film on the 127SLT. Best 10% of frames from 1 minute of video.

Tuesday, August 29, 2017

4k wallpaper - Partial Moon




Want some high resolution moon wallpaper? This image is free for noncommercial use.

This picture is a composite from video, taken with a 127SLT and ZWO ASI290MC taken at prime focus. The video was composited with Microsoft's Image Composite Editor (ICE), edited in Gimp to place it on a black background of the right proportions, sharpened with Registax Wavelets, and level adjusted in Gimp.

Download the full resolution image from my Dropbox. In the upper right corner, you'll find a button with two dots. Click it and a dropdown box will open - an option there will let you download the full resolution file.

If you want a similar shot with a fuller moon, I have one here. I personally prefer this one, since it shows features in 3D a bit better due to the more oblique lighting.

Lunar 100 Target 4: Apennine Mountain Range


Image Details: 127SLT w/ 1.5x Barlow and ASI290MC, stacked from one minute of video



Somewhere around 3.75 billion years ago, during the Late Heavy Bombardment, a large asteroid or protoplanet hit the northern hemisphere of the moon. The impact caused an enormous impact crater known as the Imbrium Basin, bordered by high steep walls of rock.

Later lava partially filled in the basin, and hardened to a smooth dark surface known as Mare Imbrium (sea of showers). The Mare Imbrium The Apennine mountains are part of the remainder of the high crater edges. Even though partially buried by lava, the highest peaks are 5 km / 3.1 m high.

The mountain range is about 600 km / 370 m long. It is easily visible with binoculars and is a pretty stunning sight when the terminator line is near it, bringing the 3 dimensional structure into view.

The Apollo 15 mission landed here - the position is marked on the photograph.










Lunar 100 Target 2: Earthshine


Photo Details: 127SLT with SLR at prime focus, stacked from video


Shortly after sunrise or before sunset, when the moon is just a bright sliver, you can sometimes see the dark portion illuminated with a soft, dim glow. To photograph it you have to overexpose the lit portion, resulting in the loss of most detail there.

This dim light is sunlight that has first been reflected from the lit portion of the day side of earth, bounced of the part of the near side of the moon that is not directly lit, and then back down to your retina or camera. Cool, huh?

This diagram from Wikipedia demonstrates the concept very well. 






Saturday, July 22, 2017

Low cost DIY solar filter for small/medium telescopes


Photo Details: 127SLT with SLR at prime focus, stacked from 1 minute of video


In preparation for the coming eclipse, I decided I wanted to get a solar filter for solar observation and photography. What I quickly found was that the actual filter material is not expensive, but buying a filter with a mount designed for your specific telescope can be. I decided to build a mount. Here's one approach that has worked for me.

Warning

There are relatively few ways to seriously injure yourself in amateur astronomy, but solar observation and photography is absolutely one of them. All it takes is a glance through an unfiltered telescope to destroy your eye, rendering yourself blind. You remember how you can set ants on fire with a magnifying glass? A telescope is a very large magnifying glass. Read the warnings that come with the solar filter film and follow them. Cover your finder scope! Be careful. Really careful. The information presented here is what worked for me, but your safety is your responsibility alone. If you are not confident in your ability to build a solar filter that will be securely attached to your telescope, don't undertake a project like this. This filter is for occasional use in dry conditions - it will not hold up with exposure to moisture.




This picture shows how the filter mounts - note that you must cover the finder scope before use!

I checked into the various types of solar film, and decided I like the yellow cast that the Thousand Oaks Optical solar film gives. Amazon sells sheets of it in various sizes. I decided that the easiest way to mount it was to buy a sheet larger than my scope's aperture, and sandwich it between two sheets of foam board. I'd then stack some layers of foam board on the back with a cylinder cut out, so that it had a snug friction fit over the telescope's tube. I bought the 8x8" sheet for my 5"/127 mm scope, which cost about $20.

You don't want the filter falling off while you're observing. A gust of wind must not be able to remove it, so I made it as snug a fit as I reasonably could.

Here's the steps I took.I started by cutting two pieces of foam that were a bit larger than my 8x8" solar film. Those two pieces will support the film and serve as the two layers of the foam/film/foam sandwich.

I then cut four more pieces that were a little smaller than 8x8" to serve as the friction mount on the tube. I used the telescope cap as a guide - remember that you want the inside diameter of the cap, though, not the inside diameter.  I traced the outside diameter and then conservatively freehanded the inside diameter. I cut to the inside diameter, leaving a small amount of material. Remember, we want a snug fit - we can't have this thing falling off and letting the sun burn a hole in our retina or camera sensor. Safety first!



The two sandwich pieces should have a hole cut that is smaller than the tube diameter, because you want the filter mount to slide over the tube and then stop. You want it to hit foam board before it hits film.

I stacked four of the smaller friction mount pieces and glued them together hot glue, and then carefully sanded the inner hole until it fit very snugly over the optical tube. I then hot glued the stack to one of the sandwich mount pieces.




I then sandwiched the film in between the two front sandwich mount pieces, and taped them together securely with electrical tape.  Here you see the finished filter face down, from the back/telescope side. Remember to observe the orientation of the film as specified in the film's instructions!





Your finder scope must be covered, or have a filter of its own. You can get the alignment close by watching the shadow cast by the scope. I usually remove the filter and put the protective cap on the telescope (to protect the optics and against mistakes) and then move the scope until the shadow is a round circle. That gets you pretty close. Then I remove the cap and quickly install the filter.

Go slow, and think through every move before you make it - your natural temptation is to look up at your target. If there are kids or adults who are unfamiliar with telescopes and solar observations with you, be cautious and communicate the hazards to them.

I really enjoy using the filter for both observing and photography. Here's the video that the first image was stacked from, just to give you an idea of what to expect. Be careful, and have fun!













Saturday, July 15, 2017

Lunar 100 Target 15 - The Straight Wall


Photo Details: Celestron 127SLT, ZWO ASI290NC, 1.5x Barlow, stacked from 1 minute video

View Full Size Image

Midway across the moon's southern hemisphere, just north of Tycho crater, is an odd sight. On a lunar surface pocked with round craters, a seemingly straight line cuts across one of the dark, smooth cooled lava plains. This is Rupes Recta, or the Straight Wall. It's the best example of a linear fault line to be seen on the moon with a small telescope.

A fault is a crack in an otherwise continuous in a section of rock. In this case, it is thought that the crack resulted from tension in the crust. The rock would have deformed at first, and then broken. One side drops, exposing a rock face called a scarp. The "wall" looks nearly vertical, but is known to have a slope ranging from 7-20 degrees. It is about 110 km/ 68 miles long and 2.5 km/1.5 miles wide. Estimates of its height range from 240m/800 ft to 500m/1640 ft.

The Straight Wall was first recorded in a drawing by Christiaan Huygens in 1686.