Jump to content


Photo

PiAstroHub: RaspberryPi for Autoguiding+DSLR+GOTO

  • Please log in to reply
508 replies to this topic

#1 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 15 August 2012 - 09:31 AM

Hello All,

Raspberry Pi is a small low cost platform for my new project - PiAstroHub.

I installed Open-PHD-guiding on the Pi with an assistance from a friend:
http://stargazerslou...a-raspberry-pi/

Now I can run PHD guiding on the device from iPad or Android via a X windows program (iSSH for iPad). I am now writing a web application to control a DSLR camera and to view photos taken by the camera via a web browser on the device. And yes, Goto can be commanded from SkySafari :)

I will keep you updated :)

Anat

Attached Files



#2 gonzothegreat

gonzothegreat

    Lift Off

  • -----
  • Posts: 9
  • Joined: 20 Nov 2011

Posted 15 August 2012 - 12:49 PM

Greetings,

I'm the 'friend' :)
I'm also behind the following joined project with somebody else: http://code.google.c...olar-alignment/

Still have to order my QHy5....

#3 psonice

psonice

    Apollo

  • -----
  • Posts: 1113
  • Joined: 24 Jul 2009
  • Loc: Warrington, UK

Posted 15 August 2012 - 04:40 PM

Wonderful stuff. First we had the rush of people planning to buy a Pi to use as a regular computer with little IT knowledge, and I was a bit concerned about how it would work out, but now I'm starting to see lots of really cool projects like this :D

Is it fast enough to handle the guiding software? I know the CPU in it is particularly weak (attempts to run linux with a GUI without GPU acceleration have been very painful!), but it's enough to handle a lot of stuff. And the GPU looks reasonably good, and could definitely take a lot of the load in a guiding app.

#4 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 15 August 2012 - 07:46 PM

I am using a low-quality Class4 SD card to run Raspbian and it takes about 8 sec for a 2sec shot to complete a cycle. I will use a good Class 10 card and expect 2x-2.5x improvement. If I want more improvement, I may switch off image display during guiding in the source code because a graph can show guiding errors.

#5 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 16 August 2012 - 08:08 AM

Now, I use a Sandisk 16GB Class 10 Extreme (45MB/s) SD card. I tested cycling shots with an exposure time of 1 sec. The time interval between shots (exposure+download+image display time) is about 3 sec. And for an exposure time of 2 sec, the time interval is about 4 sec.

ADDED NOTE (Aug 19): I could not reproduce the speed achieved above. I need to check!



#6 gonzothegreat

gonzothegreat

    Lift Off

  • -----
  • Posts: 9
  • Joined: 20 Nov 2011

Posted 16 August 2012 - 08:26 AM

Anat, ignore my email about the SD card, just noticed that you've posted the answer here.

#7 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 16 August 2012 - 08:55 AM

This is the step to install the QHY5 driver and Open-PHD-guiding after making a Raspbian “wheezy” SD card
http://www.raspberrypi.org/downloads

Note:
1. Set Locale to "en_US UTF8" otherwise there will be an error message when open PHDguiding.
2. The working directory is /home/pi/

----------------------------------
sudo apt-get update
sudo apt-get upgrade

# install dependencies
sudo apt-get install subversion
sudo apt-get install cmake
sudo apt-get install libusb-dev
sudo apt-get install cfitsio-dev
sudo apt-get install libnova-dev
sudo apt-get install fxload
sudo apt-get install libwxgtk2.8-dev
sudo apt-get install libv4l-dev

# Install INDI and QHY5 driver
svn co https://indi.svn.sou...root/indi/trunk indi
cd indi/libindi
cmake .
make
sudo make install
cd ..
cd 3rdparty/indi-qhy/
cmake .
make
sudo make install
sudo cp /usr/local/lib/libindi* /usr/lib/

# To check if the QHY5 is recognized, type the following command and then plug and unplug QHY5. QHY5 should be listed.

tail -f /var/log/syslog

# Run this command to start the indi server on Raspberry Pi

indiserver indi_qhy_ccd


# install Open-Phd-guiding

cd
svn checkout http://open-phd-guid....com/svn/trunk/ open-phd-guiding-read-only
cd open-phd-guiding-read-only/
cmake .
make
sudo make install

# Open an X terminal and type "PHD" in a command line. PHD will open in an X windows.

--------------------------------------------

#8 gonzothegreat

gonzothegreat

    Lift Off

  • -----
  • Posts: 9
  • Joined: 20 Nov 2011

Posted 16 August 2012 - 02:57 PM

Excellent howto :)

#9 lambermo

lambermo

    Viking 1

  • -----
  • Posts: 566
  • Joined: 16 Jul 2007
  • Loc: .nl

Posted 24 August 2012 - 09:54 AM

Very cool project. Keep this going !

#10 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 26 August 2012 - 08:45 AM

I found that INDI drivers and OpenPHD were quite slow and inconsistent. So, I compiled Lin_guider on Raspberry Pi.
http://sourceforge.n...ects/linguider/

Lin_guider is so much faster than OpenPHD+INDI. Images are downloaded almost immediately after capturing :) The steps to compile Lin_guider are as follows:

---------------------------------------------------------
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install libqt4-dev
sudo apt-get install libftdi-dev
sudo apt-get install fxload

>>>> copy lin_guider-26.0_static.tar.bz2 to /home/pi
tar -xvf lin_guider-26.0_static.tar.bz2

cd lin_guider

>>>> copy lin_guider-27.0_sfx.tar.bz2 to /home/pi/lin_guider
tar -xvf lin_guider-27.0_sfx.tar.bz2

sudo ./lin_guider.bin

>>> To install QHY5 firmware
pi@raspberrypi ~/lin_guider/udev/qhy5 $ sudo sh qhy5_lg_install.sh

>>>> To run program
cd /home/pi/lin_guider/lin_guider_pack/lin_guider
./lin_guider
---------------------------------------------------------

I also attach a photo showing how the program looks like on X-server (iSSH) on iPad.

The next step is to make an interface for image capturing and display for DSLR :)

Attached Files



#11 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 26 August 2012 - 07:38 PM

To use PiAstroHub as SkyFi to connect between SkySafari and a mount, follow these steps:

-------------------------------------------------
sudo apt-get install ser2net
sudo sed -i '$ a\5555:raw:0:/dev/ttyUSB0:9600 NONE 1STOPBIT 8DATABITS' /etc/ser2net.conf
sudo /etc/init.d/ser2net restart
-------------------------------------------------

It is that simple :) Now all tcp communications via Port 5555 will be redirected to a serial port. I recommend using a PL2303-based usb-serial adapter.

Then set Port as 5555 in SkySafari. Done! PiAstroHub will function like SkyFi.

#12 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 27 August 2012 - 09:07 AM

I just added the plate-solving feature using the engine from astrometry.net which was capable to perform blind solving. After getting an image, I use plate-solving to find the exact pointing position and send the RA-DEC values to align a mount. The crosshair in Skysafari is automatically synced to the new position :) So, Goto can be done from SkySafari with high pointing accuracy.

The steps to compile the Astrometry engine are as follows:

------------------------------------------------

sudo apt-get install libcairo2-dev libnetpbm10-dev netpbm libpng12-dev libjpeg-dev python-numpy zlib1g-dev
wget http://astrometry.ne...et-0.38.tar.bz2
tar xjf astrometry.net-0.38.tar.bz2
cd astrometry.net-0.38
make
sudo make install
------------------------------------------------------

#13 tjay

tjay

    Surveyor 1

  • *****
  • Posts: 1974
  • Joined: 03 Feb 2007
  • Loc: just outside of Toronto

Posted 27 August 2012 - 11:09 PM

This thread makes it very tempting to order a Raspberry Pi....

Nice work!

#14 gonzothegreat

gonzothegreat

    Lift Off

  • -----
  • Posts: 9
  • Joined: 20 Nov 2011

Posted 28 August 2012 - 03:29 AM

Just a reminder that if you want to use the astrometry tool, you do need to download the INDICES. Do contact the guys from astrometry for them.

#15 gavinm

gavinm

    Surveyor 1

  • -----
  • Posts: 1669
  • Joined: 26 Aug 2005
  • Loc: Auckland New Zealand

Posted 28 August 2012 - 06:29 PM

You've seen this?

http://www.dpreview....to-battery-grip

#16 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 28 August 2012 - 11:16 PM

Hi Gavin,

Yes. We use the same gphoto2 library to control a DSLR. I am making a web application to wrap up all features and will post an update soon.

#17 PetPirate

PetPirate

    Lift Off

  • -----
  • Posts: 13
  • Joined: 23 Feb 2009

Posted 02 September 2012 - 09:19 PM

This is awesome, thanks so much for doing the legwork.

I've finally got my Pi up and running in wifi master (AP) mode and have ser2net configured. I can't believe it was that easy -- to think I nearly bought a SkyFi for more than twice the price of the Pi!

This will be great for me as I'm usually stuck up on my apartment roof with a netbook. I'm slap bang in the middle of Shanghai and due to poor visibility and blocked view in various directions, I can't always align properly, and used to rely on "syncing" a lot using KStars / INDI, which was painfully slow and cumbersome on a netbook.

I've also been using gphoto2 for a while to control my DSLR, so I'll be doing that too.

I'm interested in the astrometry.net solver too, I wonder how that will work in my orange skies.

For autoguiding, I've added a piggyback mount to my ETX-125 and have a modified webcam, but have never been able to get a decent polar alignment, and the ETX mount isn't great anyway. With all the functionality sitting on the Pi however, it's one less item of faffing around to get set up, so I'm much more likely to try it now and succeed I think.

I wonder how a focuser would integrate into this setup -- I remember LibINDI allowed for controlling focusers. An ideal setup would be taking a few photos with gphoto2, and doing rinse-repeat trial & error autofocusing.

I plan to integrate my Pi in a project box with 12V / 5V PSU so I basically have everything contained in one box with one power plug. The dream setup would be an automated setup as the Autostar is so slow and archaic -- auto align, auto focus, Goto provided by Skysafari.

#18 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 03 September 2012 - 07:17 PM

PetPirate,

Glad that you enjoy the Pi :)

INDI supports some focusers: Robofocus, Meade, and JMI. "Semi-auto" focusing is possible. The focuser movement and camera exposure are done in a series. Then the star images are compared by a user. The focuser is commanded to move to the position of the sharpest star image.

Anat

#19 MikeCMP

MikeCMP

    Vostok 1

  • *****
  • Posts: 185
  • Joined: 12 Jul 2011
  • Loc: Chardon OH

Posted 04 September 2012 - 07:05 PM

I'm impressed, that is pretty cool! Jus the fact it replaces the skyfi is pretty cool by itself.

Is that a starshoot autoguider you have hooked up?

Mike

#20 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 05 September 2012 - 03:00 AM

Mike,

Yes. I use the Orion Starshoot Autoguider (aka QHY5) for the development.

Anat

#21 MikeCMP

MikeCMP

    Vostok 1

  • *****
  • Posts: 185
  • Joined: 12 Jul 2011
  • Loc: Chardon OH

Posted 05 September 2012 - 09:55 AM

Interesting, I had looked at thee when they came out, but of course they were sold out, now that availability is improving I might have to pick one up.

Are you using a wireless wi-fi adapter to do ad-hoc networking so you can simulate a sky-fi, or is your system hooked up to a hub/router?

Mike,

Yes. I use the Orion Starshoot Autoguider (aka QHY5) for the development.

Anat



#22 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 05 September 2012 - 10:28 AM

I tried a wifi dongle (Asus N10) and found that it was pretty slow for an adhoc network. I use an Edimax Nano router instead.

http://www.edimax.co...id=24&pl2_id=89

#23 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 15 September 2012 - 05:00 PM

This is the interface of PiAstroHub. A user can control Linguider and DSLR from a webbrower in a mobile device.

Attached Files



#24 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 15 September 2012 - 05:06 PM

There is a feature to find a guide star automatically in the new version of Linguider. The feature is incorporated in PiAstroHub. A user can also manually select a guide star by clicking "Tool" in "Guide Star Selection". That will open another window to manually select a guide star.

Attached Files



#25 anat

anat

    Viking 1

  • -----
  • Posts: 699
  • Joined: 03 Jun 2004

Posted 22 September 2012 - 12:07 PM

in Action

http://www.youtube.c...bed/ipiDTGgRVd0






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics