Hello Guest it is November 16, 2019, 06:47:08 PM

Author Topic: Computer guided telescope mount using Mach3  (Read 2111 times)

0 Members and 1 Guest are viewing this topic.

Computer guided telescope mount using Mach3
« on: June 16, 2017, 11:29:50 AM »
Hello, Everybody,

This is my first post on this forum.

• I have been using Mach3 on my home made CNC router for several years (4-5?) already, and I love it.
I use a Russian made breakout board PureLogic PLCM-B1 that interfaces my computer via PureLogic PLCM-E3, which is a Ethernet / USB controller that emulates 3x DB25 ports. I use the BOB and the CNC via LAN (Ethetnet) and it works beautifully.
I also managed to convert my CNC router to a 3D printer, and I interfaced with it using a version of Mach3 that I customized. Although it worked fine, it was very slow, and I am making a different 3D printer right now, under Arduino.

• I am also an amateur astronomer and an amateur telescope maker, and I have been considering making a self guided (GO-TO) telescope mount using Mach3.

This project does not seem to be too hard, but I would like to ask the experts to consider its feasibility.

- The first problem is that the units a telescope mount uses (a Dobsonian, altazimuth one) are degrees.
Those degrees can be "Degrees, minutes and seconds" or decimal degrees.

The X axis needs to be fully rotative (can spin several turns) and must range from 0 to 360 degrees. It is the "Azimuth" or compass bearing.
The Y axis theoretically ranges from -90 degrees (looking down vertically) to +90 degrees (looking up vertically). It makes no sense to look at the ground with a telescope, so the practical range must be from 0 (horizontal) to 90 degrees (vertical up).

Mach3 DROs and inputs (in MDI tab) must accommodate to those units, and also the input.

I think that this first part, units, is rather feasible. What do the experts think?

- The second problem is more difficult and not that urgent.
It would be very, very nice to couple the telescope mount with a computer planetarium. Stellarium is a very common one, it is free and very good.
Stellarium has the possibility to stream data out, and those data can be used by other commercial mounts, as far as I know.
I do not know yet what format that data is, or how it can be used.
My question is I you guys think that Mach3 could theoretically used a data feed from another program to place the machine (router, telescope mount, whatever) where the other program tells it.

• I have some previous programming experience (VB6, VB.net, C++) but I am not an expert. Far from it.

Thank you


Re: Computer guided telescope mount using Mach3
« Reply #1 on: June 16, 2017, 07:19:54 PM »
amongst my other interests is Astronomy. I have a 10 inch Dobsonian and have given some thought to making it a goto mount.

Mach will easily produce the pulse signals required to drive steppers/servos. Further with Machs programming capability makes things
like Alt Az DROs easy and numerical calculations necessary to convert to RA Decl easy as well. Interfacing with another astronomy program
I think is probably doable if the manufacturer of the program is prepared to publish the format of its output data.

A more immediate challenge is how to drive the scope. Two phase steppers have a full step of 1.8 degrees and half step of 0.9 degrees.
Microstepping might give you the impression that greater resolution can be obtained but as many a CNCer has found that increased resolution
is fictitious. Clearly any direct drive from a stepper to the scope would not have the resolution to do the job.

I have seen designs where the stepper shaft acts as a small diameter pinion on a much larger diameter wheel attached to the scope in fact
part of the existing Dob mount. A reduction of 100:1 is probably achieveable. Note that this is not a gear, any gears will have lash which will
like as not render the goto mount useless. The design relies on friction contact between the nominal 'pinion/crownwheel' and has no lash.
Such a setup with half step resolution at the stepper would get 0.54 arc min or 32 arc sec resolution at the scope.

A lot of servos out there have 2500 line encoders for 10,000 count per revolution. A direct drive would result in a resolution of only 2.16 arc min.

I have low backlash planetary gearboxes for my 5 phase steppers for my mill (0.72 degree/step, 0.36 dergree/halfstep) but despite being  expensive they
have a guaranteed backlash of less than 3 arc min. So while at half step with 10:1 reduction I can get 2.16 arc min resolution the potential
backlash is 3 arc min. I might point out that I cant measure any backlash with my units I'm sure it must be there.

A top class worm drive with a large diameter worm wheel is the usual approach to telescope drives. They are VERY expensive, so much so
that really they go beyond any cost saving attempt to make your own drive/stepper/servo system.

