×
INDI Library v1.8.5 Released (19 Apr 2020)

April 2020 release of INDI Library v1.8.5 introduces new drivers while providing fixes and improvements to existing devices and core framework.

INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi

4 months 2 weeks ago
kross
Expert Boarder
Expert Boarder
Posts: 145
Karma: 2
More
Topic Author
INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi #51071
The default settings for the driver try to run at max speed, which will sacrifice some torque. Go to the options tab and increase the delay per step from 0 to 1 or 2 ms per step. See if that helps give the motor the power it needs.

Also, the sending of pulses to the stepper isn't timed as precisely as on a 3D printer, which runs a single program on a microcontroller, and not a full multitasking operating system. So on the Pi, the sending of the pulses to the stepper will never be as smooth as on a 3D printer.

BTW, I have a Creality Ender 5. What do you have?

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

4 months 2 weeks ago
esb
Senior Boarder
Senior Boarder
Posts: 54
More
INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi #51073
Now I've done it. I switched my system to root from a USB drive and I've lost the ability to drive the stepper again. I started with the same base OS (1.5.1) and everything else seems to be running fine. Iupdated the OS (apt update/upgrade), installed the dev tools, ran the above command to install the latest wiring pi and then built and installed the driver. Kstars sees it just fine, but I get nothing from the stepper when I try to move it - in or out.

I did add the driver "i2c-bcm2708" to the /etc/modules file. Maybe I missed something else? I had tried a bunch of things originally trying to get it to work when rooting from the SD card.

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

4 months 2 weeks ago
kross
Expert Boarder
Expert Boarder
Posts: 145
Karma: 2
More
Topic Author
INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi #51075
My /etc/modules has (only) i2c-dev

But I'm running Raspbian, not SM

I might have to shell out the $50 or whatever and download a copy of SM just for testing. :)

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

4 months 2 weeks ago
esb
Senior Boarder
Senior Boarder
Posts: 54
More
INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi #51077
Once I get the stepper working again, I'll try adjusting the step delay.

I've got a Prusa i3 mk3. I have a bunch of new designs for my RedCat 51. The first base to mount the stepper on one side and a quick release arca-swiss plate on the other. I created a custom ring/pulley that slides over the focuser on the RedCat that has 2GT teeth on the outside for a closed loop 2GT belt. Then a couple of enclosures to hold a Pegasus Pocket Power Box and a Anker USB hub. The enclosures are mostly open and the PPB and hub slide in with a latching end piece on each. I also created a custom case for the rPi4 with stepper hat. The hub enclosure and pi case attach to the PPB which has a dovetail on the bottom to connect to the quick release plate. That way I can easily move it to another scope (assuming I eventually get another) or to break it down for travel. I'll share pics and designs once its all complete and working.

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

4 months 2 weeks ago
esb
Senior Boarder
Senior Boarder
Posts: 54
More
INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi #51078
The latest SM releases are based on Raspbian. I'm running the exact build I was when things were working. I *thought* I did everything the same to configure things, but clearly that's not the case (unless something blew up between then and now).

SM is great in that it has everything pre-installed to work out of the box with a few useful extras. I'm also very happy to support the work that Jasem is doing. IMHO, $50 is a very small price to pay. The value in what is available here far, far exceeds that. The fact that its open source makes it even more valuable.

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

4 months 2 weeks ago
kross
Expert Boarder
Expert Boarder
Posts: 145
Karma: 2
More
Topic Author
INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi #51080
Well if they are based on Raspbian and not Ubuntu, then I'm even more confused as to why my Raspbian install worked with my driver out of the box, I didn't even need to update the wiringPi package. I'm running a Raspberry Pi 4B. gpio -v shows version 2.50.

Also, I never needed to run indiserver as root. The user I run as (pi) is a member of the gpio group in /etc/group. Is the user you're running as a member of the gpio group?
The following user(s) said Thank You JonCarleton

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

4 months 2 weeks ago
esb
Senior Boarder
Senior Boarder
Posts: 54
More
INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi #51105
And... the stepper is working again this morning. So maybe something overheated? I'll play around with the step delay to see if that helps things. I do think that using a 32 multiple with 1/32 micro steps will work OK as the amount of rotation of the focuser is almost undetectable at that step size. However that only gives me about 500 total steps from min to max and it looks like the focuser driver class may have a lower bounds of 1000 steps for the max step value (at least in the UI I can't lower it below 1000).

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

