Jump to content

Stargazers Lounge Uses Cookies

Like most websites, SGL uses cookies in order to deliver a secure, personalised service, to provide social media functions and to analyse our traffic. Continued use of SGL indicates your acceptance of our cookie policy.

sgl_imaging_challenge_banner_30_second_exp_2.thumb.jpg.7719b6f2fbecda044d407d8aba503777.jpg

wimvb

Arduino INDI-compatible DC Focuser

Recommended Posts

Imaging season is still a few weeks away up here, but I've started dusting of my gear and upgrading some parts.

One step closer to automation is a motor focuser, and I opted for a budget solution. I bought a SkyWatcher DC focuser and built a computer control for it. Since I use INDI for my automation, I had to find a way to connect the focuser to indiserver. A first thought was to use the INDIduino code, but after some coding and testing I found out that this code is very limited and not really supported by indi clients. The Ekos/Kstars focus module can't be used for focus control if you use INDIduino, apparently.

But then I stumbled upon an Arduino solution that emulates the MoonLite focuser (http://www.indilib.org/forum/general/283-moonlite-focuser-protocol.html). Unfortunately, this protocol is for a focuser with a stepper motor, whereas the SkyWatcher has a geared DC motor.

I had already rewritten some code from stepper to (geared) DC motor, so it was easy to adapt this to the MoonLite based code.

My solution consists of the following:

hardware:

- SkyWatcher DC focuser (only the motor is used, the handbox is replaced by the Arduino)

- Arduino UNO

- Velleman motor controller shield for Arduino

- 9 V power adapter to power the shield

- Raspberry Pi

 

software:

- Arduino sketch with Geared Motor library (see below for link)

- INDI server on RPi, and client (Ekos/Kstars) on Windows

 

I've tested this setup on my SkyWatcher Explorer 150PDS and it runs fine. Unfortunately I haven't been able to test the autofocus, due to absence of astrodarkness and clear skies.

Since a DC focuser has no knowledge about the position of the actual focuser, the software assumes that position '0' is all the way in. Maximum position is 25000 for my setup. By default, focus is increased by 100 steps, which is supposed to be 100 ms of motor drive.

focuser.jpg.1457c3a1c67a49a2256cf027b1c70a3c.jpg

BTW, the code is in my GitHub repository:

https://github.com/wberlo/Arduino_Moonlite_Focuser

Edited by wimvb
added link to original

Share this post


Link to post
Share on other sites

Is the raspberry ok.not capable of providing the necessary control to the motor without having to include the arduino?

sorry, I'm about 10yrs behind on this tech ?

Share this post


Link to post
Share on other sites

It may very well be that the raspberry pi can control a motor directly, but I had a motor controller for the Arduino, and I'm not that familiar with Python and GPIO programming. For me this was the easier solution.

Besides, I have INDI running on the Raspberry Pi, and I want to keep this as clean as possible. The Arduino basically emulates the MoonLite focus controller box.

Share this post


Link to post
Share on other sites

? python I have no clue about

i was assembly and/or C - Ancient stuff

As a Mac user, I've been considering INDI; need more investigation as there's a dearth of drivers.

Share this post


Link to post
Share on other sites

Neither do I.

INDI is great. With just a Raspberry Pi, an eqdir cable and a camera (I've used my asi 120 guidecam for testing), I can have complete remote control of my setup, excluding polar alignment. That's quite a step up from a dslr with an intervalometer.

  • Like 1

Share this post


Link to post
Share on other sites

I'm running Celestron mounts, so, EQDIR isn't an option ??, but I've been working on that aspect and there are still issues around limiting RA/DEC to prevent cable wrap and tracking below horizon.

my guide cam (qhy6) isn't supported

i need to look into it specifically, but, I think the ZWO1600 is supported.

Over 40 years with 'IT' , but I am getting slower in uptake. Lack of time doesnt help either

 

Share this post


Link to post
Share on other sites

I use the ubiquitous 28BYJ-48 geared stepper motors for focussing, with timing belt or geared drive and A4988 stepper driver modules running directly from the RPi 3.  I posted a thread about it - I'll see if I can find it...

Edited by Gina

Share this post


Link to post
Share on other sites
7 hours ago, iapa said:

I'm running Celestron mounts, so, EQDIR isn't an option ??, but I've been working on that aspect and there are still issues around limiting RA/DEC to prevent cable wrap and tracking below horizon.

my guide cam (qhy6) isn't supported

i need to look into it specifically, but, I think the ZWO1600 is supported.

Over 40 years with 'IT' , but I am getting slower in uptake. Lack of time doesnt help either

 

Indi should support celestron nexstar.

http://indilib.org/devices/telescopes/celestron.html

It seems that qhy support is limited. There are several threads in the indilib forum indicating trouble with qhy cameras. This is the main reason for me not to buy qhy. Zwo has much better support. All their cameras seem to work with indi, and any issues are generally addressed very quickly.

I have programmed a fair bit, both in my work and privately. But always just to solve problems, never as a professional programmer. So, I always have to keep a reference manual handy when I start a new project, to get the syntax right.

@Gina, I have been following your thread(s) with great interest. I opted for the SW DC focuser mainly because of the hardware and because it required less diy mechanics to get working. (Don't have a 3d printer. :grin:) Steppers are better for focusing, and I have a couple lying around. But I knew the SW would attach to my scope without any issues. I find arduino easier to control  hardware, and don't want to mix my efforts of hardware control with vital functionality such as guiding, on the same RPi. I plan to use two RPi's for my setup; one for mount control and guiding, and one for imaging and focusing. RPi's are cheap, and this will give me some redundancy.

  • Like 1

Share this post


Link to post
Share on other sites

Good morning wimvb,

Is it possible that you communicate me a photo of your Arduino card with the different components linked ?

Thank you in advance.

Hedi

Edited by safaritn

Share this post


Link to post
Share on other sites
3 hours ago, abhoriel said:

Looks good, I might try this out!

It works good too. I autofocus with ekos/kstars from my livingroom. No need to go outside to refocus.

  • Like 1

Share this post


Link to post
Share on other sites
5 hours ago, abhoriel said:

Excellent, I guess despite not using a stepper motor, its precise enough. :D

You be the judge to that:

I've never had such distinct star spikes before. Considering a 1.6 "/pixel image scale, I'm very satisfied.

The geared motor does have a lot of backlash, which my arduino code could compensate for. But the moonlite driver has no backlash compensation. Still, the autofocus routine in Ekos handles this fine.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Piero
      I am selling my Moonlite installation kit for 8" newtonian focuser as shown here 
      https://www.firstlightoptics.com/moonlite-focusers/moonlite-installation-kit-for-newtonian-focusers.html 
       

       
      The installation kit was fitted on my 8" dobson in Italy and used very little (it is essentially new). I no longer need it as the focuser now sits on my 12" dob. 
      New £58, my price: £40 (including RM 1st class signed-for). PayPal (pay as a friend) or direct bank transfer.
      Also advertised on ABS.
      Thanks for looking,
      Piero
    • By lenscap
      My diy Onstep GoTo controller is basically an Arduino Mega 2560 with a RAMPS 1.5 shield, rated for 12V normal, 20V max & uses about 2A max.
      It is powered from a 12V car  battery. The lead has crocodile clips at the battery & connects to 5A screw terminals on the RAMPS.
      When I "power-up" by connecting the clips there is a spark at the terminal. This is expected, but does the sparking reduce the life of my electronics?
      If so is there a cheap/simple way to reduce or prevent this?
      I know I could put a switch in the lead but I assume the sparking would then happen inside the switch, making no difference.
       
    • By angryowl
      This will be a thread detailing some of the changes and additions I will be doing to my ASC/Weather Station project. This is version 2.0 as I'll be making some very big changes from the initial project and I think continuing on in the existing thread would not have made much sense.
      So, I still want to use an APS size sensor as after seeing the quality and light capturing capabilities of the now defunct Opticstar DS-616C XL camera and Meike lens I simply cannot go back to using a smaller lens/sensor combination. One thing is certain, I won't be paying £400 or potentially more for another APS astro sized camera so with that in mind I plan on heavily modifying a Nikon D50 DLSR and use the same lens. I chose the D50 primarily due to it having a CCD sensor (ICX453AQ) very close in specs to the one in the Opticstar (ICX413AQ) and the fact that I got a hold of a fully working body for £25.
      Now there's a few issues with going down the DSLR route which I plan on addressing as follows:
      The oversized camera body can be stripped down to bare essentials and fitted in the existing case with some moving of parts around Uncooled, the sensor is quite noisy so to cool it I plan on using the existing Opticstar enclosure with the TEC and hopefully get it purged with Argon to avoid dew formation. Also, since the box will need to be completely sealed to achieve this, there's simply not enough room inside for the main board to which the sensor connects to. The only way around this is using an 39pin 150mm long FPC extension which I managed to find and will be arriving shortly. This means I can have the sensor completely sealed with enough slack in the connection to place the mainboard anywhere I want. The D50 uses the NEF file extension as a "RAW" file format but it's not truly RAW and a heavy median filter is applied to all long exposure images to smooth out the noise. It works great for day to day shots, but in an application such as mine it'll most probably eliminate or severely affect my stars as most of them at the FL I'll be using the camera at will be a few pixels across and the Nikon median filter is very aggressive with such small features. The way around this is what's commonly known as Mode 3 on Nikons. Nikons have a additional Noise Reduction mode which takes the long exposure light first then straight after an equal length dark with the shutter closed, then applies the dark on the light and you get a further noise reduced image which again works very well, but not so much for AP. With mode 3 you essentially have the NR feature on and take an exposure but then immediately shut down the camera after the light has finished exposing. What this does is it causes the camera to dump a REAL RAW image onto the SD card without applying the median filter OR the Noise Reduction process. This obviously results in a much noisier image as expected, but all the stars will still be there and the image in this way can then be dark-subtracted and processed to my liking. I'll post some test shots I've taken to illustrate this. The D50 uses a hybrid shutter, both the CCD electronic shutter and mechanical shutter are used depending I think on the exposure length. If a high enough exposure is used, from what I understand, one can use exclusively the electronic shutter, but for longer exposures the shutters work in conjunction. Now I know the ICX413AQ in the Opticstar is more than capable of taking long exposures solely with its electronic shutter despite the fact that in its datasheet they recommend a mechanical shutter for proper use. So, my thinking is since the D50's sensor is similar to the ICX413AQ the only thing preventing the camera from being able to take any exposure using exclusively the electronic shutter is that its mechanical shutter is in the way and I don't think that the camera would prevent the CCD electronic global shutter itself to still open and close when required. However, this is all a theory at the moment and the only way to confirm it is to test the camera with the sensor outside when the FPC cable arrives. More on this later... In terms of capture software available, the D50 is actually very poor and I could only get digiCamControl to see and control the camera via USB. But I won't be using this as when the camera is hooked up to the PC its SD card is identified as a storage drive and the camera can be used as it would normally with the images appearing on the drive after being written to the SD! Since I'm using my VB app to process the images I would just point the app to that folder and should work. That's all I can think of for now but if and when new ones come up I'll add them here.
      Next I'll be describing some of the other changes planned.
    • By johnb
      Hope someone can help with my Moonlite Issue, the fine adjustment knob has come away from the main unit but 
      I simply cant see how to get it back in
      It wont simply push back in as it does not go in all the way and i notice the spindle has a small groove and again does that go in the knob or the main unit - hopefully the pics explain
      I looked on line but could not seem to find much
      Help appreciated
      Regards
      John B
       



    • By bottletopburly
      So  my birthday just past so money to splash on astro stuff , i will have my 1000D modded by juan at cheapastrophotography and also have ordered an autofocuser from deepsky dad https://deepskydad.com/autofocuser i know they can be done DIY but this is a neat package  and costs about the same as a SW autofocuser and a hitechastro focusmaster and i`m no electronic wizard and pavel seems to have a good product and works with ascom and confirmed it works with APT i will update in a few weeks time when hopefully i will have received and tried out . 
       
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.