Another alternative is harmonic drives. Really groovy idea to produce reductions of 50:1 ,100:1 etc with NO backlash. That's correct, NO
backlash. The manufacturers do allow 'lost motion', which is actually flexure rather than lash but has the same general meaning as backlash.
Typical 'lost motion' specs are 8-12 sec arc. Practical resolutions of 15-20 arc sec could be had. Unfortunately they're not cheap, I followed
them on Ebay for $300-$500 with a stepper or servo built in. Worth having a look. Doing some reading on Harmonic drives is also fascinating.

My wife left with my best friend...
     and I miss him!
Re: Computer guided telescope mount using Mach3
« Reply #2 on: June 17, 2017, 02:13:08 AM »
just had a look on Ebay and found this


Vexta is a Japanese company and they make a lot of stepper motor systems, a lot of them 5 phase like this example. I have Vexta 23 size steppers with 10:1 planetary
gearboxes for my mill. They are superb. They make really REALLY good stuff. Note that in one of the pics it shows 0.0072 degree/step ie 26 arc sec, if you had a half step
capable drive that is 13 arc sec resolution! That's right up there with pro gear, a man would be proud to show off handmade gear of this capability at a star party!

My drivers, also Vexta, are 230VAC with a DC link voltage of 150VDC. It makes my mill really sing, I run the steppers at 2300 rpm and they NEVER miss a beat.
For a telescope drive you don't need that sort of speed, in fact with the deep reduction you probably won't need anything like the torque that is available at 0.75A
per phase, the rated current. My guess is that you could run these steppers with 12VDC or less and I suspect currents of 100mA would be enuf for anything but
the largest of scopes or one that's well out of balance. I think battery operated is entirely possible, just the thing for star parties in the back of beyond.

My wife left with my best friend...
     and I miss him!
Re: Computer guided telescope mount using Mach3
« Reply #3 on: June 17, 2017, 05:22:15 AM »

• I am currently making a 13" f/4.5 mirror for a Newtonian telescope. It is already spherical and ready to be figured (parabolized) which is the most delicate part of mirror making.
• The mechanics of the mount are not trivial, indeed.
- I have been rummaging this project for some years now, and I already have some parts that might be useful: I have a set of boards like the ones on my CNC router (PureLogic PLCM-B1 and PLCM-E3), and I have a harmonic drive with a 1/120 reduction rate that I bought on eBay (S20-120-542611, but it  is not exactly like the ones you might find in Google pictures). I want to use that harmonic drive to control Azimuth (X axis, compass bearing). Using no micro-stepping at all, that would give me a 54 arcseconds resolution with the Nema23, 3Nm steppers that I already have for this project. As soon as you use 1/8 or 1/16 microstepping, you are in the 3 to 7 arcseconds resolution. If there is really no backlash in the system, that specifications would be superb (well, maybe just good enough).
- I do not know yet how I will control the Y axis (altitude), but a belt system is tempting: I like those GT3 5M toothed belts. Supposedly they have no backlash neither and they are not as cumbersome as harmonic drives.
However, I think I will end up waiting for another cheap harmonic drive to appear on eBay.
I am not a fan of worm-gears.
I also have a "high precision" planetary gearbox with 1/48 ratio, but it has a 5' backlash that I do not think is good enough.

• Craig, as you said another issue is the electricity: there is no socket on the stargazing places I usually go to, and the whole system would have to rely on batteries.
I had though that I could use three car batteries in series to achieve 36V and feed my drivers. Torque is related to voltage.
The scope itself will need very little torque from the stepper due to the big reduction, but the harmonic drives are a bit hard to turn by hand, about 50g -1.5oz- per 10 cm -4"-), that is 0.5 Nm or 7 Oz-in.
Maybe I do not need my large Nema23 (3Nm) to run this thing after all, maybe a couple of smaller Nema17 42BYGHW811 (of which I have many) driven by a couple HY-DIV268N-5A drivers -that I also have- will be enough.
Those Nema17 are rated 66 oz-in (0.45 Nm) at 2.5 Amp

Steppers are, anyway, power hungry. What do you think of this? Maybe servos would be a better idea.
If I use 70 Ah batteries and I drive two steppers at 3 Amps, the batteries should last for 11 hours, is that correct? Anyway, maybe that is an overkill.

