Hacker News new | past | comments | ask | show | jobs | submit login
Roll Your Own All-Sky, Raspberry Pi Camera (ieee.org)
273 points by sundarurfriend 57 days ago | hide | past | favorite | 55 comments

Having done this…

- don’t make your camera the highest thing around. My dome was showing scratches. Eventually I got a nice photo of the inside of a juvenile bald eagle’s talon. A bird’s gonna perch where a bird’s gonna perch. Sacrifice some sky and put a better perch next to it.

- the manual focus cameras seem to be temperature dependent. Maybe get something that can be auto focused or add a heater to control night time lows.

- for long exposure low light work, you may find you get much better pictures in very cold weather. This relates to charge leakage in the sensor. If you decide to try keeping your sensor cold, consider condensation. Maybe have something in there that is colder.

- also for long exposures, the noise in the image from leakage tends to be device pixel specific. You can make a dark view map at a given temperature and use it to denoise your images. You’ll need a shutter though, or do something clever with multiple frames as stars move around to get “darkest sample” or something

I've definitely run into the long exposure heat issues. In my hemisphere, the central part of the Milky Way is best viewed during the summer. In my local part of the hemisphere, its ridiculously hot at that time. Even 20s exposures will be noisy. I have a smaller pelican case that I've punched a hole in for the lens to sit outside the case, and then rigged a bunch of those reusable freezer packs for coolers inside. Then covid happened, and I now no longer have a car. To this day, I haven't taken it anywhere to test it out. Now, I'm really sad that I just realized how long it's actually been since I've imaged the sky. <wipesAwayTears>

Do you have your pictures or videos posted anywhere? Trying to decide if the juice is worth the squeeze.

