×

INDI Library v2.0.6 is Released (02 Feb 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
Raspberry pi 4 running astrobery os locally.  I rebooted the whole computer.  Sorry for my lack of linux skills.  

I am really looking forward to using this hat!


thanks for the replies... Bruce
2 years 10 months ago #71185

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

  • Posts: 421
  • Thank you received: 102
I don't actually run Astroberry myself, but since it's free, and I have a spare micro SD card, I'm downloading it now. I'm going to try my own written instructions on a fresh Astroberry install, and see if it works. Give me an hour or two...
The following user(s) said Thank You: Jon Carleton
2 years 10 months ago #71186

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

  • Posts: 421
  • Thank you received: 102
Okay, found the problem. From a terminal, execute:
sudo mv /usr/local/bin/indi_wmh_focuser /usr/bin

You may need to reboot the Pi for it to take effect.

Let me know if that works for you.

-- Kevin
The following user(s) said Thank You: Jon Carleton
2 years 10 months ago #71189

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

  • Posts: 83
  • Thank you received: 9
Thank you that works.... Bruce
2 years 10 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 9 months ago by Jon Carleton.
2 years 9 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 9 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 9 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 9 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 9 months ago by Jon Carleton.
2 years 9 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 9 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 9 months ago by Jon Carleton.
2 years 9 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 9 months ago by Jon Carleton.
2 years 9 months ago #71898

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

Time to create page: 2.913 seconds