×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi / Rock Pi

  • Posts: 83
  • Thank you received: 9
Thank you that works.... Bruce
2 years 11 months ago #71190

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

  • Posts: 215
  • Thank you received: 16
I just put together a setup for my Radian Raptor using this setup.  It is similar to the one I originally used with my SkyWatcher 250P, except this time I use the NEMA17 with the planetary reducer (36PA5.18) and a GT2 timing pulley (60/20) and belt set instead of plastic gears.  This yielded 50,000 steps end-to-end and worked well with a 60ms delay.  The 60-tooth pulley is connected to the fine focus knob of the scope.

  
Last edit: 2 years 10 months ago by Jon Carleton.
2 years 10 months ago #71822
Attachments:

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

  • Posts: 421
  • Thank you received: 102
Nice! Looks solid!

I don't think you need a stepper with built-in reduction, since you're attaching to the fine focus knob, and you have 4:1 gearing reduction on the timing pulleys. On my 80mm scope, I have a small NEMA 14 motor, attached directly (1:1) to the fine focus knob, and it has plenty of torque.
The following user(s) said Thank You: Jon Carleton
2 years 10 months ago #71824

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

  • Posts: 215
  • Thank you received: 16
I didn't do it for the torque. I wanted more steps. Some of the autofocus routines I have been using like to make big jumps (100 steps or more) initially and then fine-tune the steps as the final number gets close. In my other implementation, with just a NEMA17, I only got 2400 steps, and that was barely adequate for some autofocus routines.

....granted...50,000 might be overkill...a bit. :D
2 years 10 months ago #71826

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

  • Posts: 421
  • Thank you received: 102
I have a change that I need to commit to git, that you might be interested in. It enables the Abort button, as well as showing the current position in realtime as it's moving. Handy for people with focusers with 50,000 steps. :)

I should have that change committed to git sometime later today.
The following user(s) said Thank You: Andrew, Jon Carleton
2 years 10 months ago #71829

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

  • Posts: 215
  • Thank you received: 16
Last time I went you your git page, it was broken....  (no it wasn't...I was broken..."pilot error")

....and yes, that'd be handy.

While on the subject, I notice that WaveShare doesn't promote the dual HAT board anymore on their website. You can still find it if you dig. They seem more inclined toward small, single HAT boards for the pi. Do you know if any of those still work with the code. I imagine they would, if they use the same controller chip.

I may have to try one and see. The full-size double HAT board blocks the fan quite a bit and gives me thermal issues when I run Siril for stacking on the pi (which is a handy thing to do while waiting for an hour's worth of new images to come in).
Last edit: 2 years 10 months ago by Jon Carleton.
2 years 10 months ago #71851

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

  • Posts: 421
  • Thank you received: 102
The new changes are now committed on Github. I hope it still proves to be as reliable as ever, and that I didn't break something. :)

I looked on the Waveshare site, and I could only find one HAT that controls stepper motors: www.waveshare.com/product/raspberry-pi/h...tepper-motor-hat.htm

Do you have a link to the board you are talking about?
The following user(s) said Thank You: Jon Carleton
2 years 10 months ago #71860

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

  • Posts: 215
  • Thank you received: 16
My error. The board I was looking at (www.waveshare.com/motor-driver-hat.htm) is for two non-stepper motors. I mistook the output for the two coils of a stepper. Different chip anyway. Oddly enough, now that I have ordered two of the stepper-motor-hat boards, it comes right up in the search. I must have been having a bad digital day. (probably fat-finger syndrome).

Although, this looks interesting: www.robotshop.com/en/drv8825-stepper-mot...r-pins-soldered.html

By the way, ignore the PM and my complaint above about issues finding your github repository.  I have been dealing with the government a lot recently, where everyone seems to be INITIAL.LASTNAME, so when I tried to access your repository at github.com/k.ross, it failed.  My novel solution, since I had gone there from a link in this thread before, was to actually READ the thread again and get the appropriate link.  Success.  You are k-ross, not k.ross.

I look forward to trying your new modifications and will report back...if ever we get a clear night again.  The site clearoutside.com seems to be very fond of RED for the foreseeable future for NW Georgia.
Last edit: 2 years 10 months ago by Jon Carleton.
2 years 10 months ago #71893

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

  • Posts: 215
  • Thank you received: 16
Alas, a problem. I am running Ubuntu MATE for Pi4 64-bit. I can attest to the fact this is a non-Java error :)

Scanning dependencies of target indi_wmh_focuser
[ 20%] Building CXX object CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o
/home/jon/Projects/indi-wmh-focuser/wmh_focuser.cpp: In lambda function:
/home/jon/Projects/indi-wmh-focuser/wmh_focuser.cpp:346:12: warning: unused variable ‘ticks’ [-Wunused-variable]
346 | uint32_t ticks = (uint32_t) abs((int)targetPos - (int)FocusAbsPosN[0].value);
| ^~~~~
[ 40%] Building CXX object CMakeFiles/indi_wmh_focuser.dir/DEV_Config.cpp.o
[ 60%] Building C object CMakeFiles/indi_wmh_focuser.dir/DRV8825.c.o
[ 80%] Building C object CMakeFiles/indi_wmh_focuser.dir/bcm2835.c.o
[100%] Linking CXX executable indi_wmh_focuser
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::Connect()':
wmh_focuser.cpp:(.text+0x3b4): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::Disconnect()':
wmh_focuser.cpp:(.text+0x3f8): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: wmh_focuser.cpp:(.text+0x440): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::initProperties()':
wmh_focuser.cpp:(.text+0x4e0): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: wmh_focuser.cpp:(.text+0x58c): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o:wmh_focuser.cpp:(.text+0x640): more undefined references to `INDI::BaseDevice::getDeviceName()' follow
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::updateProperties()':
wmh_focuser.cpp:(.text+0x7d0): undefined reference to `INDI::BaseDevice::isConnected()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::ISNewNumber(char const*, char const*, double*, char**, int)':
wmh_focuser.cpp:(.text+0x934): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::ISNewSwitch(char const*, char const*, ISState*, char**, int)':
wmh_focuser.cpp:(.text+0xad8): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o: in function `IndiWMHFocuser::_gotoAbsolute(unsigned int)::{lambda(unsigned int)#1}::operator()(unsigned int) const':
wmh_focuser.cpp:(.text+0xf64): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: wmh_focuser.cpp:(.text+0xfbc): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: wmh_focuser.cpp:(.text+0x102c): undefined reference to `INDI::BaseDevice::getDeviceName()'
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o:wmh_focuser.cpp:(.text+0x1358): more undefined references to `INDI::BaseDevice::getDeviceName()' follow
/usr/bin/ld: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o:(.data.rel.ro._ZTV14IndiWMHFocuser[_ZTV14IndiWMHFocuser]+0x178): undefined reference to `non-virtual thunk to INDI::Focuser::SetFocuserMaxPosition(unsigned int)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/indi_wmh_focuser.dir/build.make:129: indi_wmh_focuser] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/indi_wmh_focuser.dir/all] Error 2
make: *** [Makefile:130: all] Error 2


