×

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: 421
  • Thank you received: 102
Sorry Kurt, I didn't see your problem report until just now.

The driver won't start because of a permissions issue. The driver needs access to the GPIO device, which usually requires root access. The easy fix is to run indiserver as root. On at least some systems, you can add your user to the "gpio" group, which will negate the need to run as root. That seems to work on Raspbian, but not Ubuntu or Armbian.

I will try to get the driver added to 3rdParty one of these days... :)
2 years 6 months ago #75858

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

  • Posts: 67
  • Thank you received: 1
Thanks Kevin.

I'll check that tomorrow, the sun has already set today here and I want to go outside and use the clear night to take some images. Do you see a way to integrate the driver into the official INDI repo as Jasem suggested? I think it's a nice addition.

Kurt
2 years 6 months ago #75863

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

  • Posts: 1309
  • Thank you received: 226
If you'd project gets included in with the 3rd party drivers, a couple small things should be done first.
Given the DIY nature of this controller, having control panel access to selecting the microstep factors and a higher max step value will be necessary.
On my side I edited the code for micro 8 and increased max steps to work with my motor design.
This is easy enough to do when I compile it for myself. But will be difficult when included as a 3rd party driver.
The following user(s) said Thank You: Kevin Ross, Barry Dyer
2 years 6 months ago #75867

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

  • Posts: 1
  • Thank you received: 1
Is there an upper limit on gear ratios?

I have a stepper motor purchased for another project that never came to be. I'm thinking of using this one which has a 1.8 degree per step motor but a 100:1 gearbox resulting in a 0.018 degree per step (give or take) but lots of torque. I've only recently started using Astroberry but am keen to create some additional fine focus control as I've not been happy with some of the results I've had with a set and forget approach to focusing.

My scope (Skywatcher Classic 200p) has no fine focus knob, only a coarse knob so I wanted to have more steps to better control the movement and I plan to couple the motor directly to the coarse focus shaft with a coupler and will dust off the 3d printer to cobble together a housing for the motor...

Anyone else with experience of high gear ratios and any limitations or caveats to be aware of?

Thanks in advance,
Baz
The following user(s) said Thank You: Jasem Mutlaq
2 years 6 months ago #76054

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

  • Posts: 421
  • Thank you received: 102
Barry,

That motor should be fine. In the default 32x microstepping configuration, it might move a little slow. If that turns out to be the case, you can change the DIP switches on the Waveshare HAT to a lower microstepping factor, to speed things up. You will need to modify the #define MICROSTEPPING at the top of the source code file to match the DIP switches, and rebuild the driver. But it will work as is, maybe just a little slow.

-- Kevin
The following user(s) said Thank You: Barry Dyer
2 years 6 months ago #76237

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

  • Posts: 20
  • Thank you received: 4
Hi Kevin
Firstly a huge thank you for the work you've done on this driver.  It's been a lot of fun playing with getting this working on my Raspberry Pi 4 and StellarmateOS.  I have a question on microstepping and I suspect I am missing something elementary.  I have a 1.8 degree (200 steps/rev) Nema14 motor that I am trying to pair with my SVX102T refractor.  My scope has a CFZ of 111 microns and I am trying to achieve the recommended 10 steps per CFZ.  I believe that using 1/8 steps should achieve this goal, but I am a loss as to how to make the driver do this.  I tested with the Waveshare Python code (which needed to be corrected for the active high enable pin) and was able to make the stepper motor do a 1/8 rev with 200 steps:
    Motor1.SetMicroStep('hardward','1/8step')
    Motor1.TurnStep(Dir='forward', steps=200, stepdelay = 0.0001)
    time.sleep(0.5)
    Motor1.TurnStep(Dir='backward', steps=200, stepdelay = 0.0001)
    Motor1.Stop()
Questions:
  1. To make this work for the focuser, I changed the MICROSTEPPING define in wmh_focuser.cpp to 8 and set the dip switches to 110 on the board.  However, this still yields a full turn for 200 steps when I test using the Indi Control panel for the focuser. I'm sure I'm misunderstanding the intent of the MICROSTEPPING define, but for the life of my I can't figure it out. 
  2. I then figured I could put the motor onto the fine focus knob, but wouldn't that make focusing really slow?


 
2 years 4 months ago #78508

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

  • Posts: 1309
  • Thank you received: 226
I believe the way microstepping was implemented in the driver is for smoother and quieter motor movement rather than added precision. And a microstep position can only be held with constant power to the motor, which is not desirable. Your options are therefor to use gear reduction and backlash compensation.
The following user(s) said Thank You: Anand Narwani
2 years 4 months ago #78544

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

  • Posts: 1309
  • Thank you received: 226
I've been playing around lately with the hardware DIP switches, and I found that the Modes switches are orientated in a very non-intuitive way.
Switches 123 belong to motor 1
Switches 456 belong to motor 2
The Mode table is organized as Mode 2, Mode 1, Mode 0 in the documentation. I found they actually correspond to the DIP switches in reverse order.
Mode 0 is switch 1 and 4
Mode 1 is switch 2 and 5
Mode 2 is switch 3 and 6

So to set it for 1/8 step you need to set DIP 1, 2, 3 to 1, 1, 0 respectively.

  
Last edit: 2 years 2 months ago by Andrew.
2 years 2 months ago #79780
Attachments:

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

  • Posts: 144
  • Thank you received: 7
Eureka!!!
Stubborn as I am I wanted to try the waveshare stepper hat again; all worked out perfectly. Soon the report with 150PDS
Ettore
2 years 2 months ago #80361

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

  • Posts: 4
  • Thank you received: 0
  Kevin,
Can't tell you how much I appreciate the work you have done on the Waveshare Hat focuser module.  I have been working on fabricating a motor bracket for my 1990's C8 and a Nikon 70-200mm F2.8 lens.  Attached photos of the completed brackets and presently performing software calibrations for travel parameters before attempting outdoor focusing tests.
I am using a 5:1 pulley reduction on the C8 and a 6:1 reduction on the Nikon lens.
Thanks again!
Bill G

   
Last edit: 2 years 1 month ago by Bill Glynn.
2 years 1 month ago #81171
Attachments:

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

  • Posts: 421
  • Thank you received: 102
I'm glad it's working for you. I can't see your pictures, they say "You do not have permissions to access this page."
2 years 1 month ago #81203

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

  • Posts: 4
  • Thank you received: 0
Kevin,
I see that your RPi4 is attached directly to the scope. Does it have a cooling fan and if so are there no vibration concerns? I would love to fasten it to my mount but was concerned about vibration?
Bill G
2 years 1 month ago #81232

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

Time to create page: 1.163 seconds