Topics

Can I use OnStep to control my telescope from a laptop with stellarium?

bluescope
 

Can I use OnStep to control my telescope from a laptop with stellarium?

If yes, what hardware will be the best for that?

there is meany options in the wiki, so I'm a bit confused.

Dave Schwartz
 
Edited

Yes. Plug in the USB, then configure the Stellarium telescope plugin to connect directly using the Meade LX200 compatible protocol.

All hardware type are equivalent for USB connection.

On 2019-09-26 11:49 a.m., bluescope wrote:

Can I use OnStep to control my telescope from a laptop with stellarium?

If yes, what hardware will be the best for that?

there is meany options in the wiki, so I'm a bit confused.

bluescope
 

I have Arduino mega on hand, and step/direction stepper drivers. can I use them for that?

bluescope
 

here I upload a picture of all the hardware I have right now:

https://i.imgur.com/htrvp9u.png

Khalid Baheyeldin
 

On Thu, Sep 26, 2019 at 12:11 PM, bluescope wrote:
I have Arduino mega on hand, and step/direction stepper drivers. can I use them for that?
The Arduino Mega 2560 should work.
You need a RAMPS 1.5 board, and a DS3231 RTC module.

Start with this wiki page.

bluescope
 

I don't have a ramps board, but anyway my stepper drivers can't fit a ramps board, so I need to connect them directly to the arduino,

I also don't have DS3231 RTC module, but I have the DS1307 RTC module


do you think I can use this hardware, or it is better to get something better?

Khalid Baheyeldin
 

On Thu, Sep 26, 2019 at 12:56 PM, bluescope wrote:

I don't have a ramps board, but anyway my stepper drivers can't fit a ramps board, so I need to connect them directly to the arduino,

Good point. In that case, the RAMPS board is not crucial.

I also don't have DS3231 RTC module, but I have the DS1307 RTC module

The DS3231 is the one that is most tested and used. I don't recommend the DS1307.

do you think I can use this hardware, or it is better to get something better?

If you want to use the Mega2560 that you have, the pinouts for RAMPS are not applicable
in your case. You can try Config.Classic.h and src/pinmaps/Pins.Classic.h.

Whether you need a new controller or not, depends on several things:

a) the specs of the motors and drivers.
Start with the spreadsheet on the Wiki construction page.
See if your motors and microstepping will provide adequate resolution and goto speed.

b) Your needs:
Do you need more than one focuser? Only RAMPS/MKS Gen-L and MaxPCB2 offer two focusers.
Do you need a rotator?

c) Your experience level with electronics and soldering?
Some are easier to put together, e.g. MKS Gen-L and STM32.

d) Will the motors that you have fit in the mount? If they don't you need new motors.

Start with the showcase page to see what others have build.

bluescope
 

On Thu, Sep 26, 2019 at 01:24 PM, Khalid Baheyeldin wrote:
one that is m

I'm not really sure but,I'm expert in soldering and CAD design, machining, and 3d printing.

