[Telescope Control] Support for Celestron Ultima 2000

Bug #725105 reported by Bogdan Marinov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stellarium
Won't Fix
Wishlist
Bogdan Marinov

Bug Description

Support for the Celestron Ultima 2000 can be added relatively easily based on the existing NexStar support. It seems that it uses an early 16-bit version of the 32-bit NexStar commands.

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

Please let me know how you want me to test this update, when you get around to making the changes.

I currently have a Toshiba laptop (Satellite C650D running Windows 7 64-bit Home Premium) with 2 GB or RAM. Processor is an AMD V140 2.3 GHz.

Bert

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

I've uploaded a test build for Windows, see if it is any good:
https://launchpad.net/stellarium/+download
As you can see, this is the place where we upload test/development builds. Look for stellarium-bzr4876-servocat-ultima2k-win32.exe

An explanation about the presence of ServoCAT: Some time ago, the developers of the ServoCAT GOTO kit asked us to add support for it, but I haven't heard anything from them since then. I've re-used the ServoCAT branch for the newer Ultima 2000 code. If you know someone who uses ServoCAT, please ask them if they are interested in testing it. The same code should be also able to read telescope positions from a Sky Commander digital setting circle. (Though that is not tested, too.)

The code needs to be tested with objects in all 4 quadrants:
- RA < 12, Dec > 0 (e.g. Procyon);
- RA > 12, Dec > 0 (e.g. Vega);
- RA < 12, Dec < 0 (e.g. Sirius);
- RA > 12, Dec < 0 (e.g. Fomalhaut).

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

Thanks - I will take a look at it and play around indoors, today. I was going to take my scope out tonight, but we have 100% cloud cover in Oro Valley, AZ (near Tucson). Sunday is suppose to be raining. Weather.com indicates Monday could be sunny. Certainly next Friday and Saturday the weather looks like it should cooperate.

Sincerely,

Bert

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

I can't believe this! We got snow last night! Not only did we have cloud cover (so I could not test your code for the Ultima 2000) but we have snow, everywhere here in Oro Valley, Arizona. We live just north of Tucson, Arizona (one of the best places for astronomy) and we live about 2,700 feet altitude above sea level. We've live here for close to 14 years and we've only had snow on the ground a couple of times. I will most likely set up my telescope and test out your U2K code, next weekend.
Sincerely,
Bert

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

I was just outside with my Celestron Ultima 2000 and tested your test code.

Here are my results:

1. Celestron Ultima 2000 mounted on an equatorial mount on a concrete pedeastal
2. Conducted a 2-star alignment
3. Used Ultima 2000 Hand Control to "GO TO" several objects - all went to the correct location
4. Tracked M-42 for 60 minutes - dead on - perfect
5. Hooked up laptop running Stellarium using USB to RS-232 port (COM1) with an RS-232 breakout box to detect activity
6. Configured Stellarium with Celestron Ultima 2000 scope and started the scope - TX light is green - RTS and DTR lights become red
7. Selected a star to guide to then selected "Control 1" to activate the telescope - nothing happened - my telescope did not slew
8. I stopped the Celestron Ultima 2000 (in Stellarium) and the TX light stayed green - the RTS and DTR lights became green
9. Next I configured the telescope interface to a virtual telescope
10. I selected a new star and pressed "Control 1". This time a circle with "Ultima 2000" slowly moved over the screen and "landed" onto the star I had selected. Of course my real telescope did nothing.
11. I replaced the RJ-11 phone cord that runs from the DB-9 to phone jack connector to the Celestron Ultima 2000 Handheld controller. I ran all of the above tests with this brand new cable. I originally bought the DB-9 to phone jack connector from Celestron and I was able to control my Ultima 2000 previoulsy with an older version of ASCOM, and older laptop, running Microsoft XP operating system and Starry Night Pro.

I have verified that my COM1 serial port is working by doing a loop back echo check with a Communications program. I can see the TX and RX signals activated.

I'm not sure what is going on. I was really hoping you could make my telescope work.

My suggestion would be to find another Ultima 2000 user to run the same test.

Just for reference, here is a link to the Ultima 2000 manual:

http://www.company7.com/library/celestron/ultima2k_man_0398.pdf

Sincerely,

Bert

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

I will look through the code for possible errors. When I'm ready, I will upload another test build.

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

Thanks!

I will take my laptop and serial cable to Starizona to see if my computer and your original code will work with one of their telescopes (other than Ultima 2000) - just to make sure my computer is working properly.

Sincerely,

Bert

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

I just got back from Starizona:

http://starizona.com/acb/

We tested my laptop, my USB to RS-232 cable, and the new beta code with a Nextar scope. It controlled it perfectly!
This means that my computer system is working correctly.

We next tried one of Dean's Ultima 2000 scopes. It would not even connect. I have not looked at the code yet. Perhaps the commands are lower case ASCII characters and not upper case ASCII characters. Just a thought.

Please let me know after you have looked at the code to see if you need another version tested.

Sincerely,

Bert

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

Hello.

I'm sorry for the delay. :(

The commands themselves ("R" and "E") should be upper case per the Ultima manual (the newer NexStar commands use lower-case). An interesting question is if the letter-digits in the hexadecimal numbers in the parameters should be upper- or lower-case. :)

I looked through the code. It turned out that due to poor choice of variable type, the current position of the telescope was always received as (0,0). I really hope that this is the root cause, and not some arcane serial port communication issue.

I've uploaded a new test package to the usual place:
https://launchpad.net/stellarium/+download
Look for "stellarium-bzr4876-servocat-ultima2k-2-win32.exe".

Before you test the connection, please enable the telescope server log: In the "Options" tab in the "Telescopes" window, check the box "Log telescope driver messages to files". This will dump debug messages from the telescope driver to a file in the user data directory.

I've added a shortcut in Stellarium's Start menu folder so that you can access the log easily: if the telescope has been added at slot 1 (if it is moved with Ctrl+1), you can open the log with the "Telescope driver log for slot 1" shortcut. The log itself is in the same directory as Stellarium's normal log.

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

Bogdan,

Thanks - and no problem for the delay - you responded very fast - considering I just did the 2nd test this past weekend!

I have some work to complete, tonight. I will most likely be able to get to this tomorrow night.

I will follow up with a full report, as before

Sincerely,

Bert

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

I was able to break free and test your 2nd U2K version in my room - pretending to align to two stars. I was not able to control my Ultima 2000 telescope. It did say it was connected this time,instead of just "Connecting". Where are the log files located at? I was not able to find a menu where I could set the location and I could not find the start menu you were referring to that would open up this file. If you could point me in the right direction, I will try this again and upload the log file for reference. We're so close!

Thanks,

Bert

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

Here is the contents of the log_TelescopeServer1.txt file:

15041, 04:26:21.849685Z: Ultima2000Connection::sendCommand(Ultima2000CommandGetRaDec)
15041, 04:26:21.851685Z: Connection::performWriting: writeNonblocking(1) returned 1; E
15041, 04:26:32.451291Z: Ultima2000Connection::sendCommand(Ultima2000CommandGotoPosition(18438,-3044))
15041, 04:26:40.523753Z: Ultima2000Connection::sendCommand(Ultima2000CommandGotoPosition(35584,-671))
15041, 04:26:50.159304Z: Ultima2000Connection::resetCommunication

I've also attached a copy of the log file

Bert

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

The log shows that one byte - the 'E' command - was successfully written, but there was no answer.

After some extensive Googling today, I found out that unlike NexStar, the commands for Ultima 2000 should be terminated with a carriage return character.

I've uploaded a patch to the usual place - look for "stellarium-bzr4876-servocat-ultima2k-3-win32.zip" in the download page. It's a ZIP file that contains only the executable files, so you don't have to download everything again. :) Just unpack the files and use them to replace the default ones in Stellarium's folder in Program Files.

Another question that remains is if/how carriage returns are used in the answer messages from the telescopes. I guess we will find out. :)

Revision history for this message
Bert Schneider (bertnpeggy) wrote :
Revision history for this message
Bert Schneider (bertnpeggy) wrote :

Still didn't work. I deleted the old log files.

Attached is the log.txt file.

Here is the content of the log_TelescopeServer1 file:

15042, 02:31:48.802863Z: Ultima2000Connection::sendCommand(Ultima2000CommandGetRaDec)
15042, 02:31:48.803863Z: Connection::performWriting: writeNonblocking(2) returned 2; E

15042, 02:31:55.204230Z: Ultima2000Connection::sendCommand(Ultima2000CommandGotoPosition(14314,-1494))
15042, 02:31:59.573479Z: Ultima2000Connection::resetCommunication

Now what?

Bert

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

There's a new patch - "stellarium-bzr4876-servocat-ultima2k-4-win32.zip". I've added some more logging statements and code that strips any leading carriage return characters from the answers. I've also made sure that the correct character code for "carriage return" is sent to the device (instead of being overwritten by the compiler). If this doesn't work, I'll try the Windows combination for "end of line" - carriage return + line feed. I'm also investigating more deeply the serial port setup.

You probably know that, but let me make sure:
- Before trying to connect, you align the telescope, right? You mentioned that you are doing a fake alignment indoors.
- Some pages I've found during my Googling mention that computer control via serial port doesn't work if the hand controller is not in a particular state:
This one mentions that it should be in the uppermost menu level:
http://www.fixya.com/support/t22527-celestron_ultima_2000_rs_232_interface
This one claims that the hand controller should be set to "Catalog" mode before attempting a connection:
http://deepskyimages.com/instruments.htm

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

