Moonlite focuser protocol

  • Posts: 11
  • Thank you received: 0
Hello all

I am implementing an Arduino-based focuser like everyone else out there. Instead of inventing my own protocol and having headaches with ASCOM and INDI, I want to implement the Moonlite protocol (also same as EasyFocus/LazyFocus). Also I'm much better at low-level programming than either VB or C++ so I would rather use someone's existing ASCOM and INDI drivers.

I don't want to implement Robofocus protocol (even though somebody has already reverse-engineered it and published Arduino source code) because the Robofocus Windows application doesn't play well with Arduino.

I could reverse-engineer the Moonlite protocol from the INDI driver (looked through it last night), but I would much prefer a protocol document so I don't need to rack my brain so hard.
10 years 1 month ago #966

Please Log in or Create an account to join the conversation.

There you go

File Attachment:

File Name: HighResSte...r107.pdf
File Size:958 KB
The following user(s) said Thank You: dolguldur
Last edit: 10 years 1 month ago by Jasem Mutlaq.
10 years 1 month ago #968
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 0
Thanks Jasem.

Can you share what is the return value of the :GV# command for a "real" Moonlite controller?
10 years 1 month ago #981

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 0
Folks may be amused to know that I have successfully reverse-engineered enough of the Moonlite protocol thanks to Jasem's document that both the stand-alone Moonlite program and the ASCOM driver work. I have not tested it with the INDI driver yet, however.
10 years 1 month ago #990

Please Log in or Create an account to join the conversation.


×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

  • Posts: 21
  • Thank you received: 1

Replied by Cees on topic Moonlite focuser protocol


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 0
Thanks for the update!

I know I wasn't using leading zero'es in the return, but the Windows dedicated client and ASCOM driver both work.

I noticed that at my speed of 160 pps, I was losing steps on my Microtouch motor (e.g. one night the focus position is 2965, the next night it's 3100..) so you may want to reduce the MAXSPEED and acceleration.
10 years 3 weeks ago #1040

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 1

Replied by Cees on topic Moonlite focuser protocol

Speed does not seem to be a problem. I scavenged a stepper motor from an old epson r230 printer and am using a easydriver stepper board with 12V supply to the motor. Seems to work nicely. I've also connected arduino pin 4 to the easydriver sleep pin and switch it low when isRunnig is low and back on when receiving the FQ command to start moving. Keeps the board cool.
Of course rain has come and I haven't been able to test it outside yet. Maybe next weekend.
10 years 3 weeks ago #1041

Please Log in or Create an account to join the conversation.

  • Posts: 85
  • Thank you received: 3

Hi.
I also want to run a homemade focuser with an arduino+easy stepper with indi running on a raspberry pi.

I've looked into running the INDIDUINOStepper firmware (indiduino.wordpress.com/2012/12/03/focusser/)
but I don't understand fully how it will work without a driver, or am I missing something?

Running with the moonlite driver sounds like a good option and I was wondering if it was possible to use your arduino sketch modified for indi?

Regards
Daniel
10 years 3 weeks ago #1060

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 1

Replied by Cees on topic Moonlite focuser protocol

Sure.
The original script is by orly_andico orlygoingthirty.blogspot.co.nz/2014/04/a...user-controller.html.

I have attached a file with my modifications. The instructions for printing the leading zeros I found somewhere on the net but can't remember where.

I am using an arduino pro-mini 3.3V and cp2102 based USB to TTL converter (all ebay). I do not use a capacitor between GND and RESET (the converter doesn't have a proper reset pin). It seems to work. All that is connected is RXD TXD 5V and GND on the converter to TXD RXD VCC and GND on the arduino.
pin 2,3,4 are connected to step, dir and sleep on the easydriver. The easy driver is powered with a seperate 12V supply.

It runs on a leonardo as well through usb. Only tried it in simulation mode without the easydriver connected but it connects and does respond to commands from the moonlite driver.

Hope this helps
10 years 3 weeks ago #1066

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 1

Replied by Cees on topic Moonlite focuser protocol


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in or Create an account to join the conversation.

  • Posts: 85
  • Thank you received: 3
Thank you very much. I got my stepper motor to run using the moonlite focuser driver. Now I only have to assemble the focuser on my telescope :)

/Daniel
10 years 3 weeks ago #1076

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 1

Replied by Cees on topic Moonlite focuser protocol

Glad it works for you.
I'm going to have another look at this script and learn some arduino programming in the process.
I still haven't been able to try this out under clear skies but I'm finding that the auto focus routine (canon eos camera) the focuser driver reports the focuser reached the required position before it is actually there. Almost likes like it reports this before it has even started moving. It will than take the next frame to early. I suspect it has something to do with timing and running AccelStepper. Perhaps the Serial communication is to slow or blocking the stepper from starting . I don't know. We'll see.

Anyway, big thank you to orly_andico for getting this started.
10 years 3 weeks ago #1077

Please Log in or Create an account to join the conversation.

Time to create page: 0.922 seconds