×

INDI Library v1.9.9 Released (30 Nov 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: 37
  • Thank you received: 3
What is your motor micro-stepping set at? The plugin is hardcoded to 32 steps which is what the waveshare comes pre-configured with.
I would set your controller to a single step, and build the plugin again with the step size set to 1 as well, and try that.
2 months 4 weeks ago #86226

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

  • Posts: 10
  • Thank you received: 0
I checked the wiring multiple times and actually also switched the dir and stp wire, but had the same result. Is it possible that only single gpios don't work for a reason e.g. the step gpio pin?
I have not a great knowledge about steppers so this question might seem a little dumb but is the frequency directly controlled by the delay time or is there an additional parameter that can be tuned? Because it just seems to me that the motor brings up the torque needed (I tried turning it by hand when it was running/but not moving and it held position quite sturdy), but maybe it misses to hold up the frequency of the controller.
Sadly I don't have an oscilloscope, only a multimeter..
Setting it up with the raspberry pi would take quite a while, I would have to set up the whole OS new, but I'll give it a try if I don't get this to work sooner..
2 months 4 weeks ago #86227

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

  • Posts: 10
  • Thank you received: 0
I also thought about that and I actually tried it without success.. I tried the hardcoded 32 with the extension board set to 1 1 1 and also all other different configurations, and I changed the value in the script to 1 and set the extension board to 0 0 0 (also here I tried all other different configurations).
Last edit: 2 months 4 weeks ago by Simon.
2 months 4 weeks ago #86228

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

  • Posts: 415
  • Thank you received: 99
The frequency is directly controlled by the delay time. Nothing else.

You can use your multimeter to see if the step line is getting pulsed. You'll probably have to set it to AC mode.

If you think the step pin isn't getting properly pulsed, we can certainly try a different GPIO pin, in case something in the OS is interfering.

Before we try that, let's make sure the kernel module I was talking about isn't interfering with you. On my Rock Pi setup, I needed to blacklist snd_soc_rockchip_i2s

From the command line, try "sudo rmmod snd_soc_rockchip_i2s" and try the focuser, see if that makes any difference. Of course if you get an error that the module wasn't loaded in the first place, then that's definitely not the problem.
2 months 4 weeks ago #86229

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

  • Posts: 10
  • Thank you received: 0
Okay, I tried the command and it gave me an error that it is in use.. "sudo lsmod | grep snd_soc_rockchip_i2s" shows that it's used by snd_soc_rockchip_pcm and snd_soc_core. Is it safe to force remove it with "sudo rmmod -f snd_soc_rockchip_i2s"?

I used the multimeter to measure directly at the accessible soldering points of the DRV8825. I measured between the GND and STP pin in AC mode and while the motor should have been moving I got 0V in AC mode, interestingly in DC mode I measured ~0.120V while the motor was enabled/beeping and 0.02V while it was off. So GPIO_A5 (#35) where the STP pin is connected to, is sending a DC signal instead of pulses..
2 months 4 weeks ago #86231

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

  • Posts: 415
  • Thank you received: 99
In /etc/modprobe.d/blacklist.conf (create the file if it doesn't exist) add:
blacklist snd_soc_rockchip_i2s

and reboot. See if that helps.
Last edit: 2 months 4 weeks ago by Kevin Ross.
2 months 4 weeks ago #86232

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

  • Posts: 10
  • Thank you received: 0
I just tried something and I didn't think it would work but I used another GPIO for the step pin.. In wmh_focuser.cpp I changed it to:
#define M1_STEP_CHIP "gpiochip4"
#define M1_STEP_PIN 18
instead of 5.
So I'm using pin number 11 which has function1=PWM0 (see GPIO image on wiki.radxa.com/Rockpi4/hardware/gpio ).
It works like a charm I'm so happy :D
Thank's a lot for your help!
2 months 4 weeks ago #86233

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

  • Posts: 415
  • Thank you received: 99
2 months 4 weeks ago #86234

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

  • Posts: 1
  • Thank you received: 0
2 weeks 2 days ago #88442

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

Time to create page: 0.944 seconds