PDA

View Full Version here: : DIY Stepper motor focuser control


pmrid
01-12-2018, 01:22 PM
I know this is an oldie but a goodie.
I have a perfectly good JMI 2" Crayford (non-motorised) focuser and want to PC control it via stepper control. JMI have sold the farm to Farpoint Astro and have ceased manufacturing these products (as at the end of 2018). I had a look at Farpoint's site and the stand-alone motors for the JMI focusers are out of stock so the choices are between expensive and very expensive. Hence a recent order on EBay for one of these:

https://www.ebay.com.au/itm/181925257317

a DC 5v 4-phase 5-wire Stepper Motor+Driver Board+Remote Control Wireless RC.

Anyone have any experience with these? I know there's an old thread here:

http://www.iceinspace.com.au/forum/showthread.php?t=92549&highlight=focuser

Bojan pointed towards a commercial version of the controller on the BangGood site but in, too, is out of stock. So EBay it was. Look pretty similar.

The questions I'd like to ask include:
1. Has anyone actually built the gear/belt drive mechanism to attach to a Crayfor-type focuser?

2. Has anyone figured out how to PC-control one of these? It would be nice to be able to put it all together somehow.

Peter

brown_rb
03-12-2018, 08:59 AM
https://sourceforge.net/projects/arduinofocuscontrollerpro/files/Mounting%20Bracket%20Examples/
might give you some ideas for mounting

bojan
03-12-2018, 09:34 AM
I did this with the same motor, but no wireless.
http://www.iceinspace.com.au/forum/showthread.php?t=88216&highlight=crayford

garymck
03-12-2018, 10:19 AM
What about this one...I have built 2 of them
https://www.cloudynights.com/topic/594658-pnp-focus-the-simplest-ever-arduino-focus-controller/
Cheers

Gary

pmrid
04-12-2018, 05:44 AM
Thanks guys.

Helpful indeed. I've ordered the various Arduino boards mentioned in the Cloudynights thread - ordered them from Keyestudio direct with free shipping. The whole lot cost less than the single Leonardo board from Australian distributors. Amusing!!

I'll have a play with this lot and see where it takes me.

Thanks again.

Peter

DavidTrap
04-12-2018, 08:30 AM
Highly recommend the Arduino one on sourceforge.

That author has several Arduino based astronomy products.

https://sourceforge.net/u/brownrb/profile/

If you search a bit, I think there are some more gadgets he’s built that aren’t on that list. His documentation is incredible for an open source device.

I’ve just built version 2 of his focuser after I broke my Microtouch controller (long story). A replacement microtouch was going to cost me $700 landed in Australia. The Arduino based one was less than a tenth of that. I managed to get it working with the microtouch motor after some trial and error on the wiring.

Used the new controller on the weekend - perfect.

DT

pmrid
04-12-2018, 04:28 PM
G'day David.
Long time between shouts!
I'm sneaking up on this project very slowly and carefully. I thought I was being adventurous when I bought a Raspberry Pi. But Arduino is something else again. I've ordered the core elements most people seem to recommend - an Arduino Leonardo, a L298P, LCD1602 and a Temp Sensor DS18B20. For the massive investment of US$32.95. Buying locally would have been more than double. But while I wait for those bits to arrive, I am also expecting the imminent arrival of a couple of motors and control boards.

What eludes me for the moment is the mechanical issue of how to get the motor to drive my focuser - I ought to have bought a geared motor I suppose but that's definitely being wise after the event. Do you use belts or gears to drive your focuser? And how did you determine the appropriate gearing ratios?

Peter

ChrisV
04-12-2018, 09:49 PM
+1 for myFocuserPro as suggested by David. It has a PC app, ascom driver and options to add temp sensor etc.

The site has all the instructions needed to sort out microstepping and gears. Make sure you read it. Mine is attached directly to the focuser using a flexible coupler. And 1/32 microstepping gave me 15 steps in the critical focus zone - more than enough.

It's really simple to make. I had an old freetronics Uno and soldered the few components needed onto the Uno. Used a NEMA14 200step/rev motor - I got one with 23N.cm holding torque which was enough to direct drive the focuser.

pmrid
05-12-2018, 04:22 AM
Thanks for the added vote for Mr. Brown's project.

I've now ordered a Nema 17 Stepper Motor 17HS13-0404S-PG27 with a 27:1 planetary gearbox. So with the f8 x 200 mm scope this is meant for, that should give me 40-odd steps within the CFZ.

Now we sit back and wait a bit while all these bits and pieces wing their way here from all over the globe.

Obviously I have a bit of reading to do in the meantime.:rofl:

Peter

