×

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: 1275
  • Thank you received: 221
Thank you. I greatly appreciate all your efforts.
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 3 months ago #72057

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

  • Posts: 388
  • Thank you received: 95
Okay I reverted the backlash code to the old method. Please let me know if it works properly for you.

-- Kevin
1 year 3 months ago #72059

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

  • Posts: 1275
  • Thank you received: 221
Backlash looks good. Only thing I have to add is increasing the maximum backlash value from 500.
I have a high gear reduction setup and my backlash is 1020 steps, so I edited it to a maximum of 1500.
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 3 months ago #72061

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

  • Posts: 215
  • Thank you received: 16
For the record, I managed to compile the latest upload on both the x86_64 and Pi4 (running Ubuntu Mate). I did get some depreciation warnings on the Pi4 compile, but not the x86_64 (odd that). Both versions seem to work, though.

Thanks again!
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 3 months ago #72160

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

  • Posts: 388
  • Thank you received: 95
It seems there is now a rev. 2.1 of the board, which is incompatible with code for the original version. They swapped the polarity of the motor enable GPIO pin from the Pi to the HAT. As you know, when you first power up the Pi, it immediately applies power to the motor, until something (such as my driver) tells it to turn off. That's because the enable pin was active low, and since the Pi puts out zeros on all the GPIO pins on startup, it starts out with the motor enabled (and drawing power, and heating up). I guess they got enough complaints, so now the enable pin is active high. But this means existing code must now have an option to know what version of the board is installed.

So I will be adding an option to the INDI control panel at some point in the near future.
1 year 3 months ago #72169

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

  • Posts: 215
  • Thank you received: 16
Bummer, that. Just when you think it is safe to put down the crayons.
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 3 months ago #72177

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

  • Posts: 1275
  • Thank you received: 221
That's great. The enable pin setup they had was so stupid I had to add a pull up resistor to prevent the motor from melting down. Hopefully they have an updated library that will work both versions with the same instructions.
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 3 months ago #72179

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

  • Posts: 388
  • Thank you received: 95
Agreed. But no, there is no such library. The Waveshare website has sample code, two versions. One version for the old board, another version for the new board. And unfortunately, there's no way to programatically detect which board is installed. It must be left as a configuration option that the user must set.
 
1 year 3 months ago #72180

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

  • Posts: 215
  • Thank you received: 16
Hmmm...is there any marking on the board to reveal it's version? Or is this a "fire it up ant see" change? I don't see even a part number on the board.

I ask, because I've ordered a couple more boards for spares. It would be nice to know if they are old or new version.
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 3 months ago #72214

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

  • Posts: 388
  • Thank you received: 95
Yeah, the website says the new PCBs are printed with "Rev2.1", and will be anything purchased after 2021-01-05

www.waveshare.com/wiki/Stepper_Motor_HAT

So that explains why at least two users a couple months ago couldn't get the driver to work with new Waveshare boards they just bought. Doh!
 
Last edit: 1 year 3 months ago by Kevin Ross.
1 year 3 months ago #72215

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

  • Posts: 388
  • Thank you received: 95
Added a fix. On the Options tab there's an option to select the board revision (don't forget to hit Save!). Hopefully someone with the Rev 2.1 board can let me know if it works.
1 year 3 months ago #72219

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

  • Posts: 215
  • Thank you received: 16
I have two boards on the way. Will test on arrival and report.
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 3 months ago #72235

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

Time to create page: 0.383 seconds