×

INDI Library v1.9.8 Released (29 Sep 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

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

  • Posts: 6
  • Thank you received: 0
Hello DYI astromotorists :)

I have jumped the gun and got Waveshare HAT, compiled the GIT and can find XML files as per Install_Manifest:
/usr/local/bin/indi_wmh_focuser
/usr/share/indi/indi_wmh_focuser.xml

But the Focuser driver doesn't show up in the KStars/EKOS drop down list.

My suspicion is that it is because INDIServer is started by Kstars, not manually and probably I have to add this driver somewhere, but there is nothing that suggests this in the INDI setup of KStars.

And since my Raspbian skills are pretty poor, I am a bit lost what to do. Any good ideas?

ps. I have checked usr/bin/ directory and there are bunch of familiar binaries with sort of driver names (indi_ccd and similar), this doesn't have wmh_focuser binary, should I move it from build to usr/bin? (sorry if dumb question)
1 year 11 months ago #61204

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

  • Posts: 215
  • Thank you received: 16
I noticed the stock compile for indi_wmh_focuser installed it in /usr/local/bin instead of /usr/bin with the indiserver stuff. Depending on the path setup, this may or may cause your problem. Open a terminal and type:
indiserver -vvv indi_wmh_focuser
and see what it shows. Don't start KStars or it will want to kill that iteration of indiserver and start its own.
Expect that it either runs, and shows happy wmh_focuser messages, or can't find the indi_wmh_focuser driver. or if there is a hardware issue it could try to restart several times and die. If it is "lost" on the drive, you can either leave it where it is and put a symbolic link to its compiled location in /usr/bin or actually move it to /usr/bin....or something else is going on entirely.

There is a method for adding "non-distribution" drivers to the lists in Ekos, but it would be good to verify the driver works first.
SkyWatcher 10" SynScan Goto Dobsonian, SV106 Guide, ZWO ASI178MC, Svbony SV105, SV305, Pi3HQcam, Pi4, DIY WaveShare focuser, Linux Ubuntu, KStars/Ekos, Carte du Ciel/CCDCiel, AstroDMx_Capture, Siril, StarTools, GIMP
Last edit: 1 year 11 months ago by Jon Carleton.
1 year 11 months ago #61210

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

  • Posts: 215
  • Thank you received: 16
Since a power discussion has returned..after a fashion... I have made (and verified) an observation regarding the Waveshare board with the Pi4B. If you try to run the Pi4B by flipping the switch and powering the Pi from the Waveshare board, you'll suffer low voltage issues. This does not happen with a Pi3, as it seems very happy with the power output provided by the Waveshare board. Also, if you power the Pi4B via its own USB port, you must turn that switch on the Waveshare board to OFF or things tend to get unhappy. Running the Waveshare board with its own supply and the Pi4 with its own supply works very well as long as the switch is in the OFF position on the Waveshare board.

I also recommend a case (if you can find one) for a Pi4 with a side mounted fan when using the Waveshare board. The board blocks the flow from a top mounted fan and a bottom mounted fan is just useless from the start. You really need a fan with a Pi4, even running separate power supplies and plastering heat sinks all over the place.
SkyWatcher 10" SynScan Goto Dobsonian, SV106 Guide, ZWO ASI178MC, Svbony SV105, SV305, Pi3HQcam, Pi4, DIY WaveShare focuser, Linux Ubuntu, KStars/Ekos, Carte du Ciel/CCDCiel, AstroDMx_Capture, Siril, StarTools, GIMP
The following user(s) said Thank You: Dainius Urbanavicius
1 year 11 months ago #61212

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

  • Posts: 6
  • Thank you received: 0
Thanks Jon for your insights. I have already noticed low voltage warning, but was sure it was due large USB dock that I have attached during the SD card upgrade. If the power voltage issue is real, then half of the convenience powering everything with 12V plug via Pegasus Power Box is going straight to the trashcan... I will try your solutions later today and see if this works. Thanks again!
1 year 11 months ago #61228

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

  • Posts: 6
  • Thank you received: 0

Jon, you were right - the binary sits in usr/local/bin... I have started INDI as you recommended here is what I got, but even if I try starting EKOS the driver is not in the list:

stellarmate@stellarmate:~ $ indiserver -vvv indi_wmh_focuser
2020-10-08T13:50:34: startup: indiserver -vvv indi_wmh_focuser
2020-10-08T13:50:34: Driver indi_wmh_focuser: pid=1576 rfd=3 wfd=6 efd=7
2020-10-08T13:50:34: listening to port 7624 on fd 4
2020-10-08T13:50:34: Driver indi_wmh_focuser: sending msg copy 1 nq 1:
<getProperties version='1.7'/>

2020-10-08T13:50:34: Driver indi_wmh_focuser: read defSwitchVector Waveshare Motor HAT Focuser CONNECTION Idle rw
CONNECT='Off'
DISCONNECT='On'
2020-10-08T13:50:34: Driver indi_wmh_focuser: read defTextVector Waveshare Motor HAT Focuser DRIVER_INFO Idle ro
DRIVER_NAME='Waveshare Motor HAT Focuser'
DRIVER_EXEC='indi_wmh_focuser'
DRIVER_VERSION='1.0'
DRIVER_INTERFACE='8'
2020-10-08T13:50:34: Driver indi_wmh_focuser: read defSwitchVector Waveshare Motor HAT Focuser DEBUG Idle rw
ENABLE='Off'
DISABLE='On'
2020-10-08T13:50:34: Driver indi_wmh_focuser: read defNumberVector Waveshare Motor HAT Focuser POLLING_PERIOD Idle rw
PERIOD_MS='1000'
2020-10-08T13:50:34: Driver indi_wmh_focuser: read defSwitchVector Waveshare Motor HAT Focuser CONFIG_PROCESS Idle rw
CONFIG_LOAD='Off'
CONFIG_SAVE='Off'
CONFIG_DEFAULT='Off'
CONFIG_PURGE='Off'
1 year 11 months ago #61242

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

  • Posts: 215
  • Thank you received: 16
