×

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

Thanks, Andrew!!
As for the cable: 6 feet sounds good - translates to some 180 cm in Europe, right? :) How do you connect it to the board then? Right now I'm using the white connector (don't know the name of it) but I can't make any of those myself, for an extension cable.

And thanks for the advice on the board! In the Indi panel, there is an option for "Original" or "2.1" version of board. Setting it to 2.1 made the motor stop (the very low) buzzing and suddenly it moves! Great!!!

But: no coil power - how does it then hold the position? On all my 3 previous DIY stepper motor focusers, I have used an option for "coil power" to hold the focuser in position.

Secondly: I cen see in this thread that others have asked about the microstepping, and I really do not get it. I seem to get full steps - 200 makes a full rotation (360 degrees), which is far less than the 1/32 microstep should do. So how does this really work?

If I want to change the microstepping - would need to solder the resistors (according to the description of the HAT), right? And then set the DIP switches AND adjust the driver? (I'll try to aviod this but good to know)

Magnus
1 year 3 months ago #89502

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

  • Posts: 1309
  • Thank you received: 226
Hold coil power is an electronic break in a sense. I could see that being useful for some with heavy loads and poor focusers that can slip. But I do not have that issue. Motors in a hold state will also use power and can get hot. So it has drawbacks too. I also have a geared drive that can not be back driven.

I have a custom enclosure for the Pi with a mounted db9 socket with wires soldered to leads on the HAT.

You only need to change the dip switches to select the microstep mode. But for more customized tuning, a few modifications to the code and self compiling it is an option.
1 year 3 months ago #89503

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

  • 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 3 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 3 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 3 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 3 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 3 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 3 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 3 months ago #89667

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

  • Posts: 144
  • Thank you received: 7
1 year 3 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.

Time to create page: 0.449 seconds