Regardiing condensation, if you can make the case kind of air tight, maybe you can either fill it with nitrogen, make a light vacuum, or pre-dry the air inside (I remember some tricks to avoid condensation in underwater cameras that consisted in storing it open in the fridge for some hours or something like that, to have drier air inside, I'll look for that again...)

Throw desiccant in there if it’s pretty airtight.

I've had zero issues with ZWO cameras that have a manual focus lens attached to it and have had air temps from 95F to -45F.

> Maybe have something in there that is colder

Such as?

Peltier element

there are astro specific cameras with a cooler. Peltier + heatsink.

I would guess a Pelletier element?

John Riccitiello's heart?

The Pi cameras might seem like a good choice because they're cheap, and might be a good way to start. But with all of the work required to build, install, and maintain one, the cost of the camera is a drop in the bucket. I used a much better camera from ZWO (ASI462MC) for about $300 (I actually ended up building a second one with the ASI462MM (monochrome)). It even comes with an all sky lens. IMHO it doesn't make a lot of sense to cheap out on the camera with all the effort involved in building one. I also needed to add a short length of Nichrome wire (1amp at 12v) to fight condensation.

I started with the color camera, but had to give up on any real meteor detection due to the amount of light pollution, and the fact that I live directly in line with the airport in Louisville. I built the second monochrome version, since the monochrome versions are roughly 3x as sensitive, hoping it'd be better at detecting meteors at shorter exposure lengths. But it still required exposures of a few seconds, much longer that you're typical meteor. So, now I just have two all sky cameras doing 20 second exposures. The monochrome one will still pull out the Milky Way from my Bortle 7/8 skies, so I just like the pictures it takes and don't plan to change it.

You're doing astophotography is Louisville? I'm doing it in Lexington! We should chat

I'm definitely late to this thread, but I wanted to ask: do you know how much of the world is covered by sky cameras? I was just envisioning a google maps kind of interface where you could grab shots from people who share their images.

I really wish RPi would come out with a truly HQ camera.

Their "HQ" camera is really a LOW quality camera with a shitty sensor that isn't even micro-four-thirds. The lens choices are abysmal. I want to see at LEAST APS-C or better yet full frame. Considering a full-blown mirrorless full frame camera costs $2400 it shouldn't cost more than $1000 for sensor only, and I'm 1000% willing to pay for a hackable, programmable full frame sensor especially for night sky photography that can accept the vast variety of full frame lenses already available.

There's the Sony QX1 which comes close to what I want but sadly they didn't continue that or produce them anymore.

I do think the HQ camera is due an upgrade, though I'd prefer a proper low-light camera, ideally Sony Starvis.

Although you can buy cheap Starvis modules you don't have full control over the exposure time and/or can only shoot in a compressed format. The HQ camera is well-supported with good drivers, like all Raspberry Pi hardware, which is why people still use the HQ Camera for cheap astronomy projects despite having a small sensor and poor low-light performance.

Full frame cameras typically perform better than "low light" cameras with small sensors. Everything else equal, bigger collection area trumps everything else, simply because more photons means better SNR under shot noise assumptions. SNR of a pixel scales with sqrt(average number of photons collected).

When your full frame sensor has 25X the physical area as a small sensor, that's hard to beat. You can't easily get a 25X increase in number of photons collected on the smaller sensor. There are only so many photons that hit it. You can engineer the hell out of the silicon, but the fill factor multiplied by quantum efficiency of the sensors is already much higher than 1/25 so there is no theoretical room for a 25X improvement even under ideal assumptions. You can increase the number of photons that hit it with bigger, larger aperture lenses, but beyond f/2.0 or so you start hitting limits with our current optical technology in correcting chromatic aberration and other issues, and it will take miracles to get a 25X improvement on the latest state-of-the-art optics.

Sony's full frame sensors also have the same back-illuminated design as their Starvis-branded sensors, by the way, so that part is not unique to Starvis.

In general, yes, but there are good reasons not to use a full frame sensor. They’re big, they run hot and they’re expensive. You’re looking at 10x the price range of the HQ cam. And one trouble with big pixels is that it means low pixel density.

If you take an IMX585 astronomy camera it will produce a better quality image than any used or new DSLR in the same price range, despite having pixels a fraction of the size. The (considerable) negative side is the smaller frame.

Full frame cameras are below $1000. The sensor is probably quarter of that. But your camera module for Raspberry Pi will cost more than $1000. You save some by getting rid of the camera display and buttons. But you still have to design the camera control board, the lens mount or lens, and the housing. You are doing it on small scale, while the camera makers on doing it at large scale and with lots of expertise.

This is why everyone who wants better sensor buys a camera and attaches it to Raspberry Pi.

I am surprised that there isn't a 1" camera module, that is natural place for better sensor but still fits on board and could use C-mount lenses.

The HQ has a C-mount so you can put any C-mount lens on it. And there are plenty of options in that space.

In my case, I simply can't stand the raspberry pi's camera connector so I buy my own "industrial machine vision" cameras with C-mount. In my case I found the Mindvision line to be the best, I connect with either USB3 or GigE (both of which are much nicer cables than the Pi camera connector) and use the Mindvision SDK (it's not a uvc device, instead you write some python that interacts with the camera, giving you deep level of control).

The camera is good for its price. If you want a MFT sensor, why don't you use something like a Lumix G9 and connect it to the RPi via USB? It's a lot less than $1000 these days.

Have the Raspberry Pi people done anything even similar to the release of a $1000 part? It doesn't really seem up their alley.

Anyone knows how did they make the beautiful diagrams?

The images are credited to James Provost, a technical illustrator.


He has a bunch of interviews at https://technicalillustrators.org/ (which he co-founded) but I didn't find an interview of him.

On his blog in 2014 he notes in passing some of the tools he uses. https://jamesprovost.com/blog/surface-pro-3-for-illustrators

This, diagrams and imagery were top notch.

https://github.com/aaronwmorris/indi-allsky is far superior all sky software. Also supports basically running the software on any linux based system not just a pi. Have mine running on an odroid.

I've been in the process of planning a backyard observatory some and have been looking at all sky cameras to measure clouds, seeing and sky glow.

This project looks really promising, especially if it has an ascom driver

My next thought was that if I had a bearing on that luminous streak, and if at least one other person in my region also had such information, we might be able to triangulate on it and narrow down where any landing zone might be.

It seems like deploying these in pairs at a minimum would make sense. In addition to adding spatial information, it gives you a backup for any observations at all.

The illustrations are great. Reminded me of how the storage disk from the starhinge in Stephenson's Anathem must have looked.

It would be neat if someone wrote the software to turn something that into an astro-navigation device like https://airandspace.si.edu/collection-objects/sr-71-astroine....

Slightly off-topic, but did anyone ever run a sky camera with a vision model that recognize what it sees?

Like Meta’s SAM.

Plate solving - identifying constellations and deep sky objects by the relative positions of stars - is a pretty common part of astronomy software and possible on a raspberry pi. For example https://github.com/dstndstn/astrometry.net

I'm not aware of anything that can, say, identify a meteor and differentiate it from a plane or satellite, but I'm sure it's possible.

Canadian checking in; Has anyone ever built a cost-effective outdoor camera (pi-based or otherwise) that can withstand extreme cold (~ -35c)? Or, are there any off the shelf products that don't cost an arm and a leg?

How does your image / video processing pipeline look like ?

How do you prevent the sun from damaging the sensor over time?

I have had an all sky camera out for about two years now without issue, also never heard of anyone having an issue. The first I've heard is the comment above about using a spotting scope, which would have a much larger objective than a typical all sky camera, and sounds like the Bayer array (the filter for color imaging) was damaged. I imagine most sensor manufacturers know their sensors will get pointed at the Sun and some point, and are designed to account for it. Especially since pictures of Sunsets/Sunrises are pretty popular.

The Sun is actually pretty small (1/2 a degree), and the image of the Sun will only occupy a given pixel for about 2 minutes. The next day, the declination of the Sun will change, there may be some overlap in the pixels it falls on. But over the course of a year, the amount of time a given pixel will see the actual image of the sun is pretty short, likely less than 10 minutes for the worst case near the solstice. And the pixels getting it near the equinox will probably only get hit for 4 minutes a year, and some not at all. So they're not really taking the beating it may seem.

I've had a pi 1 camera looking out at the horizon for many years and it didn't really get damaged.

Don't forget the default lens is tiny. It doesn't really capture a ton of light.

I had one pointed east at the horizon the show a lighthouse a mile away using an old spotting scope. Worked ok until the sun made its way around to rise in frame. Now everything is greenish. I think with sufficient magnification you can cook your color filters or maybe the sensor wells under the filters.

If you know the diameter of the lens, and your areas insolation, you could work out it's annual solar energy exposure in watts yeah.

Mine has been going on 4 years now with zero issues with the camera (ZWO 178MC). The acrylic domes however are a hot mess. Frequently have to replace them. Really need to find high quality glass domes preferably with anti-reflective coating.

I helped build a similar setup a "long" time ago to build a sky HDR database. We had over 40k images across hundreds of days. The longer exposures definitely did not help (even with a ND filter) and by the end the camera had some broken pixels along the sun trail. Nothing noticeable visually, but likely not good for computer vision purpose. If we were to redo this it would be definitely a valid concern to address.

Is there a MIPI camera that doesn't suck?

I have every official Pi camera, and they are all just terrible. I would never use them for anything artistic, when it's easy to get far-superior results from even a cheap regular camera or used SLR.

I'm just curious if there's a very-high-quality camera with a MIPI interface. Thinking it through... I only really care about video. Even if it's only HD resolution, something with excellent light sensitivity & low noise would be great.

>Is there a MIPI camera that doesn't suck?

No there isn't. Sorry. I've tried them all and their dynamic range sucks so bad....

Anyway, who thinks otherwise, I recommend you see the same non-ideally lit scene with for example a modern "analog" fpv camera like Foxeer Nano Toothless 2 (a starlight 0.1lux camera that maintains it's great dynamic range in full sun).

The only mipi camera that has a shred of a chance to compete is starvis IMX327LQR. On paper it should be pretty good. I'm planning to test one at some point.

Also, the cameras built into various Cctv Ip cameras one can buy from China are pretty good, but good luck getting them to work with anything other than the original equipment.

Ha, thanks for the reply.

Tangent to your IP-camera comment: I replaced all my old SD, composite household security cameras with cheap-O TVI cameras, and I am impressed at how well this oddball HD format works over the same coax cables.

Often it's the lens that results in poor quality images. You can get a RPi sensor with CS mount and add your own lens of your choosing. It's been a huge upgrade in quality and is relatively easy to do.

There is also a lot of "secret sauce" that Apple and others do to the raw image data that comes off the sensor. I don't doubt much better quality could be eked out of the RPi cameras if there was a determined effort to do so.

There are some pretty fancy-looking industrial cameras that support MIPI, like the Alvium line[1] - but I suspect they are spendy...

1: https://www.alliedvision.com/en/products/camera-series/alviu...

Thanks. I guess at some point the value proposition is antithetical to that of the Pi itself...

Yeah the problem is optics (the more important part of getting really good images) are expensive, and few companies make decent lenses that target tiny sensors.

So you're stuck with the little optics included with the tiny hobby cameras from Pi or ArduCam (et all). They're okay for some purposes but a lot worse than even a cheap SLR/Mirrorless lens.

The best results I've gotten are with the C-mount camera module, an adapter, and a wide angle Sony, Nikon, or Canon lens—all of which cost in the hundreds :)

I have the C-mount module and a Canon security-camera lens with zoom, focus, and aperture settings. Disappointingly, it still sucks.

I know there are excellent C-mount lenses, because I shot a great-looking movie on a Bolex with them.

Thrift/antique stores are a place to look for old lenses on the cheap. If you've got a C-mount adapter for your sensor you can mount the lens on it. Then you can manually focus it and epoxy it on the right point.

For light sensitivity there's an Arducam IMX482 MIPI module. Unfortunately you don't have a lot of control over it and can't take long exposures, but it's probably fine for HD video. Every other cheap low-light module I've seen is hobbled in some crucial way, either at the hardware level or drivers.

They suck at video. Take stills and they do a lot better.

I haven't found any decent MIPI cameras. Instead, I buy machine vision cameras from Mindvision. USB3 or GigE connectors.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact