Jump to content


Photo

Android + Bluetooth = telescope control! :)

  • Please log in to reply
48 replies to this topic

#1 dciobota

dciobota

    Vostok 1

  • *****
  • Posts: 106
  • Joined: 07 Aug 2007

Posted 16 August 2011 - 05:29 PM

Apologies in advance if this is in the wrong forum.

Any interest in this? I wrote an android app to control Celestron scopes (just basic movement + inject location and date/time). With a serial bluetotth dongle, I can use my modified Nook Color to control my CGE. Should work with all celestron goto scopes and even synscans (based on what I read, they use the Celestron command set).

I can give more details if anyone's interested, plus a link to the app (it's not on the market, you'll have to sideload it). Beware, it's only tested on one scope so far, so I wouldn't even call it a beta. I need victims, erm, volunteers to test it on other scopes and android devices.

I plan to improve it some more in the coming weeks, and publish it as a free app on the market. I enjoy giving back to the community. :)

I couldn't find anything like it for androids, so I thought it would be a fun project to do.

Daniel

#2 mgb

mgb

    Mariner 2

  • *****
  • Posts: 223
  • Joined: 02 Sep 2009
  • Loc: Montreal, Qc... Canada

Posted 16 August 2011 - 06:46 PM

Daniel,

That's is great.

But how did you set up the serial dongle ? What did you use ?

I have an NEQ-6 and an Android phone and tablet so I could test it on the Skywatcher.

Let us know.

#3 dciobota

dciobota

    Vostok 1

  • *****
  • Posts: 106
  • Joined: 07 Aug 2007

Posted 16 August 2011 - 09:59 PM

Ahh, great! Ok, here's the info I posted on another forum:

Ok, here's the rundown on all the hardware:

CELESTRON SCOPE
any celestron scope with goto controller handbox (even the old ones without numeric pads I think). I will make a version later that will bypass the hand controller, but not yet.

RJ45 -> SERIAL DB9 adapter
This is your standard adapter that hooks from your pc serial port to the bottom of the hand cotroller. An example is here:
http://www.optcorp.c...05-243-470-1611

BLUETOOTH SERIAL ADAPTER
There are many of them on the market, one of the cheapest I found that works well is here:
http://www.usconvert...products_id=262
I bought the industrial version, as it has an external antenna and seems a bit more rugged. Note it has a female db9 connector, just like the rj45 adapter. So, if yours is similar, you will need...

DB9 NULL MODEM ADAPTER MALE/MALE
This will allow you to connect the bluetooth adapter to the rj45 adapter.

Another thing you may need if it didn't come with your bluetooth serial adapter is a power supply. The one bluetooth serial adapter listed in the link is very nice as it has a mini usb connector, so it can connect to any usb power source (5v). It also came with a little connector with leads to hook up to a battery for example. It draws very little power (I think it's <100mA, it's in the specs on the site).

Ok, that's all the hardware. Hook up the rj45 to the hand controller, then the male/male adapter and bluetooth serial and you're done! Oh, one thing more though. Make sure the bluetooth adapter is set to 9600 baud, because that's what the hand cotroller uses to talk. Also, the bluetooth serial adapter needs to be in discoverable mode. By default, that's how they're set up at the factory, just make sure.

Ok, that's all you need. Load my app, then start is up. You'll see a very ugly handbox (runs in portrait mode only btw). Click on the menu, and choose "connect a device - insecure". There is also a secure option, but I don't think it's working yet. A list of bluetooth devices will pop up, you can scan until you see the bluetooth serial adapter showing. Click on it, and if you haven't paired with it yet it will ask you to pair - enter your pairing key. The it will connect, and a short popup will say "connected to #" where # is the name of the bluetooth serial adapter. So now you're ready to rock!

Hold the buttons down, it will move as long as the button is down. I forgot to test whether multiple buttons work, probably not, since I haven't synchronized those calls yet. The red stop button will send both dec and ra stop commands, just in case something went amok slewing! The Spd+ and - change the slew rate. I decided to add two more buttons to the app. One uploads the current date/time to the handbox, the other uploads your current location to the handbox. You must have either gps or network (wifi) location enabled on your android device, and for some reason mine didn't work unless I enabled Google's Latitude whatever that is. But anyways, this makes the app much more useful to me, as I don't have to manually enter my location in the handbox every time I power up. And if I get a gps dongle (my nook has no gps), I'l be able to set my location in the field kit wherever I go.

You can download and install from here:

https://docs.google....NlZTA0&hl=en_US

However, your tablet has to be rooted so you can install apps from your sd card. If you can't do that, I'll try to set up a google market account and publish the app there sometime this weekend. I'm kinda jittery about that it being fairly untested and so on.

If you want to learn to root your android device, ask on here and I'll try to point you in the right direction. Or you can pm me, I don't know what the policy is here about posting stuff like that, I don't want to get anyone in trouble.

I also enclosed a pic of the app, ugly but still learning the android sdk. Sorry for the blurry pic.

Which table do you have btw?

Attached Files



#4 AWATS

AWATS

    Mariner 2

  • *****
  • Posts: 255
  • Joined: 12 Oct 2010
  • Loc: Foresthill, CA

Posted 16 August 2011 - 10:59 PM

I'll try it but I have a Meade LXD-75 mount. Care to add that in? I have a Nook Color running CM7. Right now I use Astromist with a BT dongle.

I wish they would port Stellarium to Android or Touchpad but that's not going to happen.

#5 psonice

psonice

    Apollo

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

Posted 17 August 2011 - 04:29 AM

No android here (I dev on iOS so far), but huge thumb up for this. Also big thumb up for not releasing it in this state on the market :)

What are your plans for it? A controller is kind of useful, but if it can work with other apps (i.e. the star chart apps) it would be a whole lot cooler.

#6 dciobota

dciobota

    Vostok 1

  • *****
  • Posts: 106
  • Joined: 07 Aug 2007

Posted 17 August 2011 - 09:59 AM

Ahh, a meade version is in the works, as I have some of their command set. That's great you have a cm7 modded nook, it's what I have also. This way, you can be my autostar tester. :-) Btw, the command set I have is for lx200, do you know if the autostars use the same? I suspect they do, but not sure.

Linking it as a driver, would love to, but don't have a way yet. I checked info on ascom-x to see if there's a ubuntu beta of some sort, but nothing. That's too bad, as I see *nix based OS's as a significan platform for apps in the futue.

I may talk with some of the android sky chart developers (Skye seems like a very nice app actually) and see if we can collaborate in some way.

Btw, feel free to suggest any additions to this. It's still in its early infancy, so anything is possible.

Thanks for the feedback and clear skies all.

Daniel

#7 psonice

psonice

    Apollo

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

Posted 17 August 2011 - 10:34 AM

That's too bad, as I see *nix based OS's as a significan platform for apps in the future.


I think you mean *nux, the unix-based OS is iOS and I doubt that's going to support an app like this any time soon ;) (I'd be angry with apple about that, but I'm about 10x more angry with the scope manufacturers for still using serial in 2011!)

#8 dciobota

dciobota

    Vostok 1

  • *****
  • Posts: 106
  • Joined: 07 Aug 2007

Posted 17 August 2011 - 12:40 PM

You're right, it's more of a flavor of Linux, but Linux itself is based on an incarnation of unix (can't remember which version, twas many moons ago). I do believe an ascom-x type project to span all the unix type variants would be a worthy project, but alas, I don't have the means nor the time to take up anything like that.

As to iOS, I may do some investigating to see if there's a windows based sdk for ObjectiveC. I just remembered my wife has a 1st gen ipod touch which I believe has bluetooth? If I can develop on my pc and test on her ipod, I may be able to come up with something. Ever since I got the nook a month ago she's been wanting a tablet of her own, so I may just get her one and swipe her ipod for testing. ;-)

You and me both on the serial thing, I think it's time for those manufacturers to come out of the stone age and graduate to usb and maybe even wireless! :D

Oh, one more thing I thought about is creating a widget that would serve as a smart hub for other astronomy apps to connect to the scope. The smart hub can support multiple apps connected through it, and it can emulate whichever scope type it supports. I think if I get the meade command set, I can simulate synscans, celestrons and meade... that should take care of at least 80% of the scopes out there I think. The rest I can add later. In this way, if I publish the interface to the hub, any third party app can get telescope control.

What do you think of that idea?


#9 btschumy

btschumy

    Vendor - Simulation Curriculum

  • *****
  • Vendors
  • Posts: 2203
  • Joined: 13 Apr 2004
  • Loc: Longmont, CO, USA

Posted 17 August 2011 - 12:53 PM

As to iOS, I may do some investigating to see if there's a windows based sdk for ObjectiveC. I just remembered my wife has a 1st gen ipod touch which I believe has bluetooth? If I can develop on my pc and test on her ipod, I may be able to come up with something.


You won't be able to use bluetooth on iOS to talk to mounts. Apple hasn't enabled the bluetooth profile that allows arbitrary serial communication. That's the whole reason Southern Stars went down the SkyFi/SkyWire path.

#10 AWATS

AWATS

    Mariner 2

  • *****
  • Posts: 255
  • Joined: 12 Oct 2010
  • Loc: Foresthill, CA

Posted 17 August 2011 - 05:46 PM

Ahh, a meade version is in the works, as I have some of their command set. That's great you have a cm7 modded nook, it's what I have also. This way, you can be my autostar tester. :-) Btw, the command set I have is for lx200, do you know if the autostars use the same? I suspect they do, but not sure.

Linking it as a driver, would love to, but don't have a way yet. I checked info on ascom-x to see if there's a ubuntu beta of some sort, but nothing. That's too bad, as I see *nix based OS's as a significan platform for apps in the futue.

I may talk with some of the android sky chart developers (Skye seems like a very nice app actually) and see if we can collaborate in some way.

Btw, feel free to suggest any additions to this. It's still in its early infancy, so anything is possible.

Thanks for the feedback and clear skies all.

Daniel


Sure, shoot the Meade version on over when it's ready. Somewhere I have the full Meade command listings. Yes, I think all Autostars are the same let me dig up the info and get back to you.

I downloaded the WebOS development stuff and was going to do something similar for the Touchpad but work gets in the way. I decided to stick with Android for now. I am using Google Sky but Stellarium would be awesome. Can't have it all!

Edit: I found the doc. I think it's the same one as you. If I recall correctly that doc covers pretty much any Autostar box. I was spying on the serial port sometime back and both my 494 and 497 seem to be the same commands although some might not be supported bu the 494. Not sure what they might be.

http://www.meade.com...col_2010-10.pdf

Updated as of 2010 and lists Autostar and Autostar II among others.

What range are you seeing on the NC BT? I am getting about 3 ft.

#11 dciobota

dciobota

    Vostok 1

  • *****
  • Posts: 106
  • Joined: 07 Aug 2007

Posted 17 August 2011 - 07:16 PM

Ahh, that sucks. :-(

Although going over wifi is really not a bad idea if someone can make a standalone wifi telescope hub. Something like a print server appliance, except it would serve commands.

#12 dciobota

dciobota

    Vostok 1

  • *****
  • Posts: 106
  • Joined: 07 Aug 2007

Posted 17 August 2011 - 07:24 PM

Say, thanks very much Terry, that's what I was looking for! The doc I have is much older and doesn't mention autostar... still has examples in VB, lol.

As to BT range, normally it's about 3ft or so like your. The dongle I linked to has extended range (and a nice antenna), so I can actually keep a connection to it up to about 7ft. Still not long enough to control the scope from the house.

I'll post a link to the meade also when I get it running, probably this weekend... unless the missus drags me into shopping, lol.

Thanks again and clear skies.

Daniel

#13 Harshad

Harshad

    Vostok 1

  • -----
  • Posts: 148
  • Joined: 04 Oct 2010
  • Loc: India

Posted 18 August 2011 - 12:08 PM

Hey, this is looking good!

However, your tablet has to be rooted so you can install apps from your sd card.


Not necessary AFAIK. In Android phones, Settings -> Applications -> Unknown sources allows side loading without rooting. I guess tablets wouldn't be too different.

I may talk with some of the android sky chart developers (Skye seems like a very nice app actually) and see if we can collaborate in some way.


I am definitely interested though I am currently more focused on DSC + PUSHTO functionality. I have some stuff ready, but want to increase the accuracy on various fronts. Have been trying to wrap my head around the IERS precession/nutation models the past couple of days. It's pretty deep stuff, even with approximations.

'will follow your progress in the meantime. cheers,

#14 AWATS

AWATS

    Mariner 2

  • *****
  • Posts: 255
  • Joined: 12 Oct 2010
  • Loc: Foresthill, CA

Posted 18 August 2011 - 02:06 PM

Say, thanks very much Terry, that's what I was looking for! The doc I have is much older and doesn't mention autostar... still has examples in VB, lol.

As to BT range, normally it's about 3ft or so like your. The dongle I linked to has extended range (and a nice antenna), so I can actually keep a connection to it up to about 7ft. Still not long enough to control the scope from the house.

I'll post a link to the meade also when I get it running, probably this weekend... unless the missus drags me into shopping, lol.

Thanks again and clear skies.

Daniel


Sounds good! As for the wife, do what I do. It always works! I do what I am told. Failsafe! :)

I have the Orion commands too if you are interested. Might be useful for push-to.

#15 dciobota

dciobota

    Vostok 1

  • *****
  • Posts: 106
  • Joined: 07 Aug 2007

Posted 18 August 2011 - 10:04 PM

Oh, Orion, that's the same as the synscans isn't it? Based on Celestron's. By all mean, yes, I'd like to cover as many brands as I can! Maybe I can integrate them all into one generic hand controller.

Thanks again and clear skies.

Daniel

#16 dciobota

dciobota

    Vostok 1

  • *****
  • Posts: 106
  • Joined: 07 Aug 2007

Posted 18 August 2011 - 10:14 PM

Hey, this is looking good!

However, your tablet has to be rooted so you can install apps from your sd card.


Not necessary AFAIK. In Android phones, Settings -> Applications -> Unknown sources allows side loading without rooting. I guess tablets wouldn't be too different.

I may talk with some of the android sky chart developers (Skye seems like a very nice app actually) and see if we can collaborate in some way.


I am definitely interested though I am currently more focused on DSC + PUSHTO functionality. I have some stuff ready, but want to increase the accuracy on various fronts. Have been trying to wrap my head around the IERS precession/nutation models the past couple of days. It's pretty deep stuff, even with approximations.

'will follow your progress in the meantime. cheers,


Ahh yes, you're absolutely right, you just have to enable install from unknown sources. Still learning my way around this tablet. :-)

As far as DSC, how about I display az/alt or ra/dec? One of the things, I'm investigating right now is a simple alignment procedure. I really like Meade's approach using level north, or even Celestron's sky align... they don't seem too difficult. Plus syncing to a nearby star seems fairly easy too. But all those may be a bit in the future, as it takes quite a bit of time to test.

I'll definitely keep everyone posted on this.

Btw, I think I may have set the minimum OS requirement a bit too high in the app manifest, it's set to 2.3. I think it should work with 2.1 as well, not sure about the lower versions. I don't think it matters when you sideload it, but let me know if it is. I'll lower the requirements this weekend.

Daniel

#17 dciobota

dciobota

    Vostok 1

  • *****
  • Posts: 106
  • Joined: 07 Aug 2007

Posted 21 August 2011 - 01:57 PM

Ok, some updates.
First off, a small update to the Celestron handbox, it now displays az/alt or ra/dec (you choose) as you slew around. If your telescope is not aligned, then ra/dec make little sense. Same thing, if you scope does not have an alt/az mode (like the CGE) then alt/az make little sense also. Let me know what you find out with yours.

New doc link:
https://docs.google....IwYmQ1&hl=en_US

Next thing, a new app, the Autostar Handbox! Very similar to the celestron one (basically same UI) but no position display finctionality (the ra/dec button does nothing). One extra button for the Autostar is the Max/Quiet button, which toggles max slew from 4deg/sec (Max) to 2deg/sec (Quiet). And this brings me to some notes and observations on autostars:

1. I'm still not sure how slew rates work. On the handbox, you get 1-9 rates. However, from the command set, there are two parameters to set: max slew, which you can set to 2,3 and 4deg/sec, and slew rate, which you can select from 'guide', 'center', 'find', and 'slew'. As you can see, it's pretty confusing. So, I guessed and made the rate buttons choose between guide (G), center ©, find (M) and slew (S), figuring the (S) setting uses the max slew value. So please check this functionality for me, as I don't have an autostar to test with.

Another issue is date/time. For the autostar, there are commands to upload date and time, but not set daylight savings... odd. The autostar II has a way to update daylight savings, and also a command to automatically enter date/time at initialization to bypass the screen prompts. The date/time button sends all those commands in the hope that some of them change the date/time correctly. Please let me know how this works for you as well.

The upload location should work for all autostars. One caveat, this will replace your current site's location. If this is not what you want, let me know, I can update a specific site instead (like say, site #4 in your menu)... but in order to use the uploaded location you'll have to choose that site as your current site.

Here's the link to the Autostar apk:
https://docs.google....QwMGU2&hl=en_US

Per Terry's suggestion, I am next going to make something similar for the Orion Intelliscopes, although there will be no scope control, just position display.

Hope you gus like this, and please let me have your feedback, fixes, suggestions, etc.

Thanks and clear skies.

Daniel

#18 dciobota

dciobota

    Vostok 1

  • *****
  • Posts: 106
  • Joined: 07 Aug 2007

Posted 29 August 2011 - 11:53 PM

Ok, some more updates, for the Celestron at least. Goto! So far just the Messier and NGC catalogs, but more on the way.

Here's the latest Celestron one:
https://docs.google....k3MmJk&hl=en_US

I have made similar mods to the autostar one, but very untested. I currently have one tester for this one, if there is more interested I'll post it. I do not have any autostar scopes to test so I have to rely entirely on volunteers for this one.

Thanks and clear skies,

Daniel

#19 Shadowalker

Shadowalker

    Apocaloptimist

  • *****
  • Posts: 10894
  • Joined: 23 Nov 2004
  • Loc: Chetek, Wisconsin, USA

Posted 31 August 2011 - 03:43 PM

Excellent thread and discussion, guys. Would you consider having it moved to one of the equipment forums? I'm sure some there would like to see this and would have contributions to make.

Anyway, just a thought.

#20 dciobota

dciobota

    Vostok 1

  • *****
  • Posts: 106
  • Joined: 07 Aug 2007

Posted 31 August 2011 - 11:43 PM

Hi Tom,

I'm all for it, but I think that's where I posted first and it got moved here. I'll leave it to the mods to put it wherever it's most useful. :)

Daniel

#21 Shadowalker

Shadowalker

    Apocaloptimist

  • *****
  • Posts: 10894
  • Joined: 23 Nov 2004
  • Loc: Chetek, Wisconsin, USA

Posted 01 September 2011 - 12:26 PM

Hi Tom,

I'm all for it, but I think that's where I posted first and it got moved here. I'll leave it to the mods to put it wherever it's most useful. :)

Daniel


Sorry, Daniel. I'm new to this forum. After I posted this, some of the other moderators told me the genesis of this one. Its good where it is.

#22 dciobota

dciobota

    Vostok 1

  • *****
  • Posts: 106
  • Joined: 07 Aug 2007

Posted 02 September 2011 - 09:01 PM

No problem Tom, I'm glad at least this thread is stirring up interest. I will post an update this weekend, I have added goto and some other functionality to make both apps more useful.

Clear skies,

Daniel

#23 gmartin02

gmartin02

    Viking 1

  • *****
  • Posts: 862
  • Joined: 11 Apr 2005
  • Loc: Santa Clarita, CA

Posted 16 December 2011 - 04:06 AM

I tried this app on my Droid 3 (inside the house) - on an AS-GT with an AIRcable Bluetooth to serial adapter.

I connected with no problems (with the "Connect a device - Insecure" option) and was able to control the telescope. Pretty cool! I can finally use my Droid for something useful for scoping.

Next I will try it outside with an aligned telescope & use the GOTO to find something I can see.

Thanks Daniel - Please keep adding more objects.

Greg

#24 tjay

tjay

    Surveyor 1

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

Posted 16 December 2011 - 07:10 AM

BTW, I was able to install this on my unrooted Samsung Galaxy S2 by emailing the .apk to an email account on my phone and installing it from there. I may not get a chance to try it for a few days, unfortunately.

#25 groz

groz

    Surveyor 1

  • *****
  • Posts: 1954
  • Joined: 14 Mar 2007
  • Loc: Campbell River, BC

Posted 16 December 2011 - 10:34 AM

Linking it as a driver, would love to, but don't have a way yet. I checked info on ascom-x to see if there's a ubuntu beta of some sort, but nothing. That's too bad, as I see *nix based OS's as a significan platform for apps in the futue.


You will never see an 'ascom' thing on *nix. I started to get involved in that, till I realized, the ascom folks aren't interested in 'make ascom multi platform', they are trying figure out how to 'make other platforms do windows activex stuff', which will likely never happen. (My opinion) The ascom-x folks have the concept of 'multi platform' backwards, they want to make other platforms behave like windows, rather than, make ascom useable on other platforms.

But, the INDI project is alive and well, with numerous folks contributing these days. INDI is a wire-line protocol, based on xml data interchange. It works just fine with client and server sides running on the same computer, and works equally well with remote connections. The reference implementation is on linux, but, I know it has been brought over to the Mac as well, and am planning on learning enough about mac development over christmas, that I can get it running on the MacBook we have in the house.

The project has been a little stagnant over the last year, because a few of the developers (myself in particular), have been in a time crunch mode with 'real work'. I know at least a couple of the developers have some free time coming over the christmas break, and, a few new astro toys waiting on some driver upgrades. All of us in that position, have a goal to get the new hardware fully operational for the upcoming new moon cycle, so, I'm expecting a flurry of commits into the version control over the next couple weeks.

It is my understanding that INDI is available thru macports, and altho I've never touched any mac side development, now that I have a macbook pro on my desk, it's inevitable that I'm going to start ramping up the mac knowledgebase here soon. One of my personal goals over the christmas holiday, is to get all of the astro gear we have here fully stabilized, on both linux and mac thru INDI.






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics