×

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: 24
  • Thank you received: 1
Thanks for that suggestion Ihoujin.
I moved the file, but it still does not show in the profile editor. (see attachment)
When i open the Web Manager in my browser, the Motor HAT Focuser does show in the drivers select box in the focuser group and is select-able.

I installed KStars/Ekos also on the Raspberry PI itself, but the result is the same.

Lost this battle, but hope to win the war.
Windows 10 64-bit with remote access to Embedded Raspberry PI 3 with Ubuntu Mate 16.04.3 LTS and KStars 2.9.8, Skywatcher HEQ5 PRO, Robtics 80mm F7 doublet apochromaat refractor + CentralDS CDS-600DII
6 years 4 months ago #20757
Attachments:

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

  • Posts: 983
  • Thank you received: 375
It works over webmanager because the xml file does exist on the machine the webmanager is running on.
But it doesn't exist on the macine you are running KStars/Ekos on. Probably you need to copy it to your windows machine. Just find the place where all the other driver's xml files are, and copy it there.
The following user(s) said Thank You: BJ Ruiterkamp
6 years 4 months ago #20758

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

  • Posts: 1309
  • Thank you received: 226
I just found that it is possible to increase the I2C baudrate. By default, it is set to only 100KHz. But by increasing it the PPS (pulse per second) signal that dictates to the motor controller how fast to run, can be set to operate at much higher speeds. I experimented up to 2MHz, and settled on 1.5MHz for safety buffer. The end result is I can now drive my stepper motor much faster and effectively implement microstepping, which before would absolutely crawl. With microstepping I get the added benefit of quieter and smoother operation.

To implement this, to /boot/config.txt
dtparam=i2c_baudrate=1500000
For example that will set the frequency to 1.5MHz. And 400000 would be 400KHz.

To verify i2c speed
sudo cat /sys/module/i2c_bcm2708/parameters/baudrate
OR
dmesg
And locate a this related line
bcm2708_i2c 3f804000.i2c: BSC1 Controller at 0x3f804000 (irq 83) (baudrate 1500000)
The following user(s) said Thank You: Radek Kaczorek
Last edit: 6 years 2 days ago by Andrew.
6 years 1 month ago #23587

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 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.

Time to create page: 1.064 seconds