×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Astroberry Focuser with Adafruit Motor HAT

  • Posts: 1309
  • Thank you received: 226
It isn't working hard enough to get warm. But I can monitor the current it is using. The current remains elevated while in stop position, drawing an additional 0.2A at 12V. It definitely resists being turned in that state. I would agree with 'break/cost mode'

I opened it up to get a better look at the main gear shaft. My excessive backlash was mostly due to my 3D printed gear slacking up. I shimmed it with something and now backlash is only 20 steps. I will probably add a proper setscrew next time I can reprint it.

1 full rotation of the main shaft is 10212 steps through the planetary gear reduction of ~51:1

It appears this was an issue while connecting to the Indi Server via KStars Lite. (A step I took while trying to work out how to connect in KStars, to verify it was running.) It wouldn’t be due to power drop simply because the Motor Hat has its own separate power supply. I will monitor this as I go.
6 years 10 months ago #17056

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

  • Posts: 983
  • Thank you received: 375
As far as I can see from your previous post in this thread you only need 1,75 focus knob turn to travel from minimum to maximum. To make sure you get required precision you need to calculate actual travel of your focuser (in millimetres) per step. This value should be within critical focus zone value, which you can calculate here . Depending on your results I need to use proper stepping mode in the code (single, double, interleave, microstep).

There's no dedicated function for disabling break/costing mode in the library but I will come up with some solution.
6 years 10 months ago #17059

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

  • Posts: 1309
  • Thank you received: 226
1 Full main drive gear 10212 steps. Increased by gear on focus knob by 20:25. Factor of 0.8
8170 Steps for 1 full knob rotation. [10212*0.8]
14297 steps for full travel [8170*1.75]
Total Focuser Travel 40mm
0.0027mm/step [40mm/14297 steps]
2.7 microns per step
Critical Focus Zone 62 microns. Or 0.62mm

This should work well :)
The following user(s) said Thank You: Radek Kaczorek
6 years 10 months ago #17075

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

  • Posts: 1309
  • Thank you received: 226

I was looking around for some examples of code for this and found one with a variable for Break. This is not my expertise, but maybe it's an example for what you are looking for.
github.com/adafruit/Adafruit-Motor-HAT-P...t_MotorHAT_Motors.py
6 years 10 months ago #17086

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

  • Posts: 983
  • Thank you received: 375
Good point!. In the python library BRAKE and RELEASE modes are explicitly defined and are available. I just noted they are also declared in C++ library . I will try using RELEASE in the driver's code and let you know when it's ready for tests (probably over weekend).
6 years 10 months ago #17087

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

  • Posts: 983
  • Thank you received: 375
After closer look I found out that RELEASE function is not implemented in C++ library. Therefore release is achieved by resetting all PWMs after stepper motor finishes its travel to destination. You can checkout the latest code from github for testing.
6 years 10 months ago #17132

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

  • Posts: 1309
  • Thank you received: 226
Today I mounted everything together and took the motor for a proper spin. I can confirm 14,000 steps is all I need for full travel.
The process takes about 225 seconds. It's rather slow, but I can live with it as my prime focus is mostly in. But if it is safe to increase speed, that would be nice.
I also found more backlash in my complete drive train. 100 doesn't appear to be enough after all, 300 or 400 should do the trick.
Final thought, as a driver for DIY focusers, other users may desire the ability to select within options the drive mode (Single, Double, Interleave Microstep) that best suits their choice of hardware. For instance if somebody chooses a stepper with 5:1 or even no gear reduction; they would probably benefit from Microsteps.
6 years 10 months ago #17133

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

  • Posts: 1309
  • Thank you received: 226
Excellent. I'll have a look right away.
6 years 10 months ago #17134

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

  • Posts: 983
  • Thank you received: 375
I'm glad everything works for you.
The speed value cannot be higher than 255 and now the driver lets you set maximum 250. So it's rather the problem of high gear reduction ratio for the motor than slow speed. I will increase maximum backlash right away. Checkout the sources in 5 minutes.
Let me add selection of various modes in a future release.
6 years 10 months ago #17135

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

  • Posts: 1309
  • Thank you received: 226
It looks like resetting the PWM did the trick. Nice work!
6 years 10 months ago #17136

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

  • Posts: 1309
  • Thank you received: 226
I had a chance to use it tonight. And hats off to you Kaczorek, the driver works beautifully.
All I have left to do is address a few mechanical details. Even so the autofocus routine did settle on a good focus after about 10 shots.
Thank you very much.
6 years 10 months ago #17148

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

  • Posts: 983
  • Thank you received: 375
Have a good time while focusing ;-)
The following user(s) said Thank You: Andrew
6 years 10 months ago #17156

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

Time to create page: 0.277 seconds