my telescope is Meade DS-114 (4.5" aperture)

I want to be able to take it out of the car set it on the ground and control it from my laptop,
I want to point and track to some fairly bright object and satellites.

I don't need a focuser, because it is manual on this telescope.

the original motors on this telescope are some plastic dc motors that don't work very good now, so I want to remove them and 3d print new mounts for my steppers.

the bigger stepper is 400 steps per/rev that will be connect to the Azimuth.
the smaller
stepper is 200 steps per/rev that will control the Altitude.
each controller can do up to 1/16 step. but I have no idea if this is necessary.

I think Alt / Az controller will be perfect for my needs.



this hardware is what I have on hand, but if I'm anyway need to order new RTC, I will be happy to order other hardware as well that will work better.

as far as I understand the MKS Gen-L, is arduino mega + rapms in one PCB,

and according to the wiki, it look like the STM32 is stronger then the arduino.

 

so if someone can make me a list of stuff to order, or if you have a kit or a list, that will be grate, because I'm abit confused.

I'm looking for something that will be easy and plug and play as possible

Khalid Baheyeldin
 

On Thu, Sep 26, 2019 at 02:18 PM, bluescope wrote:

I'm not really sure but,I'm expert in soldering and CAD design, machining, and 3d printing.

my telescope is Meade DS-114 (4.5" aperture)

I had this scope a few years ago. It is portable enough, but has a few weaknesses.
The focuser is plastic and its teeth broke. I ended up selling the working parts.

I want to be able to take it out of the car set it on the ground and control it from my laptop,
I want to point and track to some fairly bright object and satellites.

There was a discussion on satellites a while back, but I can't remember what the conclusion is.
It was about using a program specifically designed to track satellites.

So, don't count on OnStep being able to track satellites on its own.

I don't need a focuser, because it is manual on this telescope.

OK. That opens up your choice of board.

the original motors on this telescope are some plastic dc motors that don't work very good now, so I want to remove them and 3d print new mounts for my steppers.

You must be sure that the motors will fit in the base.

the bigger stepper is 400 steps per/rev that will be connect to the Azimuth.
the smaller
stepper is 200 steps per/rev that will control the Altitude.
each controller can do up to 1/16 step. but I have no idea if this is necessary.

Did you try the spreadsheet?
Do you know what gear reduction is in place?
Can you reuse that reduction?
Or it is part of the plastic motors? If it is so, then your conversion will not work without making new gears.

I think Alt / Az controller will be perfect for my needs.

Any OnStep controller can be either Equatorial or Alt-Az. Configuration determines whether it is this or that.

this hardware is what I have on hand, but if I'm anyway need to order new RTC,

You only need to order the RTC if you will use the Arduino Mega 2560, since its clock is not accurate.
Other boards have better clocks.

I will be happy to order other hardware as well that will work better.

as far as I understand the MKS Gen-L, is arduino mega + rapms in one PCB,

Yes, but it also has a good clock, so no need for external RTC module.

and according to the wiki, it look like the STM32 is stronger then the arduino.

Yes. It is also low cost, fairly easy to put together.
Another point is that most boards take pluggable drivers, it is small enough and may fit in the base of the mount.
The external drivers are just too big.

so if someone can make me a list of stuff to order, or if you have a kit or a list, that will be grate, because I'm abit confused.

I'm looking for something that will be easy and plug and play as possible

Before you order anything you must be sure that the motors will fit, that you have gear reduction in place (or can 3D print them), and that the spreadsheet has accurate inputs and good outputs.

bluescope
 
Edited

Thank you for the long and very detailed response!

I was trying to use the Excel calculator but I'm not sure what is GR1 and GR2, the worm gears on my telescope are broken. so I'm going to replace them with a pulley that will be connected to the telescope shaft. and a stepper with smaller pulley to drive it.

I hoped I filled it correctly based on the following math.
https://i.imgur.com/ila39Sc.png

For the Azimuth I will have a 400 step/rev motor, with 16 teeth pulley, that will be drive 60  teeth pulley, the driver will drive it in 1/16 mode.
the ratio between the pulleys is 3.75, and 400*16 = 6400 * 3.75 = 24000 / 360 =  66.66..steps per degree

For the Altitude I will have a 200 step/rev motor, with 16 teeth pulley, that will be drive 60  teeth pulley, the driver will drive it in 1/16 mode.
the ratio between the pulleys is 3.75, and 200*16 = 3200 * 3.75 = 12000 / 360 =  33.33..steps per degree

The "MaxRate" that I got was 96. and if I am understand it right, it should work fine with arduino mega.


I was trying to use the online configuration generator, but some of the stuff not very clear to me.
Hopefully someone can help to select the correct options.
http://o.baheyeldin.com:1111/

Mount type -  there is "Fork" and also "Alt-Azimuth, I'm not sure what is the difference between them.
Here is a picture of my telescope and I marked how it move: https://i.imgur.com/eCOwnEU.png

Which board - I'm going to use just a simple Arduino mega, without any additional board

MICROSTEPS_GOTO - I was read the description about it, but I have no idea what value should be use, so I set it to "OFF"

Stepper Driver Model - my stepper driver need to get data from only 2 pins "step" and "direction" (all the microstepping settings is done with dip switches on the driver), so I'm not sure what driver to select from the list.

Will you be using the ST4 Port - no idea what is "ST4 port" all I want it to control it from stellarium.

Will you be using an ST4 Hand Controller? -  I set to "No"

When using a hand controller - If the previous one is "No" how this option is even active?, I have no idea what to set here,

Remember Auto Meridian Flip between power downs? - not sure what does it mean, my telescope is going to be in the car, so each time it will be setup in different location.

I also ordered the DS3231 RTC I Hope I will get it soon. - in the meanwhile is there a way to test stuff without it?

Khalid Baheyeldin
 

On Fri, Sep 27, 2019 at 01:15 PM, bluescope wrote:

I was trying to use the Excel calculator but I'm not sure what is GR1 and GR2, the worm gears on my telescope are broken. so I'm going to replace them with a pulley that will be connected to the telescope shaft. and a stepper with smaller pulley to drive it.

If you have two sets of reductions, enter one in GR1 and the other in GR2. The order does not matter.
If you only have one reduction, you did it correctly. One will be 1, the other will be the reduction.

I hoped I filled it correctly based on the following math.
https://i.imgur.com/ila39Sc.png

For the Azimuth I will have a 400 step/rev motor, with 16 teeth pulley, that will be drive 60  teeth pulley, the driver will drive it in 1/16 mode.
the ratio between the pulleys is 3.75, and 400*16 = 6400 * 3.75 = 24000 / 360 =  66.66..steps per degree

For the Altitude I will have a 200 step/rev motor, with 16 teeth pulley, that will be drive 60  teeth pulley, the driver will drive it in 1/16 mode.
the ratio between the pulleys is 3.75, and 200*16 = 3200 * 3.75 = 12000 / 360 =  33.33..steps per degree

This resolution is too coarse, but since you will be using this for visual, it may not be an issue.
You can use 1/32 for better resolution.

The "MaxRate" that I got was 96. and if I am understand it right, it should work fine with arduino mega.

The slew rate is very high (156 deg/sec). You need to increase MaxRate to bring it down to ~ 7 or 10 deg/sec max.

I was trying to use the online configuration generator, but some of the stuff not very clear to me.
Hopefully someone can help to select the correct options.
http://o.baheyeldin.com:1111/

Mount type -  there is "Fork" and also "Alt-Azimuth, I'm not sure what is the difference between them.
Here is a picture of my telescope and I marked how it move: https://i.imgur.com/eCOwnEU.png

This is different from the one I had. It is the older model. The good thing is that the motors are external.
Yes, you should use Alt-Az (not Equatorial, not Fork).

Which board - I'm going to use just a simple Arduino mega, without any additional board

I think you should use Classic, since you don't have a RAMPS board.

MICROSTEPS_GOTO - I was read the description about it, but I have no idea what value should be use, so I set it to "OFF"

If you will use external stepper drivers, then set this to OFF.

Stepper Driver Model - my stepper driver need to get data from only 2 pins "step" and "direction" (all the microstepping settings is done with dip switches on the driver), so I'm not sure what driver to select from the list.

Try A4498 for this.

Will you be using the ST4 Port - no idea what is "ST4 port" all I want it to control it from stellarium.

Set to None.

Will you be using an ST4 Hand Controller? -  I set to "No"

Good.

When using a hand controller - If the previous one is "No" how this option is even active?, I have no idea what to set here,

Ideally, this should be the case, but it will complicate the code. So ignore it.


Remember Auto Meridian Flip between power downs? - not sure what does it mean, my telescope is going to be in the car, so each time it will be setup in different location.

Set to No.

Khalid Baheyeldin
 

On Fri, Sep 27, 2019 at 01:15 PM, bluescope wrote:
I also ordered the DS3231 RTC I Hope I will get it soon. - in the meanwhile is there a way to test stuff without it?
You can test without one. The tracking may be a bit inaccurate, but that may not be an issue with this coarse resolution.

bluescope
 

Thank you A-lot!
I think it working!

It took me some time to figure out how to open the OnStep-Beta folder in the arduino IDE, it turns out that you must change the name of the folder fromOnStep-Beta to OnStep, and only then open the onstep.ino that will also open all the rest of the project files

I got en error "PECBufferSize cannot be greater than 3384, - no idea what "PECBufferSize" is all about
but in the Config.Classic.h I change the value to be 3384
//#define PECBufferSize              23040
#define PECBufferSize              3384

And also I had to comment all the other config files from Config.h

#include "Config.Classic.h"
//#include "Config.MaxESP.h"
//#include "Config.MaxPCB.h"
//#include "Config.Mega2560Alt.h"
//#include "Config.MiniPCB.h"
//#include "Config.Ramps14.h"
//#include "Config.STM32.h"
//#include "Config.TM4C.h"


after that I was able to load it to the arduino mega, and open stalarum and connect to my arduino as lx200.
after that the rx and the tx led on the arduino mega start to blink.
https://i.imgur.com/sNGKbrm.png

The most important thing is still a mystery for me - what pins in the arduino control the step/direction signals for the motor drivers?

Khalid Baheyeldin
 

On Fri, Sep 27, 2019 at 04:36 PM, bluescope wrote:

It took me some time to figure out how to open the OnStep-Beta folder in the arduino IDE, it turns out that you must change the name of the folder fromOnStep-Beta to OnStep, and only then open the onstep.ino that will also open all the rest of the project files

This is documented on this page.

I got en error "PECBufferSize cannot be greater than 3384, - no idea what "PECBufferSize" is all about
but in the Config.Classic.h I change the value to be 3384
//#define PECBufferSize              23040
#define PECBufferSize              3384

This is applicable for equatorial mounts, and is the number of seconds for one worm rotation.
If you are using an Alt-Az mount, then this parameter is irrelevant.

And also I had to comment all the other config files from Config.h

#include "Config.Classic.h"
//#include "Config.MaxESP.h"
//#include "Config.MaxPCB.h"
//#include "Config.Mega2560Alt.h"
//#include "Config.MiniPCB.h"
//#include "Config.Ramps14.h"
//#include "Config.STM32.h"
//#include "Config.TM4C.h"

No. You don't need to comment anything in any file, except the configuration for your board.

In your case, it is Config.Classic.h, and you need to change

#define Classic_OFF

To

#define Classic_ON

after that I was able to load it to the arduino mega, and open stalarum and connect to my arduino as lx200.
after that the rx and the tx led on the arduino mega start to blink.

The most important thing is still a mystery for me - what pins in the arduino control the step/direction signals for the motor drivers?

They should be in src/pinmaps/Pins.Classic.h

George Cushing
 

Are you planning to use the original DS worms and worm wheels? Is this for visual use only?

The DS drives used a 205.333:1 reduction to a 60:1 worm/crown or a total reduction of 12320:1. That's a 24 minute worm period or 8.6RPM at the motor output shaft. Without  gear reduction on your steppers I don't know how you can get to a usable steps/° of Az rotation.

bluescope
 

Before I'm going any further and invest more money in this project, I want to see that stellarium can actually control my telescope (even with very poor resolution)

To add more reduction or get better ways to control the telescope is something that I'm aware about it, and it is not an issue right now.

After all the Meade DS-114 is a very basic telescope and you can't really enjoy faint deep space objects using it. but it is a grate platform to test OnStep as LX200 controller - and this is my goal right now.

Howard Dutton
 

On Sun, Sep 29, 2019 at 03:27 AM, bluescope wrote:
Before I'm going any further and invest more money in this project, I want to see that stellarium can actually control my telescope (even with very poor resolution)
It's not just about tracking resolution.  Gear/timing belt/etc. reduction multiplies torque from the motors. 

Nothing wrong with learning by trial and error as long as you don't invest too much time and money.

Khalid Baheyeldin
 

On Sun, Sep 29, 2019 at 06:27 AM, bluescope wrote:

Before I'm going any further and invest more money in this project, I want to see that stellarium can actually control my telescope (even with very poor resolution)

One thing that Stellarium will not do with OnStep, is starting the alignment.
Normally, for non-permanent installations (observatory), you have to start with an n-star alignment.
If you use Stellarium as LX200, there is no way to send the 'start align on n stars' command.
I think Stellarium supports ASCOM, and if you get the OnStep ASCOM driver, this will not be an issue.
Another option is to add a WiFi adapter, and use an Android phone with the OnStep App to do the align.

bluescope
 

My biggest issue right now, is that I can't even make the stepper motors move with OnStep.

It took me a-lot of time to try every single pin an the Arduino mega, but nothing works all I got is some blinks from the the RX and TX LEDs on the Arduino.

If I'm flashing to the Arduino a simple blink code (just to create some square wave) the Arduino send pulses to the stepper driver and the stepper rotate fine.
This way I know my Arduino board is good, and also the wiring from the stepper drive to the motor are good
here you can see the motor rotate with the test code:
https://i.imgur.com/PyXyxgX.mp4

any idea how to locate the step and direction pins in the Arduino?
here you can find my /src/pinmaps/Pins.Classic.h
https://paste.debian.net/1103265/

those are my telescope settings in stellarium:
https://i.imgur.com/N47ULUH.png

I'm downloading the ASCOM platform right now, and also the OnStep ASCOM driver

ASCOM Platform 6.4SP1
STABLE OnStep ASCOM driver (version 1.44)

Khalid Baheyeldin
 

On Sun, Sep 29, 2019 at 11:01 AM, bluescope wrote:
any idea how to locate the step and direction pins in the Arduino?
The following are what you need.

Axis1StepPin
Axis1DirPin

Axis2StepPin
Axis2DirPin

Try them.