×

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: 643
  • Thank you received: 62
Hi!

Thanks, clarifying.

However, microstepping: Is my HAT now, when I have not done anything but install it, doing microstepping with 1/32 steps? Because it looks like it does FULL steps.

Magnus
1 year 2 months ago #89504

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

  • Posts: 1309
  • Thank you received: 226
The way the driver itself is written is not setting any particular step state. It simply commands it to take an integer number of steps, but there is a variable to scale that integer relative to the microstep dip switch setting. Not changing one or the other will have consequences in terms of speed and step angle. Or the wrong scaling can cause you to run up to the step limit.
I have an earlier post in this thread that explains how the dip switches actually behave.
1 year 2 months ago #89505

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

  • Posts: 421
  • Thank you received: 102
I also use a DB9 cable. The reason I chose a DB9 cable as opposed to something else, is because my Moonlite focuser comes with a DB9 connector. So I wired my DIY focuser the same, so I could swap back and forth between the Moonlite focuser and the DIY focuser, with the same HAT controller. As for how do I connect it to the HAT? I have a panel-mount DB9 connector in the side of my case, that I wire to the HAT. Here's a 3D rendering of the case I designed for my ODroid N2+ with Waveshare HAT.





As for the microstepping, the driver does not allow controlling the microstepping via software. It uses microstepping, but not for increased resolution, but only for quietness and smoothness. The reason is, to hold position on a microstep would require powering the motor continuously, causing it to get very hot, unless you adjust the potentiometer to limit the current. Also, stepper motors suck at holding position on a microstep. This HAT doesn't allow software control of current limiting either. So even though you have 32x microstepping enabled, the driver will always step a multiple of 32 steps, so that it always ends on a full step.

I've actually not heard of anyone needing the extra resolution of 32x microstepping to autofocus. Personally I use a stepper motor with .9 degrees per step (most are 1.8 degrees per step), and having that attached directly to the fine focus knob gives me all the resolution I need. I guess if you attached to the coarse focus knob you'd need extra resolution, but then the stepper motor usually won't have enough torque, and you would need one with a built-in gearbox, in which case you would have more than enough resolution anyway, with the gearbox.

Can you tell us more about your setup?

-- Kevin
1 year 2 months ago #89511
Attachments:

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

  • Posts: 222
  • Thank you received: 20
I too have about a 2m cable. I got a couple of RJ11 breakout boards so I can just use whatever telephone cable is handy.
1 year 2 months ago #89513

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

  • Posts: 643
  • Thank you received: 62
Hi!

Great, thanks!

