Go Back   IceInSpace > Equipment > ATM and DIY Projects
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread
  #1  
Old 12-11-2015, 08:42 PM
codemonkey's Avatar
codemonkey (Lee)
Lee "Wormsy" Borsboom

codemonkey is offline
 
Join Date: Jul 2013
Location: Kilcoy, QLD
Posts: 2,058
DIY Motorised Focuser

Recently I began work on a DIY motorised focuser, after being inspired by AlexN. This is being built to fit my Moonlite focuser attached to my Esprit 120. I went the DIY route since I could build one for < $100, while I was looking for around $600 for off the shelf ones.

I've never been the DIY type, know nothing about electronics and I'd never soldered a thing in my life before this, but I am a software developer by trade, which definitely helped a lot.

Thankfully most of the hard work had already been done by the SGL Observatory Automation group.

Register with the group, go to the files section and download the following to get started:

Files\SGL Software\SGL_Focuser_Getting Started.pdf
Files\SGL Software\Focuser\Current Version\SGL_Focuser_Driver_colcd_2_ 0_0L.ino (the arduino sketch)
Files\SGL Software\Focuser\Current Version\SGL_Focuser Setup_v3.0.0.exe (ASCOM user interface)
Files\SGL Software\Focuser\Current Version\SGL_Focus_Standalone.zip (standalone user interface)

This is just the starting point and you will need to do a fair bit of tinkering to get this working.

I used the arduino nano, an easydriver stepper motor controller and a nema 17 stepper motor. The motor's probably overkill, but at least I know it's going to hold my payload and then some.

Something to note here is that the document provided by the SGL group doesn't mention how to change the microstepping of the easy driver board. To do this you need to connect MS1 and MS2 on the easy driver board to your arduino, and then send the appropriate signals to those pins.

I decided to do a direct driver version straight on the 1/8 fine focus shaft on my Moonlite, and the easy driver defaults to 1/8 microstepping. The stepper motor also has 200 steps per revolution so this meant 8*8*200 steps per revolution = 12,800! It needed 8 full turns of the coarse focus on my Moonlite to rack it out, giving me total of 102,400 steps.... the problem here was that the top limit was 16 bits, which means you can only have 2^16-1 steps, or 65,535.

So for me, I ended up dropping it down to 1/4 microstepping, giving me a total of 51,200 steps to rack the focuser fully in or out.

In order to adjust the resolution of your stepper using the easy driver board, note the following:

