msheald
Posts: 51
Joined: Sun Dec 31, 2017 7:45 pm

LSM9DS1 to Dectect Telescope Position?

Fri Feb 23, 2018 10:46 pm

Hello! I purchased a LSM9DS1 in order to help me detect where my telescope is positioned since it is difficult for the Windows PC computer that controls the telescope to talk with the Pi that controls the box observatory while keeping VNC and TeamViewer active with the home computer inside the house.

First, is there a python library for this chip? I found a C++ library on GitHub, and it works fine. However, I don't know C++ and am just getting to know python, so I would prefer a python library.

Second, is this the right chip to use for this purpose? When the observing run starts, the telescope will need to point to, and takes images of, a special flat field light source. Those exposures will be used to normalize the star images. I want to place the LSM9D31 on the scope in order to let Pi know when the telescope points at the light source so that the Pi can be turn it on and then when the telescope moves away so that the Pi can turned it off. It seems to me that, with the 9 degrees of data of the chip, it should provide consistent directional information when the scope points to the same place where the light source is, correct?

Thank you and best regards.

Mike

Idahowalker
Posts: 296
Joined: Wed Jan 03, 2018 5:43 pm

Re: LSM9DS1 to Dectect Telescope Position?

Sat Feb 24, 2018 3:15 am

Perhaps a rotary encoder might be a better fit for this application.

https://en.wikipedia.org/wiki/Rotary_encoder
Being a programmer: She says go to the store get 1 bottle of milk, if they have eggs bring back 6. She gets mad cause I brought back 6 bottles of milk.

User avatar
Burngate
Posts: 5407
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
Contact: Website

Re: LSM9DS1 to Dectect Telescope Position?

Sat Feb 24, 2018 10:54 am

msheald wrote:
Fri Feb 23, 2018 10:46 pm
... is this the right chip to use for this purpose? ... It seems to me that, with the 9 degrees of data of the chip, it should provide consistent directional information when the scope points to the same place where the light source is, correct?
Short answer ... No.

Somewhat longer answer ...
It's got nine degrees of freedom - linear accelleration, angular velocity, and magnetic field.

Your telescope isn't moving away from your observatory, so linear accelleration isn't needed. That's three down.
When you first switch it on, you don't know where your telescope is pointed, so although this device can confirm it isn't moving, it won't tell you where it is. Three more down.
Only the magnetic field sensor can give you fresh information.

msheald
Posts: 51
Joined: Sun Dec 31, 2017 7:45 pm

Re: LSM9DS1 to Dectect Telescope Position?

Sat Feb 24, 2018 11:56 am

Thank you for your guidance.

I thought to overcome this, the start position of the telescope would always be at the same place, so any movement would indicate that the initialization images had been completed. However, it sounds like position data after that would be suspect.

Is there a python library for this sensor? Thank you and best regards.

Mike

User avatar
thagrol
Posts: 813
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: LSM9DS1 to Dectect Telescope Position?

Sat Feb 24, 2018 5:22 pm

Have you considered ask the mount's motor controller directly?

Last time I looked into it, the synscan handset on my skywatcher scope could give you some information but it was also possible for it to act as a pass through (and level converter) that allowed my PC to talk directly to the motor control board in the mount.

Of course, I'm assuming you have an "intelligent" mount not just a couple of stepper motors connected.

Also, as my mount doesn't use absolute encoders, any position data wil be relative to where the scope was when the mount was last powered on.
Note to self: don't feed the trolls
If you believe "L'enfer, c'est les autres" (Hell is other people) have you considered that it may be of your own making?

msheald
Posts: 51
Joined: Sun Dec 31, 2017 7:45 pm

Re: LSM9DS1 to Dectect Telescope Position?

Sat Feb 24, 2018 11:15 pm

Hello! Unfortunately, in order to communicate between the Pi and the mount or another computer, VNC stops working between my house/work computer and the Pi. So, the work around for me is to try to find an alternative that gets the information to the Pi but not from a direct connection. Since I do not need to Pi to have continuous feedback of the telescope's position, just intermittent for specific purpose (the flat field at present), I thought a sensor might work out for that purpose.

Thank you again and best regards.

Mike

User avatar
mwilliams03
Posts: 118
Joined: Mon Oct 29, 2012 2:56 pm
Contact: Website

Re: LSM9DS1 to Dectect Telescope Position?

Mon Feb 26, 2018 3:42 am

an IMU can be used, but it depends how accurate you need it to be. This is because of the noise these sensors make.

"Your telescope isn't moving away from your observatory, so linear accelleration isn't needed. That's three down" This is sort of incorrect.
The accelerate can also be used to measure the current angle of the IMU. There will almost always be a reading on one of the axis due to gravity. Using the ATAN2 function and another axis, you can get the current angle of the accelerometer.

Google "AHRS",
There is a lot of code out there for AHRS, however I have never seen any python code.

Also, it is very important to calibrate your compass to get accurate readings.
Mark -- OzzMaker.com -- Creator of PiScreen - A 3.5" TFT for the Rasspberry Pi and BerryIMU.

msheald
Posts: 51
Joined: Sun Dec 31, 2017 7:45 pm

Re: LSM9DS1 to Dectect Telescope Position?

Mon Feb 26, 2018 10:18 am

Thank you!

Mike

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 21 guests