Stargazer connection to Serial to USB cable

Ok, thanks for the info and the update!

I got mine figured out, I connected it with a serial to usb cable. Now I am trying to use python to control the stargazer and get a output. But I am not sure how to go about it with programming. Does anyone know about this?

Are you looking for the communication protocol? It is documented in section 6 of the manual:

There also sample code available in the Useful Links section:

It’s in C, but can be used as a reference for other languages. I’d recommend paying attention to the “CSerial” object instance in the StarGazerSampleVCDlg.cpp file, to see what it does when it reads and writes to the serial port.

Hello,

I recently bought a stargazer localization system. It comes with an inbuilt serial port. I am using a serial to usb cable to receive data.
I am able to receive the data from the stargazer on a hyperterminal like putty and CuteCom in linux. (However I am not able to receive the data on the serial monitor provided by stargazer).
The problem I have been facing is that when I send ~#CalcStop command to stargazer through hyperterminal. The data stops and then when I send commands to read data like ~@BaudRate I receive data which is unreadable. I am using a serial to usb cable.

I have set the parameters as mentioned in the manual, like

  1. baud rate to 115,200.
  2. Parity to none.
  3. Flow control to none.
  4. Data Bits to 8
  5. Stop Bits to 1

I am not sure whether there is a problem with my serial to usb cable, because I can receive the other data like Marker ID, Heading angle, x and y position, marker height in the same format as specified by Hagisonic. (For example: ~^I534|+175.16|-3.66|-33.58|200.33).
Only when I send ~#CalcStop to stop the data and then read the current parameter settings on stargazer using commands like ~@BaudRate I get data which unreadable.

Could you suggest some way whereby I can send and receive data which is readable. Or is this some issue with the stargazer itself.

Thank you for your time.

Reagards,
srik

Hi Srik,

Unfortunately, we do not have more information then what is already provided on the product pages, under “Useful Links”. For more complex issues with the protocol or use of the product, we recommend that you contact the manufacturer directly for faster support. You can reach them here: [email protected] or [email protected]. Please let us know if you are unable to reach them.

Sincerely,

Hi srik,
I bought a Stargazer localization system a while ago, and the only way I found I was able to get my laptop to receive data from the Stargazer was to use a 9-pin to 9-pin connection (that is RS232 to RS232). I hooked one end of the 9-pin cable to the Stargazer and the other end to a 9-pin port on the laptop, and I started receiving data in the Serial Monitor program. Many newer computers don’t have a 9-pin RS232 port on them. I went to a used computer store and bought a ~10-year old laptop that had an RS232 port on it. There may be other ways of solving the problem, but this is what worked for me.
You only need to use the old computer to program the landmarks into the Stargazer. Once the landmarks are loaded, you can switch to using a newer computer (for Arduino, or something like that).
– Dexter

Hi Dexter,
Thank you for the reply.
In my case, I am using a Silicon labs UART-TTL bridge as a serial to usb cable. I am able to obtain the values on the Stargazer serial monitor. However, when I try to stop the stargazer using the CalcStop button the stargazer does not stop.
I was using the HLD2 type markers and hence I wanted to change the marker type. Do you have any idea why this could be happening.

By the way I am looking for an old laptop with DB-9 serial port. Will see if I can find one.

Thanks.
srik

Hi srik,
I don’t know if you can really “stop” the Stargazer, you can just reprogram it. What I did was set up four landmarks on the ceiling in a square pattern, with each landmark being 56 inches from the other (the landmarks should be spaced apart about 80% of the distance from the Stargazer to the celing). Then I just moved the Stargazer under each landmark, until they showed up in the “Map Info” field. Now I have the 4 landmarks programmed into the Stargazer. This is where I am right now, and I am stuck. I can’t get the Arduino to read the landmarks. Does this answer your question?
– Dexter

Hi srik,
By the way, you don’t need to find an old laptop with a DB-9 port if you already can get the Stargazer to input data into the data fields of the Stargazer Monitor. The only reason I got an old laptop with a DB-9 port was that I was unable to get the Stargazer to put any data into the Serial Monitor program using a USB connection. If a USB connection works for you, just use the USB.
– Dexter