• However, none of this is important if I cannot use Mach3 to control the scope.
From the Mach3 Point of view, I am going the divide the project in two parts.
- First I am going to make and test a Mach3 version with a right set of DROs (angular) and a dark interface to help with night vision.
- Then I will explore the possibility to join Stellarium and Mach3. Stellarium is able to control telescopes, some commercial telescopes (There is a plugin that acts a bit like Mach3 would act in my "vision").
Probably I will have to write a plugin that interfaces Stellarium and Mach3. That is currently out of my reach, and that is why I do not want to stop the project completely, but divide it into achievable chunks.

Re: Computer guided telescope mount using Mach3
« Reply #4 on: June 17, 2017, 06:50:51 AM »
you've raised some interesting questions, and a few myths.

The first is that microstepping doesn't increase resolution. Lets say you have 8 microsteps in action. Say at the present time the armature is at
a full step position when a pulse comes along for the armature to rotate by one microstep. What in actual fact happens is that the current in
phase A will reduce to something like 7/8 of normal while phase B will increase to 1/8 of normal. Say your stepper is rated at 50 oz in, then
the torque trying to overcome the load in rotating from the fullstep to the first microstep will be approximately 1/8 of rated, ie 6 oz in. That's
likely not enuf to overcome the load and the armature won't move. Now a second pulse comes along, phase A 6/8 rated, phase B 2/8 rated
for about 12 oz in torque and the armature may well have enuf torque to overcome the load and rotate. If it does it will rotate the equivalent
of two microsteps. Thus whether the armature rotates 1 or more microsteps is highly dependent on the load, nothing like what you could call

If memory serves there is quite a good discussion of this on the Geko website.

The reason that microstepping is used so widely is that it is so much smoother than full stepping NOT to increase resolution. Most drives will
enable half stepping and usually both phases are energised with rated current and the torque between a fullstep location and the next halfstep
location is 141% of rated torque. It is usually fair enuf to count on doubling the resolution of a stepper when you implement half stepping,
just that's it incorrect to think that resolution increases by a factor of 8 when using 8 microsteps. For this reason I suggest if you are using a two
phase stepper use it with microstepping for smoothness it will in fact achieve half step resolution ie 0.9 degree. With your harmonic drive
that's about 27 arc sec which is not to shabby.

If you were to use 5 phase steppers with a half step capable driver you would achieve 10.8 arc sec. You can see that 5 phase steppers enjoy a natural
resolution advantage over two phase steppers.

Next myth is your voltage=torque misunderstanding. A stepper has a rated current, the one in the link is 0.75A and it will produce its rated torque
when that current it applied to the windings. The resistance of the windings is likely to be 1 ohm or there abouts. You would need a battery of only
0.75V to drive the current thru the windings, easy. In addition to the resistance of the winding it has inductance and so it will take time for the current
to build up to that level. If you want to make lots of steps quickly using a higher voltage drives the current thru faster. This is what you do for a mill
or router that you want to move around quickly. But you don't need fast...if your tracking an object the scope has to slew 15 degrees per hour,
or 900 halfsteps with your two phase stepper/harmonic drive combo per minute. That's REAL REAL slow for a stepper, you could do that with a 6V battery.

The next myth is the size of the motor. Your 3Nm steppers thru a 120:1 reduction works out to 360Nm! That's V8 torque. You don't need a V8
to drive your scope!!! Losses in the drive will reduce that but more importantly you'll explode the drive before you even get close. You shouldn't
require much more than 1-2Nm for a well balanced scope so with the deep reduction a stepper of 0.01Nm would be adequate, ie it can afford to
be tiny! The deep reduction means that even a very small stepper will work fine. What will improve with a larger motor is the ability to slew your scope
rapidly to a new object.

Steppers are not efficient. They require current even when they're not turning. Usually you can reduce the amount of current when not turning to
just enuf to hold the armature in place. If your talking about 3A as holding current you will flatten batteries quicktime. With the 17 size stepper in the
link I posted I would be trying to get the holding current down to 50mA or so. If the winds that strong that the load on my scope and therefore
the holding current of the steppers goes way up its time for me to go home anyway!

My wife left with my best friend...
     and I miss him!
Re: Computer guided telescope mount using Mach3
« Reply #5 on: June 17, 2017, 09:29:41 AM »
Yes, Craig, you are right in all you said:

