×

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: 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..
1 year 7 months ago #86231

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

  • Posts: 421
  • Thank you received: 102
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: 1 year 7 months ago by Kevin Ross.
1 year 7 months 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!
1 year 7 months ago #86233

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

  • Posts: 421
  • Thank you received: 102
1 year 7 months ago #86234

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

  • Posts: 1
  • Thank you received: 0
1 year 5 months ago #88442

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

  • Posts: 643
  • Thank you received: 62
Hi!

Following up on this, as I'm in the process of re-arranging my stuff: How far from the motor can you place the R-Pi wit the HAT? I would prefer to have my R-Pi below the whole mount, as I find that when it sits on top of the OTA, that seems to result in weaker wifi signal (OTA is metallic). Placing the R-Pi below the mount means I need a powered USB-hub, but that is good anyway, but how can I handle the cables for the stepper motor...? All ideas welcome!

Magnus
1 year 3 months ago #89494

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

  • Posts: 643
  • Thank you received: 62
Hi!

And a problem: I have installed the Waveshare Hat on my R-Pi 4, running SM 1.7.4. Followed the instruction on Github, to download and build the driver, and I can now find the Wavehat Motor HAT Focuser in Ekos, and connect to it. Everything looks good, so far. However, I can not find a setting for adjusting microstepping in Indi window - should there not be one?
The problem: the stepper motor does not move at all. WHen starting the indiserver via Ekos, there is a faint click in the motor. Some other very faint ticks, but nothing else. It becomes warm after a while so seemingly getting power.

I saw there were issues with gpio permissions before. Not sure though what I should check to understand that - as I understood it from far earlier in this thread, it was fixed.
So what can I do? What to check and change? (I am not a coder nor an electrical engineer, but farily good with a multimeter and a soldering iron).

Magnus
1 year 3 months ago #89497

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

  • Posts: 1309
  • Thank you received: 226
I've used a 6 foot DB9 cable to reach the motor and it seems fine.
In the driver you can not change the microstep mode, but you can adjust the delay.
Also you described the motor making a noise and warming up. That is the enabled mode. It's not desirable. There are two revisions of the board. Rev 1 enable pin pulled low, Rev 2 enable pin pulled high (if I recall correctly). If you bought it recently you probably have rev 2 and need to set that in the indi driver.
The following user(s) said Thank You: Magnus Larsson
Last edit: 1 year 3 months ago by Andrew.
1 year 3 months ago #89499

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

  • 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.

Time to create page: 0.646 seconds