The good news on that test is that indiserver is finding the driver and it seems to be loading properly. I don't use Ekos anymore, but I'll fire it up and see if I can remember what you have to do to load an "unknown driver." I seem to remember there was a process.

I no longer have my voltage alerts on the Pi4 since I separated the power for the HAT and the Pi board. Another thing to look out for, since you mentioned USB, Certain powered USB3 hubs cause some issues with WiFi connectivity when plugged into the USB3 port. This seems to be intermittent, so it may be limited to my setup. I switched USB hubs and the problem seemed to pass, but I am still not sure my WiFi performance is what it once was.

I'll report back on the Ekos setup.
SkyWatcher 10" SynScan Goto Dobsonian, SV106 Guide, ZWO ASI178MC, Svbony SV105, SV305, Pi3HQcam, Pi4, DIY WaveShare focuser, Linux Ubuntu, KStars/Ekos, Carte du Ciel/CCDCiel, AstroDMx_Capture, Siril, StarTools, GIMP
1 year 11 months ago #61270

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

  • Posts: 215
  • Thank you received: 16
Yeah...there is a Custom Driver tab in Ekos. You have the [+] icon for adding profiles, next right is the [pencil] for editing profiles, then [-] for deleting profiles and THEN, [[some odd square thing] which invokes the Custom Driver Setup.

In my version of KStars/Ekos, the Waveshare Motor HAT Focuser is already there, but that may just be due to my installing it some time ago. I've slept since then. Anyway, putting in a new driver is fairly logical.

SkyWatcher 10" SynScan Goto Dobsonian, SV106 Guide, ZWO ASI178MC, Svbony SV105, SV305, Pi3HQcam, Pi4, DIY WaveShare focuser, Linux Ubuntu, KStars/Ekos, Carte du Ciel/CCDCiel, AstroDMx_Capture, Siril, StarTools, GIMP
1 year 11 months ago #61272
Attachments:

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

  • Posts: 6
  • Thank you received: 0
Jon, many thanks! Adding custom driver didn't work, but you gave me idea to copy driver from usr/local/bin to usr/bin and it appeared in the list and WORKED! Super thanks for your help! Now off to get a motor and tuning the setup :)
1 year 11 months ago #61293

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

  • Posts: 1275
  • Thank you received: 221
Thank you for your work. I have been inspired to upgrade my motor controller board from the Adafruit HAT to this new one from Waveshare.
Question: Kaczorek pointed out that is can "remember focuser position between runs". Does this mean it stores stepper position on the board? Will it therefore know the position in the focus module when started, or when recovering from a crash?
I have been frustrated by restarting after the occasional crash and the focuser position being reset to zero. Requiring me to intervene to give it room to work with.
INDI/KStars on Raspberry Pi 4, 4gb
Raspbian Buster with AstroPi3 script configuration
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG/ASI120mm @280mm Guide Scope
PHD2
Waveshare Stepper Motor Board - DIY Focuser
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.
1 year 11 months ago #61313

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

  • Posts: 1117
  • Thank you received: 182
I am using MyFocuserPro and that stores the stepper position in the configuration on my Pi4. It always starts out at the last position the focuser was in. Or I can use a Preset and then move to the appropriates starting position, if I prefer.
Atlas Pro AZ-EQ, ASI1600MM-Pro, ASI120MM-S, ES102ED, WO-Z61, Nikon D3300, ASI-EFW, ZWO LRGB,Ha,O3,S2 filter set
1 year 11 months ago #61314

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

  • Posts: 215
  • Thank you received: 16
The indi_wmh_focuser driver stores the absolute position between 0 and the total number of motor/gear positions for your particular setup. The total number being a variable you set in the INDI control panel and is thereby saved in the configuration. If the client dies, the number remains valid in driver memory until the original client (reactivated,) or another some other client, manipulates the focuser once again. If the indiserver or driver dies, the absolute position data is lost.

It may be that storing the configuration prior to a crash or prior to a disconnect would also save the absolute position data, but I never do this. I generally startup the scope with the focuser at 0, then use a preset to go to my initial setting.
SkyWatcher 10" SynScan Goto Dobsonian, SV106 Guide, ZWO ASI178MC, Svbony SV105, SV305, Pi3HQcam, Pi4, DIY WaveShare focuser, Linux Ubuntu, KStars/Ekos, Carte du Ciel/CCDCiel, AstroDMx_Capture, Siril, StarTools, GIMP
1 year 11 months ago #61333

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

  • Posts: 1275
  • Thank you received: 221
Thank you for bringing this new controller board to our attention and for all your efforts in creating the driver for it. I must say, this controller is far superior in every way to the adafruit motor hat. My motor can now run smoother, quicker and quieter with much greater torque.
I haven't had an opportunity to use it in the field yet, but I expect it will perform much more reliably.
INDI/KStars on Raspberry Pi 4, 4gb
Raspbian Buster with AstroPi3 script configuration
Skywatcher HEQ5 Pro Mount
Canon 600D Camera
Orion SSAG/ASI120mm @280mm Guide Scope
PHD2
Waveshare Stepper Motor Board - DIY Focuser
Adafruit GPS Module
Generic Bluetooth Joystick.
Startech 7 port powered USB Hub.
1 year 11 months ago #61978

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

Time to create page: 0.732 seconds