My setup: this is for a C8 with a Moonlite focuser, on which I have attached a stepper motor directly to the focusing shaft (not the microfocuser). My current stepper motor seems to have given up (it's almost 10 years old) so I'm thinking on replacing it. And I've been using a DIY MyFocuserPro box to control it. If I get rid of the control-box, the setup is simpler. And I can now choose which stepper motor to use. Currently, I have 2 steppers lying around: one NEMA 17 wiith no gearbox and one with a 5:1 planetary gearbox. I guess the one with the gearbox is what I need now.

I can freely choose the connectors, and if I use a 1,5 - 2 m cable, I can place my Raspberry below the mount, where I prefer to have it. On my other focusers, I have DB9 connectors, which makes it easy to switch. I like the RJ11 connectors, light and easy, but somehow trust the DB9 more even though bulkier.

Your box looks nice, Kevin - 3D-printed? If so, would you consider sharing the files?

Magnus

Magnus
1 year 2 months ago #89523

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

  • Posts: 144
  • Thank you received: 7
Good morning.
I updated to Kstars 3.6.2 but just tested the focuser didn't work. I recompiled but got this error. It worked fine before

osservatorio@raspberrypi:~/indi-wmh-focuser/build $ make
Scanning dependencies of target indi_wmh_focuser
[ 33%] Building CXX object CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o
/home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp: In member function ‘virtual bool IndiWMHFocuser::initProperties()’:
/home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:151:23: error: ‘INDI::PropertyView<T>* INDI::PropertyBasic<T>::operator&() [with T = _ISwitch]’ is protected within this context
151 | registerProperty(&BoardRevisionSP);
| ^~~~~~~~~~~~~~~
In file included from /usr/include/libindi/indipropertytext.h:21,
from /usr/include/libindi/basedevice.h:30,
from /usr/include/libindi/parentdevice.h:3,
from /usr/include/libindi/defaultdevice.h:21,
from /usr/include/libindi/indifocuser.h:21,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.h:24,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:32:
/usr/include/libindi/indipropertybasic.h:101:27: note: declared protected here
101 | PropertyView<T> * operator &();
| ^~~~~~~~
/home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp: In member function ‘virtual bool IndiWMHFocuser::updateProperties()’:
/home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:180:25: error: ‘INDI::PropertyView<T>* INDI::PropertyBasic<T>::operator&() [with T = _ISwitch]’ is protected within this context
180 | defineProperty(&FocusParkingSP);
| ^~~~~~~~~~~~~~
In file included from /usr/include/libindi/indipropertytext.h:21,
from /usr/include/libindi/basedevice.h:30,
from /usr/include/libindi/parentdevice.h:3,
from /usr/include/libindi/defaultdevice.h:21,
from /usr/include/libindi/indifocuser.h:21,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.h:24,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:32:
/usr/include/libindi/indipropertybasic.h:101:27: note: declared protected here
101 | PropertyView<T> * operator &();
| ^~~~~~~~
/home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:181:25: error: ‘INDI::PropertyView<T>* INDI::PropertyBasic<T>::operator&() [with T = _ISwitch]’ is protected within this context
181 | defineProperty(&FocusResetSP);
| ^~~~~~~~~~~~
In file included from /usr/include/libindi/indipropertytext.h:21,
from /usr/include/libindi/basedevice.h:30,
from /usr/include/libindi/parentdevice.h:3,
from /usr/include/libindi/defaultdevice.h:21,
from /usr/include/libindi/indifocuser.h:21,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.h:24,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:32:
/usr/include/libindi/indipropertybasic.h:101:27: note: declared protected here
101 | PropertyView<T> * operator &();
| ^~~~~~~~
/home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:182:25: error: ‘INDI::PropertyView<T>* INDI::PropertyBasic<T>::operator&() [with T = _INumber]’ is protected within this context
182 | defineProperty(&MotorSpeedNP);
| ^~~~~~~~~~~~
In file included from /usr/include/libindi/indipropertytext.h:21,
from /usr/include/libindi/basedevice.h:30,
from /usr/include/libindi/parentdevice.h:3,
from /usr/include/libindi/defaultdevice.h:21,
from /usr/include/libindi/indifocuser.h:21,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.h:24,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:32:
/usr/include/libindi/indipropertybasic.h:101:27: note: declared protected here
101 | PropertyView<T> * operator &();
| ^~~~~~~~
/home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:183:25: error: ‘INDI::PropertyView<T>* INDI::PropertyBasic<T>::operator&() [with T = _INumber]’ is protected within this context
183 | defineProperty(&FocusBacklashNP);
| ^~~~~~~~~~~~~~~
In file included from /usr/include/libindi/indipropertytext.h:21,
from /usr/include/libindi/basedevice.h:30,
from /usr/include/libindi/parentdevice.h:3,
from /usr/include/libindi/defaultdevice.h:21,
from /usr/include/libindi/indifocuser.h:21,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.h:24,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:32:
/usr/include/libindi/indipropertybasic.h:101:27: note: declared protected here
101 | PropertyView<T> * operator &();
| ^~~~~~~~
/home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp: In member function ‘virtual bool IndiWMHFocuser::saveConfigItems(FILE*)’:
/home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:281:29: error: ‘INDI::PropertyView<T>* INDI::PropertyBasic<T>::operator&() [with T = _INumber]’ is protected within this context
281 | IUSaveConfigNumber(fp, &MotorSpeedNP);
| ^~~~~~~~~~~~
In file included from /usr/include/libindi/indipropertytext.h:21,
from /usr/include/libindi/basedevice.h:30,
from /usr/include/libindi/parentdevice.h:3,
from /usr/include/libindi/defaultdevice.h:21,
from /usr/include/libindi/indifocuser.h:21,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.h:24,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:32:
/usr/include/libindi/indipropertybasic.h:101:27: note: declared protected here
101 | PropertyView<T> * operator &();
| ^~~~~~~~
/home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:282:29: error: ‘INDI::PropertyView<T>* INDI::PropertyBasic<T>::operator&() [with T = _INumber]’ is protected within this context
282 | IUSaveConfigNumber(fp, &FocusBacklashNP);
| ^~~~~~~~~~~~~~~
In file included from /usr/include/libindi/indipropertytext.h:21,
from /usr/include/libindi/basedevice.h:30,
from /usr/include/libindi/parentdevice.h:3,
from /usr/include/libindi/defaultdevice.h:21,
from /usr/include/libindi/indifocuser.h:21,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.h:24,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:32:
/usr/include/libindi/indipropertybasic.h:101:27: note: declared protected here
101 | PropertyView<T> * operator &();
| ^~~~~~~~
/home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:283:29: error: ‘INDI::PropertyView<T>* INDI::PropertyBasic<T>::operator&() [with T = _ISwitch]’ is protected within this context
283 | IUSaveConfigSwitch(fp, &FocusParkingSP);
| ^~~~~~~~~~~~~~
In file included from /usr/include/libindi/indipropertytext.h:21,
from /usr/include/libindi/basedevice.h:30,
from /usr/include/libindi/parentdevice.h:3,
from /usr/include/libindi/defaultdevice.h:21,
from /usr/include/libindi/indifocuser.h:21,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.h:24,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:32:
/usr/include/libindi/indipropertybasic.h:101:27: note: declared protected here
101 | PropertyView<T> * operator &();
| ^~~~~~~~
/home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:284:29: error: ‘INDI::PropertyView<T>* INDI::PropertyBasic<T>::operator&() [with T = _ISwitch]’ is protected within this context
284 | IUSaveConfigSwitch(fp, &BoardRevisionSP);
| ^~~~~~~~~~~~~~~
In file included from /usr/include/libindi/indipropertytext.h:21,
from /usr/include/libindi/basedevice.h:30,
from /usr/include/libindi/parentdevice.h:3,
from /usr/include/libindi/defaultdevice.h:21,
from /usr/include/libindi/indifocuser.h:21,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.h:24,
from /home/osservatorio/indi-wmh-focuser/wmh_focuser.cpp:32:
/usr/include/libindi/indipropertybasic.h:101:27: note: declared protected here
101 | PropertyView<T> * operator &();
| ^~~~~~~~
make[2]: *** [CMakeFiles/indi_wmh_focuser.dir/build.make:82: CMakeFiles/indi_wmh_focuser.dir/wmh_focuser.cpp.o] Errore 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/indi_wmh_focuser.dir/all] Errore 2
make: *** [Makefile:149: all] Errore 2
1 year 2 months ago #89652

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

  • Posts: 421
  • Thank you received: 102