I actually decided to go ahead and add another patch with the carriage return and line feed combo, so that you can test them at the same time: Apply patch #4 first, test it and attach the driver log here, then repeat with patch #5: "stellarium-bzr4876-servocat-ultima2k-5-win32.zip"

Thank you very much for your patience. :)

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

I plan on going out either Friday night or Saturday night. I will test both of your new patches outside.
Yes - I did align the scope, before I physically connected the cable. I also made sure the menu on the hand controller was at the "top" of the hand controller menu. I will keep you posted. Thank you for your continued help.

Sincerely,

Bert

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

I just went outside and tested both #4 and #5 patches.

I will attached four files (two log files for #4 adn two for #5).

I made sure the hand controller menu was at the top of the menu chain and at the Catalog function.

It still did not work.

Revision history for this message
Bert Schneider (bertnpeggy) wrote :
Revision history for this message
Bert Schneider (bertnpeggy) wrote :
Revision history for this message
Bert Schneider (bertnpeggy) wrote :
Revision history for this message
Bert Schneider (bertnpeggy) wrote :
Revision history for this message
Bogdan Marinov (daggerstab) wrote :

I'm sorry about the delay - I've been travelling.

I looked into the serial port communication code. According to the Ultima 2000 manual, it doesn't use any flow of control. It seems that the Stellarium code implicitly enables some kinds of flow of control on Windows (this is the reason for the RTS and DTR lines lighting up), so this may be the reason why no reply is returned.

I've tried to disable all possible forms of flow of control and I've uploaded patches #6 and #7 to the usual place. It's two patches again, because the end-of-line character issue was not resolved the last time.
https://launchpad.net/stellarium/+download

Thank you for your patience again!

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

Bogdan,

Thanks for the update - my son is visiting this week - I will try and get out some time this week. It's cloudy tonight, anyway. With my permanent telescope pier and wedge, it only takes me a minute or two to set up my telescope outside.

Bert

Revision history for this message
Bert Schneider (bertnpeggy) wrote :
Revision history for this message
Bert Schneider (bertnpeggy) wrote :
Revision history for this message
Bert Schneider (bertnpeggy) wrote :
Revision history for this message
Bert Schneider (bertnpeggy) wrote :
Revision history for this message
Bert Schneider (bertnpeggy) wrote :

It has been cloudy the last several nights and last night the moon was the brightest, in twenty years!

So I hooked up my computer to my scope inside, and faked the star alignment. I made sure the hand controller menu was at the top of the menu (Catalog).

I still could not control the scope.

Attached are the four log files (two each for Patch 6 and Patch 7).

I hope thee is just something simple going on and can be easily be fixed.

I will continue to test if you have time to tweak the code.

Sincerely,

Bert

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

This is bad. I'll continue looking into this, though I'm not sure when the next test build will be. Probably some time this week, but it's possible to take longer.

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

Understand - take you time.

Bert

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

Bogdan,

Have you had a chance to look at the Ultima 2000 Interface, lateley?

Sincerely,

Bert

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

Hello.

No, I'm sorry, I haven't worked on it recently. I'll be rather busy until the end of this week and I have no time for programming.

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

I'm sorry for the delay - my life has been rather chaotic recently.

I'm trying to figure out what exactly is wrong with the connection. The old code expected almost immediate answers, so I've tried to re-use the timed queue mechanism from the LX200 code.

I've uploaded a new test build (#9) to the usual place:
https://launchpad.net/stellarium/+download

Thank you for you patience.

Revision history for this message
Bert Schneider (bertnpeggy) wrote :

No problem for the long delay!!! You are truly a saint for doing this.

I have been battling some "dragons" myself. I had to replace the fuel line on my truck. My wife broke her toe. I've had to reip out a subfloor and dry wall from what use to be my master bathroom shower, and I had to tear out the structure around our garden tub. I'm getting ready for a plumber to replace our entire home's plumbing - as we have polybutylene pipe. I need to get that replaced, before I can remodel our master bathroom. So, I've been busy too - I've not had a chance to get out my scope.

I will try again - hopefully this time you have made the code work.

Sincerely,

Bert

Revision history for this message
Bert Schneider (bertnpeggy) wrote :
Revision history for this message
Bert Schneider (bertnpeggy) wrote :

I tried to control my Ultima 2000 with your version 9 but it still did not work - I've attached the two log files for your reference.

Is anyting working?

Thanks,

Bert

Changed in stellarium:
status: In Progress → Won't Fix
Changed in stellarium:
milestone: 1.0.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.