AstroApprentice
06-12-2018, 03:07 PM
I recommend finding a stepper that can be manually turned when not powered if you want to do some unplugged visual as well as AP.
I have a Starizona MicroTouch on a FTF that works beautifully for AP, but has to be fully removed if you want to turn the focus knob manually for unplugged visual use - plus it requires the fine focus knob to be removed.
I also have a Moonlite motor that overcomes this issue with the use of a slip clutch to easily disengage motor - and at least I can keep the fine focus knob on other side.
My favourite design, however, at least from a versatility view point is my Avalon FOCS stepper that can be rotated manually when not powered ie simply unplug or switch off power. Plus it uses a belt to drive focuser knob so I don't lose use of the fine focus knob if I want to do some visual.
So if you can find a motor like theirs for your system, then it will be good for both AP & visual:
http://www.avalon-instruments.com/products/the-focuser-focs

pmrid
07-12-2018, 01:49 AM
Hi Jason. I see your point about doing visual as well as AP. Those Avalon rigs look well designed and executed. No dealers in Oz though and the US$price at OPT (US$279) puts it well above A$400 landed here. These little Arduino modules are somewhat cheaper although not as "pretty".

Peter

AstroApprentice
07-12-2018, 06:54 AM
Hi Peter,
I agree arduino is a great option. I particularly like this mini one:
https://www.cloudynights.com/topic/466453-super-compact-electronic-focuser/
I just recommend finding a motor like the Avalon that can be rotated manually when not powered - I’m not sure why everyone doesn’t use them, perhaps there’s a performance trade-off? Maybe I should compare performances between Avalon & Starizona on a FTF one day...

bojan
07-12-2018, 07:03 AM
In absence of expesive solutions to manual issue, you can have a look at this thread (http://www.iceinspace.com.au/forum/showthread.php?t=51301&highlight=focuser).
Also, this (manual control of the focuser from comp (http://www.iceinspace.com.au/forum/showthread.php?t=66862&highlight=focuser)) maye be useful.

AstroApprentice
07-12-2018, 08:16 AM
Hi Bojan,
Do you know why esteemed companies such as Moonlite and Starizona use stepper motors that can't be turned manually? ie is the Avalon motor that can be turned when not powered a new or inferior design?

brown_rb
09-12-2018, 07:45 PM
If you disengage stepper and move manually then the focuser loses where it is, the focuser position is invalidated for the stepper. When you reconnect motor it still thinks ts in the same position - but its not (you moved it) and that is a sure fire recipe to ultimately do some serious damage to your focuser by exceeding travel limits.

bojan
09-12-2018, 08:00 PM
It's probably a consequence of high transmission ratio.
The little motor I used also cant be turned (easily) when powered off, and definitely not when powered on.


I think neither of those designs are inferior per se... but if you can turn it somehow, it is much more practical.

pmrid
14-12-2018, 02:12 AM
Gary, may I tap into your experience with these - I'd already ordered the boards I need when I also discovered Robert Brown's focuser project. So since I'm already half-way down the track to the cloudynights project, I figured I might as well finish it. I'd like to clarify a couple of issues about powering the project though. I will be using a Nema17 27:1 geared motor which required 12VDC. But I'm a bit confused by the images on the cloudynights discussion. I wonder if you happen to have any images of your kits? The 12VDC input and the connections to the PC would help too.

Peter

garymck
14-12-2018, 06:50 AM
Hi Peter,
happy to help. I'm using the same motor as you, one thing that I found was that the motor became very hot when running at 12 volts (despite it's spec) so I dropped the power to 6 volts. The motor still has heaps of torque, but barely gets warm. Works a treat.

There is also a line in the firmware that may ned changing depending upon the display you purchased.

PM me your mobile number and which parts you need images of and I will
sms pics to you

cheers
Gary

pmrid
14-12-2018, 08:44 AM
Thanks Gary. I sent a PM as you suggested but thought I might put this comment on the tread for others to reply - I thought that with these high-torgue motors such as the 27:1 NEMA17 you don't have to keep current to them all the time. The rotor inertia on these is 35gcm2 which ought to hold an elephant even when not powered.

Peter

garymck
14-12-2018, 09:43 AM
Peter,
the firmware does not turn off the power to the motors when they are staitonary - hence the motor getting hot. My guess is that some motors will move when unpowered so need to be kept energised to hold position - this would be the case with a motor with no gearbox for example.

Gary

DavidTrap
14-12-2018, 10:27 AM
Hi Peter,

Apologies for a slow reply,

Definitely high finance on these things :P

I am using the motor that came with the micro touch controller. After much trial and error I worked out the wiring connections. This setup uses a gear mechanism to connect to the focusing shaft. The shaft it connects to is the small knob of a 10:1 reduction system anyway, so there is a lot of reduction built into the system.

From what I read in his documentation, the NEMA17 motor is direct drive. You'll need some sort of reduction using belts and pulleys (probably be easier for adjustment than gears) to give enough accuracy. There is another stepper motor that has a reduction gearbox built in - you might be able to connect that directly to a focusing shaft. The Robofocus motors have a reduction gearbox and connect directly to the focuser shaft.

He has lots of calculations about critical focus zones in his documentation. I skipped over that as I was using an exisiting motor and gear mechanism - I just needed the controller to drive the actual motor.

I do plan to make up another controller and motor system for another telescope and a camera lens, so I might be able to offer some more advice after that - although that will be in the new year. I'm planning on 3d printing some brackets to hold the motor, belts and pulleys.

Hope you don't get too drenched in the upcoming weather event.

DT

DavidTrap
14-12-2018, 10:30 AM
Looks like Chris has got you on the right path. I'm assuming his direct motor connection is to the 10:1 reduction shaft of that focuser.

The documentation is fantastic for an open source project!

DT

pmrid
14-12-2018, 01:17 PM
One of the many interesting bits of knowledge Gary has been kind enough to pass on to me is that the 12VDC connection to the Arduino Leonardo board causes the NEMA17 motor to run quite hot and to get around this he has scaled the input voltage back to 6VDC at which point that problem goes away.

I've found a waterproof buck converter modules that will provide me with 2-3 Amps of 6 volts - and another at 9 volts and I can take power from my 12 volts supply source at the scope. That's real handy. I'll start at 9vdc and see how that works and then retreat to 6 if heat is still an issue.

We live and learn.

Peter

DavidTrap
14-12-2018, 02:41 PM
There is an option to turn off the coil power in the ASCOM driver

ChrisV
14-12-2018, 06:21 PM
No it couples to the main focuser. 16 microsteps within 200 steps per revolution gives plenty of microsteps in the critical focus zone on my scopes. The documentation with myFocuserPro has excellent detail and explanations of it all.

Also I used a TMC2130 stepper driver which is very smooth and quiet. Much better than drv8825s etc - but they all work. And as David mentioned the ascom driver let's you turn off power to the stepper so you can manually focus - not sure why you'd want to do that though as the controller loses its place.

Edit:
The calcs are as follows
CriticalFocusZone = 2.2 x FR^2. For my scope FR=5, so CFZ = 55um

If I direct drive the focuser (no gears) on my scope
- 1 turn of focuser moves it 15mm
With a 200 step/rev stepper using 16 microtstepping
- that gives 3200 microsteps per revolution which moves the focuser 15mm
- or 12 microstep within the CFZ of 55um. This is more than enough

So with your stepper with 27:1 gearing you don't even need to use microstepping. I prefer to use microstepping because then I don't get the backlash problems with the 27:1 gearbox.

pmrid
15-12-2018, 07:04 AM
1/4 microstepping is my next target. For the best number of steps in the CFZ I am targeting, I need to get my Nema17s to run 800 s/rev. But how is it actually achieved? Is it in the choice of controller or the Arduino sketch programming?

Peter

bojan
15-12-2018, 08:11 AM
You will need driver capable of microstepping.But, it is also possible to do microstepping with software only, by driving coils in PWM mode.
Not sure if anybody did this, considering the Pololu drivers (and their's derivatives) are so cheap and so available.

RobC
16-12-2018, 10:05 AM
Peter,

Here is my 2 cents worth.

I have built three of these devices to date and have written the Arduino and ACOM compliant code to drive them. Two of the motors were based on the Nema 17 27:1 Stepper and the third on the Nema 11 27:1 Stepper. I have built two controller units. One based on the LN298 driver and the other on the micro stepping DRV8825.

I am not a fan of micro stepping because of the torque and heating problems. Turning the power off may cause the motor to slip to its natural position and the focuser could move from the CFZ. Although I used the DRV 8825 controller I do not micro step it. I full and half step the LN298 and DRV 8825. At full step mode the 27:1 steppers have roughly 5400 steps and 10800 steps in half step mode.

I plagiarized and modified the Arduino source code from the Texas thread. The ASCOM compliant focus driver code I wrote from scratch.

I use my focuser controller with both SGP and APT.

I have attached a photo of the Nema 17 connected to the course focus side of a 2.5" moonlite on the back of my North Group carbon fibre ED 127.

If I can be of any assistance to you please contact me.

Cheers

Rob

pmrid
31-12-2018, 02:18 AM
Small steps but hopefully in the right direction.
I'm looking forward to catching some time with RobC in the New Year but in the meantime, I've pressed ahead with the PnP Focuser project (GitHub) and have managed to get a response out of it.
Thanks go to Gary for his advice here.
The problem had been that I could not install the "Upload" file to the Arduino Leonardo. I pressed the reset button on the Leonardo and got a fuller response but noted in the fine print that it had been unable to locate what proved to be a key file - avrdude.conf. It seems that there was an executable in part of the Arduio IDE setup called - you guessed it - avrdude.exe. I ran that and it created the required conf file for me. I then transported that to the right directory, did another reset on the Leonardo and ran Upload again - and BINGO! It worked.
I've now managed to get the Leonardo, 298P driver shield and LCD talking nicely and the temp sensor wired in and working as well. I haven't connected any motors yet.
That's my next heart-stopping step!

Peter

EDIT: Well I couldn't wait so I wired in the motor (a plain NEMA17 27:1 planetary gear job) sometime around 3 a.m. and Lo and Behold!! The bleedin' thing worked. Thanks Santa!