- However, the 1.8º resolution divided by 1/120 reduction, will give a theoretical resolution of about 1'.
Even if I use my most powerful eyepiece, a 2.3mm Celestron, at a ridiculous magnification of 742x, or 57x per inch, the field a the telescope would cover (with an apparent field of view of 60º) would be about 0.1º or 6'
I do not intend to use such large magnifications, but even so the resolution of the stepper would be useful. That is with no microstepping.
But if I use microstepping the motion will be much smoother, as you say, and that is desirable when tracking objects through the sky.
I do not intend to do astrophotography, and I do not really care if the stars move a bit jerkily on the eyepiece, but it is nicer if they do not.

BTW, that is the eyepiece I use to test my mirror. It is too powerful for everyday (every night) observation. I think the maximum magnification I will use will be 185x, provided by a 8 mm eyepiece.

Oh, and I heard what you say about 5 phase steppers and their increased resolution. I had no idea about that. I will pursue that line, although a quick google search has informed me that the prices are far higher than those of 2 phase steppers.

Anyway, let me see if I understand it properly: If I use 1/8 microstepping, it will be smother than full step, but the resolution will be 1/2 step?
That would be wonderful, because I always use full steps for my calculations, and that would double my resolution.

- It is also true that I have mistaken voltage and torque. I have read many times about that misconception but it does not seem to sink in. Sorry.
Naturally I have been running some test with those steppers and drivers (Nema17 42BYGHW811 and HY-DIV268N-5A), and I have tested them at a variety of currents (0.2 to 2.5 amps) both at 12 and 24 volts. They work better at higher voltages and currents.
Truth be said, I demanded high speeds from the steppers, and that must be the reason why higher voltages yielded betters results.
That was another project, on Arduino.

It seems that more tests are required.

Anyway, despite the fact that tracking celestial objects will require very low speeds, changing the aim of the scope will be more convenient if the steppers are capable of achieving high speeds. 6 volts seems too low for that. Maybe I can make a large 18-19 volt battery that can power both the steppers and the laptop I will use.

O perhaps I can use a two small car batteries in line or a 24 V truck battery to power the steppers and, of this 24VDC to 18DVC to power the laptop https://www.powerstream.com/dcdc-24V.htm
I will see in due time. Advice is welcome, though.

- The geared motor on the link would be very nice, but I have read that it is not that easy to wire it, and they do not ship to Europe, where I live. I will keep an eye for more harmonic drives out there.
Patience pays off.

- I do not know how to reduce the current of a motor from Mach3 or the computer (to reduce power consumption when stopped), only from the switches on the drivers.

Thank you, anyway, for the deep hindsight you have given me.

Re: Computer guided telescope mount using Mach3
« Reply #6 on: June 17, 2017, 10:43:57 AM »

I am already trying to customize the Mach3 interface and profile configuration to use it with the telescope mount, and I have some concrete questions.

- Is there any way to tell the machine "move in this direction at this speed"? or "Describe a circle of this radius, centered in this point, at this speed"?
Maybe that is the Circular Interpolation that all of us have heard about so much while researching G-Code?

- Is there any way to jog while following a path? I would need to adjust position while the machine is moving. It makes no sense in the CNC world, but sometimes it is necessary to center an object on the eyepiece while the scope is following it through the sky.

- How can I run Mach3 without a BOB connected to the computer? I need to simulate stuff...

Thank you

Re: Computer guided telescope mount using Mach3
« Reply #7 on: June 17, 2017, 04:49:59 PM »

I don’t know much about Mach, CNC etc, but I think that planetarium programs usually are able to connect with few types of mounts. So they usually send to a serial port, some commands in a specific format. The mounts have an internal controller, which translates those commands in signals for motor drivers.

For example Celestron uses the “Nexstar protocol”:

Probably the mostly used protocol is meade LX200 protocol:

Also Skywatcher published their Synscan protocol:

Interfacing a planetarium software with mach probably is not that simple. Mach should perform what the synscan, meade or celestron controller makes. You should implement procedures of aligning, calibrating, translating the coordinates into steps etc.
Maybe it is simpler to buy a controller and use similar steppers or servos. You can also check the EQMOD yahoo forum.

Regarding steppers : Vexta is an old line of steppers made by Oriental Motors. It is no longer produced. I have 2 vexta motors without any gears and I am not very impressed about their performances. I also have a 5 phase stepper from Oriental Motors - PKP series. They have 0.36deg/step and is awesome. At half stepping works very smooth.