4 months 2 weeks ago 4 months 2 weeks ago by JonCarleton. Reason: Everyone knows programmers can't properly operate software.
JonCarleton
Expert Boarder
Expert Boarder
Posts: 89
More
INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi #51107
Not sure why this post happened when I added the image. Please ignore.

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

4 months 2 weeks ago
JonCarleton
Expert Boarder
Expert Boarder
Posts: 89
More
INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi #51108
Great work on this project!

I originally started with an Arduino with a HAT driving a NEMA 17. It worked, but I had to use a Java program to talk to the Arduino, as I didn't find any existing driver for INDI at the time. I use a Pi for my INDI server on the scope, so finding your solution with the WaveShare HAT was exactly what I was looking for. It was seamless and works well with the NEMA 17, given the gear setup I used to connect to the stock SkyWatcher Crayford focuser.

I am running Raspbian on the Pi4 without permission issues. However, I do plan to move to Ubuntu when they get the bugs out of their 64bit desktop version. I did try the 64bit server version, but it seemed a bit unstable on the Pi4. If I have permission issues, I can deal with them at the OS level unless you tell me there is some other reason to move to this new release. The version I used is about a month old.

Your instructions were excellent. All went as planned. I get about 2400 clicks per full focus extent out of my geared setup, and that seems good enough for my uses presently.

THANK YOU THANK YOU THANK YOU!!!!
Attachments:

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

4 months 2 weeks ago
kross
Expert Boarder
Expert Boarder
Posts: 145
Karma: 2
More
Topic Author
INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi #51114

esb wrote: And... the stepper is working again this morning. So maybe something overheated? I'll play around with the step delay to see if that helps things. I do think that using a 32 multiple with 1/32 micro steps will work OK as the amount of rotation of the focuser is almost undetectable at that step size. However that only gives me about 500 total steps from min to max and it looks like the focuser driver class may have a lower bounds of 1000 steps for the max step value (at least in the UI I can't lower it below 1000).


Wow, that is weird. If you find out definitively what caused it to stop working, be sure to let us know.

Are you still running indiserver as root? Did you need to add your user to the gpio group so you could run as non-root?

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

4 months 2 weeks ago 4 months 2 weeks ago by kross.
kross
Expert Boarder
Expert Boarder
Posts: 145
Karma: 2
More
Topic Author
INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi #51116

JonCarleton wrote: Great work on this project!

I originally started with an Arduino with a HAT driving a NEMA 17. It worked, but I had to use a Java program to talk to the Arduino, as I didn't find any existing driver for INDI at the time. I use a Pi for my INDI server on the scope, so finding your solution with the WaveShare HAT was exactly what I was looking for. It was seamless and works well with the NEMA 17, given the gear setup I used to connect to the stock SkyWatcher Crayford focuser.

I am running Raspbian on the Pi4 without permission issues. However, I do plan to move to Ubuntu when they get the bugs out of their 64bit desktop version. I did try the 64bit server version, but it seemed a bit unstable on the Pi4. If I have permission issues, I can deal with them at the OS level unless you tell me there is some other reason to move to this new release. The version I used is about a month old.

Your instructions were excellent. All went as planned. I get about 2400 clicks per full focus extent out of my geared setup, and that seems good enough for my uses presently.

THANK YOU THANK YOU THANK YOU!!!!


Jon,

Looking good! On my setup, I attached the motor directly to the fine focus knob, so no extra gear reduction was needed. If I were to attach to the coarse focus knob, then I would have needed some gear reduction like you have.

I'm very glad to hear that you got it up and running with no fuss.
The following user(s) said Thank You JonCarleton

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

4 months 2 weeks ago
esb
Senior Boarder
Senior Boarder
Posts: 54
More
INDI focuser driver for Waveshare Stepper Motor HAT for Raspberry Pi #51117
I'll have to see if it happens again. It had been making noise while holding the motor for quite a while and the motor was quite warm.

I've been setting the setuid bit on the indi_wmh_focuser executable. I'm guessing that things will work if I add the stellarmate user to the gpio group. I haven't tried that yet.

While we're sharing, here's my work in progress:

Attachments:
The following user(s) said Thank You JonCarleton

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

Time to create page: 0.808 seconds