Okay, I just made a commit that should fix that.
1 year 2 months ago #89667

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

  • Posts: 144
  • Thank you received: 7
1 year 2 months ago #89672

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

  • Posts: 144
  • Thank you received: 7
Hello Kevin is possible to compile software focuser for indigo driver?

www.indigo-astronomy.org/hardware.html
I wait your response.
Thank.
Ettore
1 year 2 months ago #89846

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

  • Posts: 421
  • Thank you received: 102
I have no idea, I never tried. But Indigo is compatible with INDI drivers (or so I'm told). But I'm traveling this week, so I won't be able to do any work on it until I'm back home.
1 year 2 months ago #89854

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

  • Posts: 144
  • Thank you received: 7
It's not exactly compatible, but I'm waiting for it to come back.
Ettore
1 year 2 months ago #89857

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

  • Posts: 2
  • Thank you received: 0
Hi Kevin, I'm new to RPi4/Linux/Debian, and would appreciate some help installing this driver - it keeps coming up with error message
stellarmate@stellarmate:~ $ cd indi-wmh-focuser
stellarmate@stellarmate:~/indi-wmh-focuser $ cd build
stellarmate@stellarmate:~/indi-wmh-focuser/build $ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
sudo make install
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:7 (PROJECT):
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "/home/stellarmate/indi-wmh-focuser/build/CMakeFiles/CMakeOutput.log".
See also "/home/stellarmate/indi-wmh-focuser/build/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target 'install'. Stop.
stellarmate@stellarmate:~/indi-wmh-focuser/build $

Any help appreciated
Thanks, Tom
10 months 3 weeks ago #92621

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

Time to create page: 3.737 seconds