QHYCCD

QHY CFW3 firmware source code?

Nico

Re: QHY CFW3 firmware source code?
« Reply #30 on: June 13, 2021, 07:41:16 AM »

  • Set the speed to 19200 baud. The wheel should initialize, and a "0" should be printed on the monitor window

19200 the data I receive is "?" not a "0"


My bad, you should set the speed to 9600, not 19200!!! Could you try again?

Nico

Re: QHY CFW3 firmware source code?
« Reply #31 on: June 13, 2021, 08:53:47 AM »
Thanks NICO.

the push button is in red mode, "out"
in 9600 in the terminal I get "0"
but no command is swallowed.
"1" wheel does not move
"2" wheel does not move
I do not change any parameter.
I have put in:
"BB 130" Send
"FB -130" Send
"STR" Send
"UD" Send
"SMP" Send

What commands can I enter to move?

Nico

Re: QHY CFW3 firmware source code?
« Reply #32 on: June 13, 2021, 09:55:22 AM »
Ok: let's try the following then
  • Open the Arduino IDE
  • Change line 19 from //#define DEBUG to #define DEBUG. This should turn debug output ON
  • Connect the wheel (Serial mode), choose the right COM port and upload the sketch
  • Open the serial monitor from the Arduino IDE: you should now see some debug info every time a command is sent/received

The sequence of commands you reported before is correct, except for "UD", which should be "UD 1" for unidirectional mode, or "UD 0" for bidirectional mode. The only strange thing is that the wheel is not moving if you send 1 or 2... let me know if the debug code helps.

Nico
« Last Edit: June 13, 2021, 09:57:28 AM by Nico »

Re: QHY CFW3 firmware source code?
« Reply #33 on: June 13, 2021, 01:40:11 PM »
Hi Nico.
make a few changes and it works, but I think the code is not elegant.
the modification comes from line 830 to 872
it seems to work.
a question.
each filter individually can the offset be adjusted?
Thanks NICO.
Check the code because I know it can be improved
I'll post the new code for you

Nico

Re: QHY CFW3 firmware source code?
« Reply #34 on: June 13, 2021, 01:54:09 PM »
Ah, now I get it!

In the serial monitor, you should select "no line ending": with this setting, it should also work with my firmware version. I forgot to mention that you had to use this setting before...
Alternatively, your workaround is also ok but I have tried to keep the firmware as adherent to the original QHY firmware as possible.
At the moment it is not possible to set a different position offset (i.e. backlash value in terms of the firmware) for each filter: it could be programmed, but at least with my wheel a single value is ok for all the filters. If you still have problems centering the filters, try with unidirectional rotation. The main point is not to have the filters perfectly centered on the sensor, but to have the positioning reproducible, so that e.g. flats and lights are acquired with consistent settings.

Best,

Nico

Re: QHY CFW3 firmware source code?
« Reply #35 on: June 13, 2021, 02:22:57 PM »
Thanks NICO.
Sure you can improve the code and make it cleaner.
With the code modification it works with the serial monitor and also from the ASCOM APP.
Thank you again

Nico

Re: QHY CFW3 firmware source code?
« Reply #36 on: June 13, 2021, 03:10:10 PM »
Glad it worked out, one way or the other!

Let me know if you get better results with your updated wheel!

Nico

Re: QHY CFW3 firmware source code?
« Reply #37 on: June 14, 2021, 12:49:47 AM »
Glad it worked out, one way or the other!

Let me know if you get better results with your updated wheel!

Nico

Hello again NICO.
Yes!!
It is much more centered, but it is true that I had to deactivate the search filter backward.
Even so, filter # 1 is not completely well centered.
Ideally, you should have an offset for each filter to adjust it independently.
Thanks NICO, great job.

NAG

Re: QHY CFW3 firmware source code?
« Reply #38 on: June 14, 2021, 12:44:51 PM »
Hi,
Thanks a lot for your work  :)

I'll defenetly try your version, but can you please answer two questions?

1) If i chouse "Unidirectional", the wheel will move forward, thats correct ?

2) If i don't wanna apply any backlash, the value in both Backlash F and B should be 0 ?

In other words, If i unckeck the "Unidirectional" option and left both backlash boxes at 0, the wheel will work as it works with the original firmeware ?

Thanks once more

Nico

Re: QHY CFW3 firmware source code?
« Reply #39 on: June 14, 2021, 01:36:33 PM »
Hi NAG,

1) If i chouse "Unidirectional", the wheel will move forward, thats correct ?

Yes, that is correct: if the wheel is at position 2 and you want to move it to position 4, it will move 2->3->4. If you want to move to position 1 from position 2, it will move 2->3->4->5->6->7->1

2) If i don't wanna apply any backlash, the value in both Backlash F and B should be 0 ?
In other words, If i unckeck the "Unidirectional" option and left both backlash boxes at 0, the wheel will work as it works with the original firmeware ?

In the original firmware, there was a built in offset of 200 in both directions, so if you want to have the same behavior, you should uncheck "Unidirectional" and have Backlash F = 200 and Backlash B = -200

Best,

Nico