Re: Computer guided telescope mount using Mach3
« Reply #8 on: June 17, 2017, 05:56:54 PM »
Hi Diego,
yes 5 phase steppers are usually much more expensive than two phase. Firstly there are only half a dozen manufacturers around the world
and they focus on the industrial market not cheap hobby stuff. You get what you pay for. 5 phase drivers are likewise rare beasts and you'll
have to pay if you want one.

The reason I have become familiar with them is that when I was designing my mill I wanted good resolution and given my previous argument,
microstepping was just not going to cut it. Two phase steppers are naturally 200 steps per revolution. Five phase steppers are naturally 500 steps
per revolution. With 10:1 planetary reduction that works out to 5000 steps per rev and with my 5mm lead ballscrews 1um per step.
Note that I don't have to use microstepping or even halfstepping to achieve that. As it turns out 5 phase steppers have smoother motion
characteristics than 2 phase steppers and microstepping for smoothness sakes is not required. All steppers lose torque at speed but 5 phase
steppers hang on a bit better than 2 phase. I have run my steppers at 3000 rpm but find they run cooler and with good authority at 2400 rpm.
A lot of Vexta motors have a gearbox built in. The gearboxes range upwards in price from simple spur gear units with 30 arc min lash to
planetaries of 3arc min lash to harmonic drives of zero lash.

I googled the part number of the harmonic drive you have, nice unit. It is a hollow shaft design which is ideal for robotic arms and are the main
use of such units. Harmonic drives can also be had in a more regular style gearbox with input and output shafts. Vexta have gone one step further
and mated their motor to the gearbox, very handy. Personally I think you'll find such a motor/output shaft combo much easier to incorporate into
you mount.

As to how you control the pulse stream being issued by Mach is going to require you be familiar with Gcode programming. Do some research online
about Gcode. As an example to make a machine drive with co-ordinated axes in a straight line at a given rate:

G1 X20 Y50 F100      will drive from the current point to X=20mm, Y=50mm at a rate of 100mm per minute.

Note that Mach considers X and Y axes as linear and produces pulses. It doesn't know or care if you feed those pulses to a rotational axis or not.
Mach has A,B,C axes as well which it considers as rotational axes and you might find it easier to program using them.

There are other codes for circular interpolation but they are not really going to help you. Circular interpolation is fine if you want to engrave a circle
but it won't track a stellar object. You'll need to calculate the axis movements and then use the likes of G1 codes to shift your scope.

Is there any way to jog while following a path? I would need to adjust position while the machine is moving

Once a Gcode program in operation then you can no longer jog. You can get around this by interrupting your running program every few milliseconds
to see if the operator is fiddling with the jog wheels, execute any jog moves and then return to your running program. I have migrated to Mach4 and
can see how to do this easily but feel pretty sure Mach3 could be pressed into doing the same thing.

How can I run Mach3 without a BOB connected to the computer? I need to simulate stuff...

Mach will run without a motion controller of BoB connected. Are you using the parallel port or an external controller?

My wife left with my best friend...
     and I miss him!
Re: Computer guided telescope mount using Mach3
« Reply #9 on: June 19, 2017, 08:03:22 AM »

• After deep thought and careful consideration, I have reached the conclusion that Mach3 and my Purelogic boards are not the right approach to make a motorized telescope mount.

Mach3 is a great program, I love it, and it was developed aroung G-Code and numeric control.
That is the root and base of Mach3.

I require another approach.

• For those who are in the same situation I am currently, that I want to make a computerized system for a home made telescope mount, there are some solutions.
I hope it is OK to share them here.

- Celano Telescope controller: http://www.deepskyparts.com/telescope-controller
It is a standalone, fully configurable, controller that does not need a computer and has a large database objects. It has go-to and tracking. You can move the telescope with it.
You configure it with a PC (step count, accelerations...) but you use it "on the field" without a computer.

- rDUINOscope Controller: https://hackaday.io/project/21397-rduinoscope-control-v13
This controller is based on Arduino Duo, and you have to make it (apparently you have to solder all the parts on the shield).
It can work standalone or connected to a PC or Android device via Bluetooth, and use Stellarium.
It has a joystick and a touchscreen. It supports altazimuth and equatorial mounts.
It has a small object database (250 nice deep sky objects and 200 bright stars).
It is under development.

I am sorry I have made so much noise in the forum.

Your help was great.

Thank you