Bikeman
Posts: 63
Joined: Sun Nov 04, 2012 9:03 pm
Location: near Hannover, Germany

Re: RaspberryPi Camera for Astrophotography

Thu Sep 05, 2013 8:56 pm

Indeed, that would be a good idea. Anyway I think the video mode (for later stacking with Registax etc) is the best justification for using the camera in a astrophotography context.

I did some shots of the sun today (with the aperture covered by a solar filter, of course!!!), and it wasn't too convincing. Finding the right focus is really tricky. Once the moon is in a more convenient phase I'll try that, plus maybe Jupiter with a "real", driven 6" Newtonian. The FOV with that one should be about 0.2 deg, or less than 0.1 deg with a Barlow lens, so Jupiter would be several dozens of pixels across. Might be enough to recognize it as Jupiter... we will see. But probably the Moon would be the best target for this kind of sensor.

CS
HBE

rcpettengill
Posts: 2
Joined: Fri Sep 13, 2013 2:19 pm

Re: RaspberryPi Camera for Astrophotography

Fri Sep 13, 2013 2:29 pm

Glad to see other's working on this. The Raspberry Pi with wireless and camera adapters is less expensive than a webcam. My notion is to achieve is laptop-free astrophotography with:

* Raspberry Pi + camera module + wireless network
* small USB rechargeable battery pack
* iPhone or iPad using the browser for camera/telescope control interface, focus, and image display

I started prototyping my own system. So far:

* I removed the fixed lens from my RPi camera.
* I've build a stable adapter for the RPi camera module to the Questar rear port camera adapter for prime focus.
* I'm controlling the the RPi through a ssh shell connection for still photos and to stream video via VLC to my laptop (should work on my iPad as well) for focussing.

There are lots of things still to do:
* a better case for the RPi that will attach more securely to the Questar.
* the Web interface to control the camera.
* configure a peer to peer WiFi connection on the RPi for my iPad (the house WiFi is a bit week out in the yard).
* killing the red video recording LED, ...

The RPi should also be capable of driving high end webcams using USB as well as chips better suited to astrophotography that use it's dedicated camera bus. Goto scope control should be possible as well (not a priority for me now with the push-to Questar).

Last night I finally got a chance for some astro photos which turned out relatively well. I haven't written up any documentation yet, but I have a flickr photo set that shows my setup and an example shot:

http://www.flickr.com/photos/robpetteng ... 483690850/

As soon as I have more of the pending issues resolved, I'll try some deep sky stuff with longer exposures using the clock drive.

;rob

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Fri Sep 20, 2013 1:54 pm

I've been working on a autoguide system for my LX10, still in development !

I've mounted the RPi camera by expanding the RPi case with a second box, I thought the ribbon cable would be very vulnerable. I removed the lens and replaced it with the 1.25" adaptor to the telescope.

I'm also working on a python autoguiding programme. It uses the pictures from the RPI camera, or can use a USB webcam, and sends Meade ASCII commands, eg #Mgn1000, via USB to an Arduino Uno which then controls my LX10 via relays. I suppose it maybe able to drive an LX200 via serial on USB.

The screen shot below is using a 80mm guide scope on a target, not a star, for testing.
I'm not sure of the sensitivity of the camera yet.

It's still in the workshop but will hopefully make it outdoors this winter !!.

Gordon77
Attachments
Rpi_2.jpg
Rpi_2.jpg (48.31 KiB) Viewed 18116 times
screenshot_1.jpg
screenshot_1.jpg (57.37 KiB) Viewed 18159 times

thsBavR10
Posts: 233
Joined: Sat Jul 21, 2012 3:11 pm

Re: RaspberryPi Camera for Astrophotography

Thu Sep 26, 2013 4:26 pm

Hi Gordon 77,

I'm very interested in your project and your autoguide program.
The screenshots look very impressive.
Are you planning to make your program open source/freeware?

Thomas

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Thu Sep 26, 2013 5:38 pm

thsBavR10 wrote:Hi Gordon 77,

I'm very interested in your project and your autoguide program.
The screenshots look very impressive.
Are you planning to make your program open source/freeware?

Thomas
Yes no problem. It's not finished but you can have a version to try.
It's getting a bit big to paste on here, and I don't have a clue about using github etc !

I'll try to upload the code on here.
Last edited by gordon77 on Fri Sep 27, 2013 2:16 am, edited 1 time in total.

thsBavR10
Posts: 233
Joined: Sat Jul 21, 2012 3:11 pm

Re: RaspberryPi Camera for Astrophotography

Thu Sep 26, 2013 6:16 pm

Hi,
my telecope is a Meade ETX 125 PE.
I'll try to find the yahoo-group you are posting.
Many thanks for your help,
Thomas

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Fri Sep 27, 2013 1:55 pm

You will need the latest version of Raspistill in /home/pi as my program calls ./raspistill....

Code: Select all

wget https://www.dropbox.com/s/7g3ps83a2rrxtp0/raspistill
chmod a+x raspistill

You will need python-serial installing, using 'sudo apt-get install python-serial'

Run the python program with IDLE, not IDLE3

It will start in demo mode where you will see a star and can click on it and start the autoguide simulation etc.

To enable a camera set 'camera_connected = 1', if using a USB camera rather than a RPI camera set 'use_RPicamera = 0'
When you have an Arduino Uno etc on the serial port set 'serial_connected = 1'

Gordon 77
Last edited by gordon77 on Sat Sep 28, 2013 9:36 pm, edited 2 times in total.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23397
Joined: Sat Jul 30, 2011 7:41 pm

Re: RaspberryPi Camera for Astrophotography

Fri Sep 27, 2013 2:18 pm

I've got a Celestron C8 on an goto equatorial mount that I really don't use enough. This looks like a good excuse to get it out on the lawn!

Good job on the pics above.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Fri Sep 27, 2013 2:23 pm

jamesh wrote:I've got a Celestron C8 on an goto equatorial mount that I really don't use enough. This looks like a good excuse to get it out on the lawn!

Good job on the pics above.
Hopefully you can modify the code (which I agree isn't very pretty !) for the Celestron, its written for Meade LX200 ASCII commands. I use it to an Arduino Uno, via USB, which drives relays.

The pics so far have all been test cards no stars yet.

thsBavR10
Posts: 233
Joined: Sat Jul 21, 2012 3:11 pm

Re: RaspberryPi Camera for Astrophotography

Fri Sep 27, 2013 2:25 pm

gordon77 wrote:Hopefully you can unzip the .py attached.
You will need the latest version of Raspistill in /home/pi as my program calls ./raspistill....

Code: Select all

wget https://www.dropbox.com/s/7g3ps83a2rrxtp0/raspistill
chmod a+x raspistill
You will need python-serial installing, using 'sudo apt-get install python-serial'
Run the python program with IDLE, not IDLE3. It will start in demo mode where you will see a star and can click on it and start the autoguide simulation etc.
To enable a camera set 'camera_connected = 1', if using a USB camera rather than a RPI camera set 'use_RPicamera = 0'
When you have an Arduino Uno etc on the serial port set 'serial_connected = 1'
Gordon 77
Hello Gordon 77,
unzip did as expected, I installed python-serial, running in IDLE also worked.
At the moment the demo mode is perfect for me! (I have no Arduino at the moment. First I need
to understand your concept, the components and the code. )
Thank you very much for sharing!
Hopefully in the near future the Raspberry Cam will satisfy your (and others) requirements.
Maybe the "Pi-Noir - Night vision camera" will be interesting..

Greetings from germany, Thomas

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Fri Sep 27, 2013 3:10 pm

Heres the connections to the Arduino Uno, and the relay board by 'seeed' I use to wire to the LX10.

You'd need to check out any connections to your, or other, scopes to avoid any damage.

http://seeedstudio.com/wiki/Relay_Shield_V1.0

If you need to use the Arduino Uno I can let you have the program for that but if your scope has a serial connection and can accept LX200 ASCII commands that may work. I don't have experience of that so can't advise.

Gordon77
Attachments
The parts before assembly2.jpg
The parts before assembly2.jpg (50.39 KiB) Viewed 17977 times
My Setup2.jpg
My Setup2.jpg (26.68 KiB) Viewed 17978 times
schematic_2.jpg
schematic_2.jpg (56.92 KiB) Viewed 17977 times

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Wed Oct 23, 2013 8:48 pm

Anyone trying astrophotography should try the New version of raspistill. Take a look at the New version of raspistill thread.
It lets you set exposure time manually upto 345mS.

If you want to try it you can install it by using
sudo apt-get upgrade
sudo apt-get update
sudo rpi-update

git clone https://github.com/raspberrypi/userland.git
cd userland
git checkout master
./buildme

Then use the -SS option

raspistill -ss 300000 -t 200 -o test.jpg

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Sun Oct 27, 2013 6:58 am

jamesh wrote:I've got a Celestron C8 on an goto equatorial mount that I really don't use enough. This looks like a good excuse to get it out on the lawn!

Good job on the pics above.
Does your c8 have a ST-4 autoguide port? If so l can give you details on how to connect to that.

I am currently working on a version using the GPIO outputs so won't need the arduino uno.

Gordon77

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Thu Oct 31, 2013 11:01 am

New version of my python autoguider to try.

I can't guarantee the USB camera option , not fully tested (the USB serial option should work OK just the GPIO output timing may not be correct), RPI camera should work OK. Let me know any issues.

You'll need to run it with 'sudo idle', not the idle icon on the gui

You will need to use the latest raspistill, and do an rpi-update etc

$ cd
$ sudo apt-get install build-essential git cmake
$ git clone https://github.com/raspberrypi/userland.git
$ cd userland
$ git checkout master
$ ./buildme

It can now use GPIO outputs (see photo for connections). These go HIGH to drive, you'll need to provide the relay design etc. Note connections for W-West, S-South, O=gnd, N-North, E-East.

sudo apt-get install pyhton-serial. if you want to use the serial USB output, and set serial_connected =1 in the program

It uses the -ss option for manual exp time when exp mode = off. To get maxm sensitvity use exp mode = off, exp time to max and ISO up to 800.
'pc' = picture capture, 'sc' = screen capture , all saved in /home/pi. Will overwrite the same names when you restart the programme so move if you want to keep them.

use SAVE config options BEFORE trying to use RELOAD config options !

I'll leave the ZIP on here for a couple of days

As usual all at your own risk !

Gordon77
Attachments
gt900jzip.ZIP
(13.6 KiB) Downloaded 257 times
pinout.jpg
RPI connections
pinout.jpg (21.54 KiB) Viewed 17549 times

Bikeman
Posts: 63
Joined: Sun Nov 04, 2012 9:03 pm
Location: near Hannover, Germany

Re: RaspberryPi Camera for Astrophotography

Sun Nov 10, 2013 6:57 pm

Hi!

Here's an impression what you can do with a Raspi Cam after removing the lens on a modest 6 inch Newtonian telescope.

This is a 5 second video, out of the box (I just wrapped the H264 file with n MP4 container using MP4Box), of the moon, on a day with not so good seeing. Actually it started raining shortly afterwards, so I couldn't make further tests, like playing with exposure and white balance settings etc. At the lower left corner you can see the edge of the "disk", giving you a hint about the FOV.

http://www.ehea-obs.org/astro/moon-test1-raspivid.mp4 (ca 9MB)


As you can see at this pixel scale, the atmospheric disturbances are the limiting factor, but I guess by using the usual tools for stacking videos like Registax, Giotto etc , nice results could be achieved.

The pixels resolution is probably exceeds the diffraction limit of a 6 inch telescope, it would be interesting to see results on telescopes with larger apertures.

CS
HB

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Sun Nov 10, 2013 7:46 pm

Nice video. What settings did you use on the camera?

Gordon77

Bikeman
Posts: 63
Joined: Sun Nov 04, 2012 9:03 pm
Location: near Hannover, Germany

Re: RaspberryPi Camera for Astrophotography

Sun Nov 10, 2013 8:28 pm

All default. By the time I had managed to convert the thing into MP4 for inspection, rain had started :( . I guess it would be a good idea to set the white balance to a fixed value and other exposure settings as well, but the weather report looks like this will have to wait ...

CS
HB

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Sun Nov 10, 2013 8:36 pm

Bikeman wrote:All default. By the time I had managed to convert the thing into MP4 for inspection, rain had started :( . I guess it would be a good idea to set the white balance to a fixed value and other exposure settings as well, but the weather report looks like this will have to wait ...

CS
HB
Thanks. Better luck next time :D

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Mon Nov 11, 2013 3:45 pm

I've managed to squeeze the relay board for ST-4 (4 solid state relays) and a L293DNE (for focus motor) into my pi case :D
Attachments
photo2.jpg
photo2.jpg (61.57 KiB) Viewed 17241 times
photo1.jpg
photo1.jpg (61.32 KiB) Viewed 17241 times

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: RaspberryPi Camera for Astrophotography

Mon Nov 11, 2013 3:54 pm

gordon77 wrote:...L293DNE (for focus motor)...
We are not worthy! :D

Does this bit of it work by driving a motor that's already on the scope's own focuser?

This is getting close to a DIY auto-focus Pi camera, by a somewhat roundabout route, by the sound of it!

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Mon Nov 11, 2013 4:32 pm

Ravenous wrote:
gordon77 wrote:...L293DNE (for focus motor)...
We are not worthy! :D

Does this bit of it work by driving a motor that's already on the scope's own focuser?

This is getting close to a DIY auto-focus Pi camera, by a somewhat roundabout route, by the sound of it!
I have one of the Meade #1209 focusers, and if you remove the hancontroller for it you can drive it with PWM, and the L293DNE will do that. I have a similar system I built using an Arduino Uno (which the pi can also send LX200 ASCII commands to)

http://www.opticsplanet.com/meade-zero- ... cuser.html
Attachments
focus1.jpg
focus1.jpg (32.52 KiB) Viewed 17214 times

dmpalmer
Posts: 6
Joined: Wed Jul 04, 2012 6:02 pm

Re: RaspberryPi Camera for Astrophotography

Tue Nov 12, 2013 12:00 am

I have made a 3D printable telescope adaptor for the Pi camera module. It is available at
http://www.thingiverse.com/thing:181310
and
https://github.com/dmopalmer/PiPiece

It's OpenSCAD if you have a weird telescope draw tube diameter, but I have made STLs for 0.965", 1.25" and 2.00".

I realize that the intersection of (Telescope ∩ Pi ∩ 3D printer) is significantly smaller than (Telescope ∩ Pi), but it is not empty.

thsBavR10
Posts: 233
Joined: Sat Jul 21, 2012 3:11 pm

Re: RaspberryPi Camera for Astrophotography

Wed Nov 13, 2013 10:20 pm

Hello dmpalmer, thank you very much!
Great idea, good documentation.
I'll have a look at the local fablab (at university, open also for non-students), there are 3D printers available sometimes at weekend.

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Sun Dec 01, 2013 6:46 pm

Finally got the telescope, 80mm and EQ6, dragged out to try out the Pi camera and guiding.
Managed to find a star OK, seeing wasn't good. pleased with Pi camera sensitivity.

(note this is the Pi camera, not tried the PiNoIR yet)

Software not working as expected yet, guiding worked but star circled around the required target but this maybe just a matter of tweaking the software timings to suit the EQ6, and I hadn't done any alignment just pointed roughly North.

Pleased so far :D
Last edited by gordon77 on Wed Dec 11, 2013 7:12 pm, edited 1 time in total.

gordon77
Posts: 4118
Joined: Sun Aug 05, 2012 3:12 pm

Re: RaspberryPi Camera for Astrophotography

Wed Dec 11, 2013 7:11 pm

Fixed a few bugs and made a few improvements and its working a lot better and tracking well.

Gordon77
Attachments
screen2.jpg
Screenshot
screen2.jpg (50.19 KiB) Viewed 16473 times
scope1.jpg
RPi mounted on scope
scope1.jpg (64 KiB) Viewed 16472 times

Return to “Camera board”