×

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: 27
  • Thank you received: 2
Hi,

I'm a newbie trying to set up my new RPi 3 B+ as an Indi server using the Astroberry Adafruit Motor HAT driver. I've followed the GitHub instructions however I'm having trouble compiling.

I'm getting the following errors:
Scanning dependencies of target indi_amh_focuser
[ 90%] Building CXX object CMakeFiles/indi_amh_focuser.dir/amh_focuser.o
/home/steve/astroberry-amh/amh_focuser.cpp: In constructor ‘IndiAMHFocuser::IndiAMHFocuser()’:
/home/steve/astroberry-amh/amh_focuser.cpp:79:38: error: ‘setFocuserConnection’ was not declared in this scope
  setFocuserConnection(CONNECTION_NONE);
                                      ^
/home/steve/astroberry-amh/amh_focuser.cpp: In member function ‘virtual bool IndiAMHFocuser::initProperties()’:
/home/steve/astroberry-amh/amh_focuser.cpp:161:66: error: ‘SetFocuserCapability’ was not declared in this scope
  SetFocuserCapability(FOCUSER_CAN_ABS_MOVE | FOCUSER_CAN_REL_MOVE);
                                                                  ^
CMakeFiles/indi_amh_focuser.dir/build.make:62: recipe for target 'CMakeFiles/indi_amh_focuser.dir/amh_focuser.o' failed
make[2]: *** [CMakeFiles/indi_amh_focuser.dir/amh_focuser.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/indi_amh_focuser.dir/all' failed
make[1]: *** [CMakeFiles/indi_amh_focuser.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Any thoughts regarding what the problem might be?

Regards,

Steve
5 years 11 months ago #25382

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

  • Posts: 27
  • Thank you received: 2
Hi,

I'm a newbie trying to set up a RPi 3 B+ with Ubuntu-MATE Indi server using the Astroberry AMH Focuser driver and I'm getting the following error when compiling:
Scanning dependencies of target indi_amh_focuser
[ 90%] Building CXX object CMakeFiles/indi_amh_focuser.dir/amh_focuser.o
/home/steve/astroberry-amh/amh_focuser.cpp: In constructor ‘IndiAMHFocuser::IndiAMHFocuser()’:
/home/steve/astroberry-amh/amh_focuser.cpp:79:38: error: ‘setFocuserConnection’ was not declared in this scope
  setFocuserConnection(CONNECTION_NONE);
                                      ^
/home/steve/astroberry-amh/amh_focuser.cpp: In member function ‘virtual bool IndiAMHFocuser::initProperties()’:
/home/steve/astroberry-amh/amh_focuser.cpp:161:66: error: ‘SetFocuserCapability’ was not declared in this scope
  SetFocuserCapability(FOCUSER_CAN_ABS_MOVE | FOCUSER_CAN_REL_MOVE);
                                                                  ^
CMakeFiles/indi_amh_focuser.dir/build.make:62: recipe for target 'CMakeFiles/indi_amh_focuser.dir/amh_focuser.o' failed
make[2]: *** [CMakeFiles/indi_amh_focuser.dir/amh_focuser.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/indi_amh_focuser.dir/all' failed
make[1]: *** [CMakeFiles/indi_amh_focuser.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Any thoughts regarding what's missing here?

Regards,

Steve
5 years 11 months ago #25384

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

  • Posts: 27
  • Thank you received: 2
Apologies for double post. My first post didn't appear and I wasn't sure why. I noticed after the second post that my posts were being moderated before being posted.
5 years 11 months ago #25465

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

  • Posts: 983
  • Thank you received: 375
The issue has been hotfixed in the last commit. Please redownload the code and recompile.
The following user(s) said Thank You: Steve
5 years 11 months ago #25475

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

  • Posts: 27
  • Thank you received: 2
Thanks Radek!

I can compile but I'm getting this error now when I "make install":
steve@SmackAstroRPi:~/astroberry-amh/build$ sudo make install
[ 10%] Performing update step for 'libAdafruitStepperMotorHAT'
Current branch master is up to date.
No stash found.
No stash found.
No stash found.
CMake Error at /home/steve/astroberry-amh/build/libs/AdafruitStepperMotorHAT_CPP/tmp/libAdafruitStepperMotorHAT-gitupdate.cmake:136 (message):
 
 
  Failed to unstash changes in:
  '/home/steve/astroberry-amh/libs/AdafruitStepperMotorHAT_CPP/'.
 
  You will have to resolve the conflicts manually
 
 
CMakeFiles/libAdafruitStepperMotorHAT.dir/build.make:94: recipe for target 'libs/AdafruitStepperMotorHAT_CPP/src/libAdafruitStepperMotorHAT-stamp/libAdafruitStepperMotorHAT-update' failed
make[2]: *** [libs/AdafruitStepperMotorHAT_CPP/src/libAdafruitStepperMotorHAT-stamp/libAdafruitStepperMotorHAT-update] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/libAdafruitStepperMotorHAT.dir/all' failed
make[1]: *** [CMakeFiles/libAdafruitStepperMotorHAT.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Apologies for my cluelessness.
5 years 11 months ago #25517

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

  • Posts: 983
  • Thank you received: 375
This driver uses submodules, which are downloaded to /home/steve/astroberry-amh/build/libs/AdafruitStepperMotorHAT_CPP
Just delete the /home/steve/astroberry-amh/build/libs directory and rerun make install
The following user(s) said Thank You: Steve
5 years 11 months ago #25523

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

  • Posts: 27
  • Thank you received: 2
Victory! Thanks again. Not smart enough, yet, to understand why it worked but it did :)
5 years 11 months ago #25528

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

  • Posts: 1309
  • Thank you received: 226
SmackAstro. A couple things you might want to customize. Within amh_focusser.cpp
Define SPR to match your motor specs. Kaczorek set it to 400, but most steppers are 200.
Towards the bottom of the file you can define the stepper mode to one of 4 options
SINGLE (lowest power use)
DOUBLE (2x power use, ~25% more torque)
INTERLEAVE (50% more power, slightly more torque than Single, finer step size)
MICROSTEP (Very fine step size)

I recommend microstep, but you will have to adjust the I2C baud rate, see my earlier posts in the thread.
5 years 11 months ago #25604

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

  • Posts: 2
  • Thank you received: 0
Hi, i am trying to reproduce this project on my Celestron 8 SE. But i found that Celestron 8 SE, there is no obvious way to measure the focuser tube traveling distance for one knob revolution.
Do you guys know how to work around this problem? is this parameter a must for the program to work?
Thanks.
5 years 9 months ago #26434

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

  • Posts: 1309
  • Thank you received: 226
It is not a must. My discussion on travel distance was to work out an estimate for limits to the maximum number of steps the driver will allow. The author was looking at 20,000 step limit, and I calculated the most I could possibly need, and was satisfied I came within it.
5 years 9 months ago #26437

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

  • Posts: 2
  • Thank you received: 0
That's good to hear. I am glad that you are still monitoring the thread.
I need to look at the code more closely to figure out what exactly i need to provide for the focuser to work.

At the Ekos UI side, it looks i only need to set the ticks properties for the Max Travel

Settings
Max Travel: Maximum travel in ticks before the autofocus process aborts.
Step: Initial step size in ticks to cause a noticeable change in HFR value.
Tolerance: The tolerance percentage values decides when the autofocus process stops in the Iterative algorithm.
5 years 9 months ago #26438

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

  • Posts: 16
  • Thank you received: 0
Hi all,

I have ordered te ADAFruit DC and stepper motor HAT for raspberry PI 3b+ to build my focusser. Any suggestions on the type of stepper motor I should buy with it?

Kind regards,
Gunther
Remote PI : Raspberry PI 3B+ with Stellarmate 1.16.2 /
Telescope : Skywatcher HEQ5 /
Camera : Canon 700D
5 years 1 month ago #34588

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

Time to create page: 1.232 seconds