Setting both MS1 and MS2 to HIGH essentially disable microstepping, meaning if your stepper has 200 steps per revolution, that's what you get.
Setting MS1 to HIGH and MS2 to LOW gives you 1/2 microstepping (so you're now at 400 steps per rev, assuming a 200/rev stepper)
Setting MS1 to LOW and MS2 to HIGH gives you 1/4 microstepping.
And finally MS1 to HIGH and MS2 to HIGH gives you 1/8 microstepping (the default).

Now there's a bunch of bugs in the SGL software that you'll probably need to fix to get this working. The source code doesn't have a license in it so all standard copyright restrictions must apply and thus I can't post my changes here. I can tell you though that there's the following bugs (maybe more):

#1 - Settings overriden
The software has a bunch of definitions up the top of the file, but these get overwritten by whatever's in EEPROM during initialisation. An easy way to fix this is to leave the code as-is, connect everything up, set all of the appropriate settings by sending commands over the serial port manually, and then finish it up by sending the PRK command. The PRK command stores it in EEPROM, and then your settings will get reloaded from that in future.

This problem manifests quickly, since it clobbers the board type, and then the code has the wrong one stored, so when it gets to the part in the code where it decided which driver board it should use to communicate to the motor, it doesn't know, and then it fails silently... basically your motor just won't turn. This one took me a while to figure out.

#2 - Another nasty one is the part of the code that reads the serial commands. Any time I tried to set the step size to something over 4 digits (required for absolute positioning, which is in turn required for use with SGP), everything would stop working and I'd have to disconnect everything, power cycle it all and start again. The cause of this one is the part that reads in serial commands doesn't check to see if the serial port is ready to read from yet and it just keeps reading,looking for a : to separate the command from the parameter, and a ; to indicate the end of the parameter. Fairly simple fix is to just write some code that loops until there's data on available before trying to read it.

If anyone happens to be trying to do this on a Moonlite focuser, at least the 2.5" refractor ones currently on the market, apparently the two holes in the flange that are intended to connect Moonlite's own motor mount take 8-32 imperial bolts. The Moonlite's 1/8 shaft is 3.19mm and the nema 17 I have has a 5mm shaft.

So as of this moment I have the software working and the focuser will rack in and out. Unfortunately I don't have a helix coupler of the right size to connect the motor to the focuser, and the ones that I do have cause significant wobbling of the entire unit due to misalignment, which I think is the cause of different amounts of movement when racking in vs racking out. Only place I could find selling these in the appropriate size was ebay, and it's going to take 2-4 weeks to get it shipped from Hong Kong.

I had a lot of fun with this project and if you're the tinkering type, I'd encourage you to give it a go. It'll help a lot if you've had some programming experience as well.
Attached Thumbnails
Click for full-size image (IMG_0313.JPG)
102.0 KB125 views
Reply With Quote
  #2  
Old 16-11-2015, 02:39 AM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 646
Good to see someone else playing with this. I built a similar system last year also loosely based on the SGL Observatory's example. But once I realised how easy it is to actually write for and comply with ASCOM I threw it all away and started from scratch.

One thing of note I am not at all a fan of microstepping. 1/2wave stepping is still fine, but beyond that you lose torque exponentially. The alternative is gearing / belt driving the focuser with the result of increasing the torque providing you with even more holding power if you need to.

Ultimately though I had a moonlite which has a pretty good tension system anyway so I have no need to try and hold a stepper electrically. Good thing too since I'm driving them at higher than rated voltage to allow for quick movement without having to write ramp functions. Not sure if I set it to hold if the motor wouldn't burn out.

I'm not sure I understand the problem you had with the serial port. Can you elaborate? Why would the routine which polls the serial port have a problem with 4 digit numbers? Or did it have a maximum defined input buffer?
Reply With Quote
  #3  
Old 19-11-2015, 06:08 PM
codemonkey's Avatar
codemonkey (Lee)
Lee "Wormsy" Borsboom

codemonkey is offline
 
Join Date: Jul 2013
Location: Kilcoy, QLD
Posts: 2,058
Honestly, probably would have been better to just write my own code for that, but eh, I was being lazy and just wanted to get things going fast.

Microstepping is fine as long as you have enough torque in the end. Keep in mind I'm using a nema 17 which is apparently what's used in the EQ6, so it's way overkill for my purposes.

I'd have to revisit the serial input code (not on this computer). It did have fixed size buffers, but it wasn't overflowing them as it was limiting the number of characters read in... at first I assumed it was probably an "off-by-one" error common in loops, but that turned out not to be the case.

I found that without waiting for more characters to become available before reading, it would fill the buffer to the max size with rubbish data, and then somewhere down the line things stopped working.

I decided to fix the rubbish data issue and once that was fixed the problem went away, so I didn't bother going down to find out what exactly caused it to manifest in the way that it did.
Reply With Quote
  #4  
Old 01-01-2016, 01:09 PM
brown_rb (Robert)
Registered User

brown_rb is offline
 
Join Date: Aug 2010
Location: Wellington, NZ
Posts: 11
A few alternative focuser DIY projects can also be found on Souceforge.
Reply With Quote
  #5  
Old 01-01-2016, 04:21 PM
codemonkey's Avatar
codemonkey (Lee)
Lee "Wormsy" Borsboom

codemonkey is offline
 
Join Date: Jul 2013
Location: Kilcoy, QLD
Posts: 2,058
Cheers mate.
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time is now 02:10 AM.

Powered by vBulletin Version 3.8.7 | Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Advertisement
Bintel
Advertisement
Astrophotography Prize
Advertisement