×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Astroberry Focuser with Adafruit Motor HAT

  • Posts: 983
  • Thank you received: 375
Everything's OK. You need to remove libs directory from your build directory before every consecutive cmake run. The driver is using submodules and there's no easy way to do this. So you need to rm -rf /home/rob/astroberry-amh/build/libs everytime you recompile the driver.
Also make sure that you run sudo make install instead ust make install. Everything should work just fine when you follow these. If not, just let me know.
6 years 9 months ago #17297

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

  • Posts: 35
  • Thank you received: 5
Thank you for your fast reply. I'll try again tomorrow.
Don't you ever sleep? :)
6 years 9 months ago #17298

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

  • Posts: 983
  • Thank you received: 375
I'm a digital bot, I don't need any sleep ;) But seriously, You got me in the middle of imaging session and while it runs I often do some reading.
The following user(s) said Thank You: Rob Jones
6 years 9 months ago #17302

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

  • Posts: 1309
  • Thank you received: 226
Here are the STL files for my focuser; including images parts list and some instruction/guidance. Some of these parts have been revised slightly but not tested, I don't expect there to be any issues with them. I designed tolerances into some parts that click together that work on the printer available to me. Different printers may offer different results. Gear shafts are particularly finicky.
Best of luck!
The following user(s) said Thank You: Rob Jones
6 years 9 months ago #17324
Attachments:

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

  • Posts: 1309
  • Thank you received: 226
Hello Kaczorek. Recently I noticed that although I have indi_amh_focuser.xml in /usr/share/indi, the driver is not on my list now. It only appears in a profile I have already set-up earlier. Not sure how to address this.
The driver does still function in that profile mind you.


Nevermind. I fixed it by moving the executable from /usr/local/bin to /usr/bin
Last edit: 6 years 8 months ago by Andrew.
6 years 8 months ago #17850

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

  • Posts: 1309
  • Thank you received: 226
Hello Kaczorek. I wish to report issues I've been having with the driver you wrote for this. Although initially it appeared everything was fine, I still struggled to set my backlash. Today I took some data points and believe I uncovered a bug in the way the backlash compensation is applied over a range of drive steps.
>Please refer to the attached images.
The photo illustrates how I was measuring the position. Each tick, 0-8 was drawn at 100 step increments.
The chart includes my data set. Each line represents a backlash value of 0 to 500 at 50 step increments. The drive-steps to take are along the X axis, 1 to 400. And the position reached from Zero with the compensation is the field of data points. Values of 0.1 only mean the needle budged indicating clearance of true backlash, which I now believe is under 50 steps, clearly evident in the chart on the far left.

Notice that as I increase the drive step value to travel further, the position obtained actually Decreases. Only once the drive step value is greater than the backlash setting does it trend back upwards linearly.

In addition, recall I set the scale with 100 step increments, but a difference of just 50 backlash comp steps results in a full position increment up the scale, rather than just a half position. So a backlash step is also traveling double what it should.Curious. Above, I see it moved 49 steps overall when changing position. That is 2x Backlash (25) Minus 1 travel step.
Total Travel 400 Steps. Now backlash had no effect at all. As if it were 0
When they do count they count for double. And they only count after the travel steps are done.
It is as if there needs to be a delay to finish the travel before compensating backlash.

Please have a look once more when you have the time.
Thank you.
Last edit: 6 years 6 months ago by Andrew.
6 years 6 months ago #19650
Attachments:

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

  • Posts: 983
  • Thank you received: 375
Thanks for the report. I need to take a look at the code to figure out what's happening here. Stay tuned!
6 years 6 months ago #19736

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

  • Posts: 1309
  • Thank you received: 226
Thank you. I'm glad you understood what I was trying to convey. I did not have an easy time trying to explain the odd behaviour.
It really took me this long to realize something was up because of a combination of few opportunities to use it over months of bad conditions and doubt that my design was sound.

I did have a buddy look at the code, and he thought maybe associating an integer value with a floating point number on line 146 is related. Only you would know.

And if you have the time, can a console option for stepper mode be added? (Single, Double, Interleave, Micro). I reason that will make it more convenient for DIY builds with different specs to not required recompiling for it.

Thanks again.
6 years 6 months ago #19741

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

  • Posts: 1309
  • Thank you received: 226
Here is an annotated segment of log as I take small travel steps of 1, with a backlash setting of 25. Note it is directed to go twice the backlash minus the set travel step, also the EKOS pane reports the result with expected value +- 1 step.
2017-10-01T23:34:33	Adafruit Motor HAT Focuser moved to position 0					
2017-10-01T23:35:08	Adafruit Motor HAT Focuser is moving outward by 100					
2017-10-01T23:35:10	Adafruit Motor HAT Focuser moved to position 100					
2017-10-01T23:35:17	Adafruit Motor HAT Focuser backlash compensation by 25 steps...					
2017-10-01T23:35:17	Adafruit Motor HAT Focuser is moving inward by 1					
2017-10-01T23:35:18	Adafruit Motor HAT Focuser moved to position 51	
	^Moved 2x set backlash minus travel steps (1). EKOS reports focuser moved to position 99.
2017-10-01T23:35:21	Adafruit Motor HAT Focuser is moving inward by 1					
2017-10-01T23:35:21	Adafruit Motor HAT Focuser moved to position 98					
2017-10-01T23:35:22	Adafruit Motor HAT Focuser is moving inward by 1					
2017-10-01T23:35:22	Adafruit Motor HAT Focuser moved to position 96					
2017-10-01T23:35:22	Adafruit Motor HAT Focuser is moving inward by 1					
2017-10-01T23:35:22	Adafruit Motor HAT Focuser moved to position 97					
2017-10-01T23:35:23	Adafruit Motor HAT Focuser is moving inward by 1					
2017-10-01T23:35:23	Adafruit Motor HAT Focuser moved to position 95					
2017-10-01T23:35:25	Adafruit Motor HAT Focuser backlash compensation by 25 steps...					
2017-10-01T23:35:25	Adafruit Motor HAT Focuser is moving outward by 1					
2017-10-01T23:35:26	Adafruit Motor HAT Focuser moved to position 144
	^Moved 2x set backlash minus travel steps (1). EKOS reports focuser moved to position 96.
2017-10-01T23:35:33	Adafruit Motor HAT Focuser is moving outward by 1					
2017-10-01T23:35:33	Adafruit Motor HAT Focuser moved to position 97					
2017-10-01T23:35:34	Adafruit Motor HAT Focuser is moving outward by 1					
2017-10-01T23:35:34	Adafruit Motor HAT Focuser moved to position 98					
2017-10-01T23:35:34	Adafruit Motor HAT Focuser is moving outward by 1					
2017-10-01T23:35:34	Adafruit Motor HAT Focuser moved to position 99					
2017-10-01T23:35:35	Adafruit Motor HAT Focuser is moving outward by 1					
2017-10-01T23:35:35	Adafruit Motor HAT Focuser moved to position 100					
2017-10-01T23:35:43	Adafruit Motor HAT Focuser backlash compensation by 25 steps...					
2017-10-01T23:35:43	Adafruit Motor HAT Focuser is moving inward by 1					
2017-10-01T23:35:44	Adafruit Motor HAT Focuser moved to position 51	
	^Moved 2x set backlash minus travel steps (1). EKOS reports focuser moved to position 99.
2017-10-01T23:35:45	Adafruit Motor HAT Focuser is moving inward by 1					
2017-10-01T23:35:45	Adafruit Motor HAT Focuser moved to position 98					
2017-10-01T23:35:46	Adafruit Motor HAT Focuser is moving inward by 1					
2017-10-01T23:35:46	Adafruit Motor HAT Focuser moved to position 96					
2017-10-01T23:35:46	Adafruit Motor HAT Focuser is moving inward by 1					
2017-10-01T23:35:46	Adafruit Motor HAT Focuser moved to position 97					
2017-10-01T23:35:47	Adafruit Motor HAT Focuser is moving inward by 1					
2017-10-01T23:35:47	Adafruit Motor HAT Focuser moved to position 95					
2017-10-01T23:35:49	Adafruit Motor HAT Focuser backlash compensation by 25 steps...					
2017-10-01T23:35:49	Adafruit Motor HAT Focuser is moving outward by 1					
2017-10-01T23:35:50	Adafruit Motor HAT Focuser moved to position 144 
	^Moved 2x set backlash minus travel steps (1). EKOS reports focuser moved to position 96.
2017-10-01T23:35:53	Adafruit Motor HAT Focuser is moving outward by 1					
2017-10-01T23:35:53	Adafruit Motor HAT Focuser moved to position 97					
2017-10-01T23:35:54	Adafruit Motor HAT Focuser is moving outward by 1					
2017-10-01T23:35:54	Adafruit Motor HAT Focuser moved to position 98					
2017-10-01T23:35:54	Adafruit Motor HAT Focuser is moving outward by 1					
2017-10-01T23:35:54	Adafruit Motor HAT Focuser moved to position 99					
2017-10-01T23:35:56	Adafruit Motor HAT Focuser is moving outward by 1					
2017-10-01T23:35:56	Adafruit Motor HAT Focuser moved to position 100					
6 years 5 months ago #19930

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

  • Posts: 983
  • Thank you received: 375
Hi Andrew. The driver has been fixed. Please update your sources from git and let me know if it works for you.
The following user(s) said Thank You: Andrew
6 years 5 months ago #19996

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

  • Posts: 1309
  • Thank you received: 226
Fantastic! Everything appears to move as expected now. Thank you very much Radek.
For a final tweak, I suggest setting the stepper mode to Double by default in the code. The added torque is useful to avoid skipped steps. And finally to update Astrobery Server with this version.
And with that it appears we have two mature focus drivers for the Raspberry Pi people can choose from. For the Adafruit Motor HAT, and Piface Digital driver boards.
Amazing work.
6 years 5 months ago #20001

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

  • Posts: 983
  • Thank you received: 375
I'm glad it works for you. Now the default stepper mode has been set to DOUBLE. Update your sources and have fun ;-)
I will add the latest version to Astroberry Server next release.
6 years 5 months ago #20009

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

Time to create page: 0.438 seconds