Hi Dexter,
I have solved the issue regarding reading data from the stargazer monitor.
First I had tried using a usb to TTL bridge to read data from the stargazer. The stargazer I am using, comes with a TTL out and a RS232 out. So I had tried using the TTL output directly. I used a Silicon labs CP2102 USB to TTL converter.
When I used the CP2102 USB to TTL converter I could read data on the stargazer monitor. But now the issue was I couldn’t communicate with the stargazer using the commands specified by Hagisonic ( For ex, ~#CalcStop , ~@BaudRate etc.).
Then I got to know that the stargazer only works with very specific USB to RS232 drivers. It works well with FTDI based serial to USB converters.

Then I bought a FTDI manufactured RS232 to USB cable. After using the FTDI cable with the proper drivers I was able to read as well as communicate with the stargazer.
Though, when I tried using the TTL out from the stargazer with the same FTDI chip I was again not able to communicate with the stargazer. So, I was able to narrow down the issue to the problem with the TTL pins on the Stargazer. Somehow the RxD pin of the TTL does not seem to work.

By the way I am not using Arduino for getting the data from the stargazer, I have written the code in C++ for reading data from the serial port.

Thanks,
srik

Hi srik,

I am glad you solved the problems you were experiencing.  I may have to ask you a few questions in the future as I continue working with my Stargazer.

Thanks,

Dexter

I am having trouble getting my Arduino Uno to read data coming in from a Hagisonic Stargazer navigation unit. When I run the code listed below, I just get a line of 0’s, and not the landmark number (an integer) that I’m expecting to get. Does anyone have experience with the Stargazer? With this code, I am just trying to verify that the Arduino is reading anything at all from the Stargazer. Does anyone know why I’m not getting correct output? I am looking for output in the Arduino Serial Monitor field.
Here is the code:

[code]
#include <SoftwareSerial.h>

char input1;
int pos1 = 0;
int pos2 = 2;
char marker_s[10];
int marker_i;

#define READSTGZR_RX 10
#define READSTGZR_TX 11

SoftwareSerial mySerial(READSTGZR_RX, READSTGZR_TX);

void setup(){
Serial.begin(9600);
mySerial.begin(115200);
}

void loop()
{
if(mySerial.available() > 0)
{
input1 = mySerial.read();
Serial.print(“input1”);
Serial.print(input1);
marker_s[pos1] = input1;
pos1++;
Serial.print(pos2);
}
marker_i = atoi(marker_s);
Serial.print(marker_i);
Serial.println(marker_i, DEC);
}

[h6]
[/code][/h6]

Hi srik,

  Could you give me the exact link to the "FTDI manufactured RS232 to USB cable" that you mentioned in your last post?  I looked around a little on the internet but could not find it.
  Also, could you give me the link to the "proper drivers" also?

Thanks,
Dexter

Hi Dexter,

We do not know what srik used, but we can attest to this USB to RS232 device to be very helpful. This is the one we use for internal testing and development in our technical support center and engineering department. It has worked flawlessly for all our uses. You can find the FTDI drivers (VCP, or virtual COM port) for it here.

Sincerely,

Hi Sebastien,
Thank you for the referral…I think I will buy that cable that you recommended. By any chance, could I get the same cable, but with a little longer cable?
All the best,

 Dexter

Hi Dexter,

The cable only has one size. If you need an extension (like this one), you could always consider browsing here.

Sincerely,

Hi Sebastien,

 Thanks for the info on the cable extension.  As far as installing the FTDI drivers...is it pretty straightforward?  First I download the software from the website you provided, uncompress the files, install them, and then plug the cable into the USB port?  Do I need another driver for the Stargazer as well, or is the one FTDI driver sufficient?

 Thanks,

 Dexter

Hi Dexter,

The short answer is yes to everything you said. :slight_smile: The slightly longer answer follows:

Yes, it is rather straightforward in most cases. With this cable it certainly will. Some more advanced devices sometimes require extra software to use the device and the drivers, but it is not the case with this product.

Yes and no. In reality, the FT232R chips are used in nearly all basic serial-to-USB adapters (in many devices), so it is very likely your computer already has those drivers installed from previously using a device with a USB port connected to your computer. Also, with Windows 7 and up, you should normally get a Windows Update pop-up to automatically install the drivers for you. Usually, you should only bother to manually download and install the drivers if this fails (problem with internet connection, Windows Update bug, disabled Windows Update, etc.).

To be fair though, we usually recommend that you download and install the drivers manually first before connecting the device (which is also what is usually recommended by most manufacturers). This ensures two things:

]Windows Update seems to have many issues based on previously installed drivers and has hiccups in a lot of cases. These are usually rather simply and quick to fix but also usually require advanced technical knowledge./:m]
]Manually downloading and installing the newest drivers downloaded directly form the manufacturer’s website will assure you have a specific version of the drivers (usually the most recent / stable one) and makes any troubleshooting required if an issue arises much easier (and problems less likely to happen)./:m]

With those previous points in mind, we do recommend that you manually download and install the drivers before connecting the device to your computer’s USB ports.

No, you do not need an extra driver. The FTDI driver (combined with the device) handle all the work.
The Stargazer uses a DB9 (actually DE-9 D-sub) UART serial port (RS-232) and therefore only needs this to be translated to a similar serial communication for the computer (since you may lack the proper connector/interface). The USB-to-serial adapter we recommended (the FT232R chip inside) simply translates the RS-232 signals into appropriate USB signals and the UART type of communication into USB communication. Then, the drivers receives this and create a virtual COM port that exposes the same type of communication as the Stargazer uses. This virtual COM port is an abstraction of what you would normally get in the past if you connected the Stargazer directly (not by USB).

That being said, you will probably, of course, need some special software to use the Stargazer (but not-driver level).

Sincerely,