Same error occurs on my x86_64 Xubuntu 20.04 desktop.
 
Last edit: 2 years 10 months ago by Jon Carleton.
2 years 10 months ago #71898

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

  • Posts: 421
  • Thank you received: 102
Hmm, all I can say is it works on my regular plain vanilla Raspbian Pi, with INDI and KStars built from source, as well as on an Astroberry setup, where I don't built INDI and KStars from source, but rather just use what's in the repository.

It looks like some mismatch between header and library files. Make sure libindi, and libindi-dev are up to date. I'm assuming you're using INDI and KStars from the repository, and not building them from source. What version is your libindi? "dpkg -l libindi" will tell you.
The following user(s) said Thank You: Jon Carleton
2 years 10 months ago #71909

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

  • Posts: 215
  • Thank you received: 16
Actually, I am not using the repository version. I have had issues with updates causing last minute issues to a previously working system, so I killed the sources.list entry and am running a straight, compiled version off github of indi-core and indi3rdparty. The previous indi_wmh_focuser version was happy with that. I did get libindi-dev from the ubuntu repository, so that may be the issue.

dpkg -l says: 1.9.1~202105310319~ubuntu20.04.1 on the x86_64

I blew away the ubuntu repository version of libindi-dev (1.8.1) and recompiled the github libraries on the pi4. They now report 1.9.1 However, the same link error comes up.

The previous version code still compiles without issue. I will try tomorrow to get the kstars repository version and see how that plays.
Last edit: 2 years 10 months ago by Jon Carleton.
2 years 10 months ago #71913

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

  • Posts: 215
  • Thank you received: 16
I dumped everything KStars/INDI related from the x86_64 Ubuntu Desktop and installed the KStars sources.list, then loaded KStars and INDI back into the machine from the repository. The versions seemed to be the same as the GitHub compiles when I looked at libindi and libindi-dev.

Same failed result. Perhaps a 64 bit OS issue? Although, the old code compiles just fine with all renditions of library code.

I didn't try on the Pi4, becuase that is working (with the old code) presently. If I break the Pi, the clouds will go away and otherwise we are not expecting a clear night for some time.
2 years 10 months ago #71945

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

Time to create page: 0.571 seconds