×

INDI Library v1.7.8 Released (11 May 2019)

Mid year release of INDI Library v1.7.8 comes with a few drivers and improvements to to existing drivers.

Astroberry Focuser with Adafruit Motor HAT

  • Posts: 632
  • Karma: 6
  • Thank you received: 243

Replied by Kaczorek on topic Astroberry Focuser with Adafruit Motor HAT

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.
--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM
1 year 11 months ago #17297

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

  • Posts: 36
  • Thank you received: 5

Replied by RobJones on topic Astroberry Focuser with Adafruit Motor HAT

Thank you for your fast reply. I'll try again tomorrow.
Don't you ever sleep? :)
1 year 11 months ago #17298

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

  • Posts: 632
  • Karma: 6
  • Thank you received: 243

Replied by Kaczorek on topic Astroberry Focuser with Adafruit Motor HAT

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.
--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM
The following user(s) said Thank You: RobJones
1 year 11 months ago #17302

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

  • Posts: 513
  • Karma: 1
  • Thank you received: 90

Replied by Ihoujin on topic Astroberry Focuser with Adafruit Motor HAT

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!
INDI/KStars on Raspberry Pi 3B+
Lubuntu 16.04
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG @280mm Guide Scope
PHD2
Adafruit Motor Hat shield
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.
The following user(s) said Thank You: RobJones
1 year 11 months ago #17324
Attachments:

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

  • Posts: 513
  • Karma: 1
  • Thank you received: 90

Replied by Ihoujin on topic Astroberry Focuser with Adafruit Motor HAT

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
INDI/KStars on Raspberry Pi 3B+
Lubuntu 16.04
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG @280mm Guide Scope
PHD2
Adafruit Motor Hat shield
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.
Last edit: 1 year 10 months ago by Ihoujin.
1 year 10 months ago #17850

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

  • Posts: 513
  • Karma: 1
  • Thank you received: 90

Replied by Ihoujin on topic Astroberry Focuser with Adafruit Motor HAT

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.

2017-09-20T01:42:30: Adafruit Motor HAT Focuser moved to position 6400
2017-09-20T01:42:45: Adafruit Motor HAT Focuser is moving inward by 1
2017-09-20T01:42:45: Adafruit Motor HAT Focuser backlash compensation by 25 steps...
2017-09-20T01:42:47: Adafruit Motor HAT Focuser moved to position 6351

Curious. Above, I see it moved 49 steps overall when changing position. That is 2x Backlash (25) Minus 1 travel step.

2017-09-20T01:58:05: Adafruit Motor HAT Focuser moved to position 6330
2017-09-20T01:58:09: Adafruit Motor HAT Focuser backlash set to 0 steps
2017-09-20T01:58:11: Adafruit Motor HAT Focuser is moving inward by 400
2017-09-20T01:58:28: Adafruit Motor HAT Focuser moved to position 5930

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.
INDI/KStars on Raspberry Pi 3B+
Lubuntu 16.04
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG @280mm Guide Scope
PHD2
Adafruit Motor Hat shield
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.
Last edit: 1 year 8 months ago by Ihoujin.
1 year 8 months ago #19650
Attachments:

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

  • Posts: 632
  • Karma: 6
  • Thank you received: 243

Replied by Kaczorek on topic Astroberry Focuser with Adafruit Motor HAT

Thanks for the report. I need to take a look at the code to figure out what's happening here. Stay tuned!
--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM
1 year 8 months ago #19736

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

  • Posts: 513
  • Karma: 1
  • Thank you received: 90

Replied by Ihoujin on topic Astroberry Focuser with Adafruit Motor HAT

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.
INDI/KStars on Raspberry Pi 3B+
Lubuntu 16.04
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG @280mm Guide Scope
PHD2
Adafruit Motor Hat shield
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.
1 year 8 months ago #19741

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

  • Posts: 513
  • Karma: 1
  • Thank you received: 90

Replied by Ihoujin on topic Astroberry Focuser with Adafruit Motor HAT

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					
INDI/KStars on Raspberry Pi 3B+
Lubuntu 16.04
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG @280mm Guide Scope
PHD2
Adafruit Motor Hat shield
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.
1 year 7 months ago #19930

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

  • Posts: 632
  • Karma: 6
  • Thank you received: 243

Replied by Kaczorek on topic Astroberry Focuser with Adafruit Motor HAT

Hi Andrew. The driver has been fixed. Please update your sources from git and let me know if it works for you.
--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM
The following user(s) said Thank You: Ihoujin
1 year 7 months ago #19996

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

  • Posts: 513
  • Karma: 1
  • Thank you received: 90

Replied by Ihoujin on topic Astroberry Focuser with Adafruit Motor HAT

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.
INDI/KStars on Raspberry Pi 3B+
Lubuntu 16.04
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG @280mm Guide Scope
PHD2
Adafruit Motor Hat shield
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.
1 year 7 months ago #20001

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

  • Posts: 632
  • Karma: 6
  • Thank you received: 243

Replied by Kaczorek on topic Astroberry Focuser with Adafruit Motor HAT

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.
--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM
1 year 7 months ago #20009

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

Time to create page: 0.324 seconds