Welcome, Guest
Username: Password: Remember me
27 Feb 2017
INDI development team is happy to announce the release of INDI Library v1.4.0. This new exciting release builds on the maturity of INDI Library and comes with many new supported devices and fixes for existing drivers. Several improvements and enhancements are included in this release including native support for Cygwin and MacOS platforms in addition to Linux, BSD, and Windows (Client only).
Read More...

TOPIC: Astroberry Focuser with Adafruit Motor HAT

Astroberry Focuser with Adafruit Motor HAT 1 month 4 days ago #16887

  • Ihoujin
  • Ihoujin's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 146
  • Thank you received: 6
Oh no. That's not good.

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

Astroberry Focuser with Adafruit Motor HAT 1 month 4 days ago #16889

  • Ihoujin
  • Ihoujin's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 146
  • Thank you received: 6
I'm trying to exercise my Google Fu and have come up with a couple results, it would seem other's have the same issue.
www.chiefdelphi.com/forums/showthread.php?p=1598518
github.com/threebrooks/AdafruitStepperMotorHAT_CPP
www.raspberrypi.org/forums/viewtopic.php?t=112415&p=908267
mjmeans.github.io/Adafruit.IoT/doc/html/...21e-7d84815c826d.htm

I hope some of this can be of use.

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

Astroberry Focuser with Adafruit Motor HAT 1 month 3 days ago #16902

  • Kaczorek
  • Kaczorek's Avatar
  • Away
  • Gold Boarder
  • Gold Boarder
  • Posts: 297
  • Karma: 1
  • Thank you received: 95
It seems that the second link would be quite useful. So we're back to the game ;-)
The following user(s) said Thank You: Ihoujin

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

Last Edit: by Kaczorek.

Astroberry Focuser with Adafruit Motor HAT 4 weeks 21 hours ago #16992

  • Kaczorek
  • Kaczorek's Avatar
  • Away
  • Gold Boarder
  • Gold Boarder
  • Posts: 297
  • Karma: 1
  • Thank you received: 95
Hi, I have just finished the first version of the focuser driver for Adafruit Motor HAT.

Check it out at https://github.com/rkaczorek/astroberry-amh

I have developed it without hardware so please test it and let me know how it goes. Please be careful with stepper speed option.

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

Last Edit: by Kaczorek.

Astroberry Focuser with Adafruit Motor HAT 4 weeks 20 hours ago #16993

  • Ihoujin
  • Ihoujin's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 146
  • Thank you received: 6
That's Fantastic! I am out of town this weekend, but will eagerly test it once I'm back. Thank you.

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

Astroberry Focuser with Adafruit Motor HAT 3 weeks 5 days ago #17033

  • Ihoujin
  • Ihoujin's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 146
  • Thank you received: 6
I encountered an error in the final Make Install step
Never Mind. Must first install WiringPi.

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

Last Edit: by Ihoujin.

Astroberry Focuser with Adafruit Motor HAT 3 weeks 5 days ago #17034

  • Ihoujin
  • Ihoujin's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 146
  • Thank you received: 6
Ok. I got it working! :woohoo:
I am accustomed to running everything from a profile in Ekos. So starting it from terminal was a challenge for me, and the folder /var/run/indi does not exist on my system. How can I add it to the list for focusers in the Ekos Profile Editor?
Onto my tests.
The motor drives very well. But once it reaches a position there is a hum.
Parking the motor via driver disconnect is fine, and power off properly, no hum.
I had no issues with speed set to maximum. Could even go higher.
100 Backlash steps is not enough for me. Will need at least over 200. Please increase to a generous 500 step limit.
It may be interfering with USB devices, such as WiFi dongle. Not necessarily the driver's fault. Will have to test further with more equipment attached.
I noticed a bunch of messages in the terminal that started up the indiserver that coincide with my WiFi dongle cutting out momentarily. They read
astropi@AstroPi:~$ indiserver -p 7624 indi_amh_focuser
2017-05-29T23:04:13: startup: indiserver -p 7624 indi_amh_focuser
2017-05-29T23:09:01: Client 0: read: Connection reset by peer
2017-05-29T23:09:51: Client 5: read: Connection reset by peer
2017-05-29T23:10:23: Client 0: read: Connection reset by peer
2017-05-29T23:11:23: Client 5: read: Connection reset by peer
2017-05-29T23:12:05: Client 0: read: Connection reset by peer
2017-05-29T23:13:01: Client 5: read: Connection reset by peer
2017-05-29T23:13:34: Client 0: read: Connection reset by peer
2017-05-29T23:14:40: Client 0: read: Connection reset by peer
2017-05-29T23:14:40: Client 5: read: Connection reset by peer
2017-05-29T23:15:15: Client 8: read: Connection reset by peer
2017-05-29T23:17:22: Client 0: read: Connection reset by peer
2017-05-29T23:18:26: Client 5: read: Connection reset by peer


Thank you :)

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

Last Edit: by Ihoujin.

Astroberry Focuser with Adafruit Motor HAT 3 weeks 5 days ago #17040

  • Kaczorek
  • Kaczorek's Avatar
  • Away
  • Gold Boarder
  • Gold Boarder
  • Posts: 297
  • Karma: 1
  • Thank you received: 95

Ihoujin wrote: I am accustomed to running everything from a profile in Ekos. So starting it from terminal was a challenge for me, and the folder /var/run/indi does not exist on my system. How can I add it to the list for focusers in the Ekos Profile Editor?

Just copy indi_amh_focuser.xml file to /usr/share/indi - if it's not there. If it's there you can select a driver from profile editor in Ekos.

Ihoujin wrote: The motor drives very well. But once it reaches a position there is a hum.
Parking the motor via driver disconnect is fine, and power off properly, no hum.

Does a stepper motor get warm after a while in the stop position? If so, it means it uses break/cost mode to hold the motor still in the last position. I will disable if it is the case.

Ihoujin wrote: 100 Backlash steps is not enough for me. Will need at least over 200. Please increase to a generous 500 step limit.

500 is a lot for a backlash. Could you check how many steps you need for 1 revolution of the motor?
I use DOUBLE step mode in the code (see lines 456, 461, 469, 474) - could you change these to SINGLE, recompile and check number of steps for 1 revolution again?
Use absolute position only for these tests so just set the required position to a number and let it travel to this position.

Ihoujin wrote: It may be interfering with USB devices, such as WiFi dongle. Not necessarily the driver's fault. Will have to test further with more equipment attached.
I noticed a bunch of messages in the terminal that started up the indiserver that coincide with my WiFi dongle cutting out momentarily.

I will not be able to do anything with this. It probably comes from wiringPi library OR it might power drop issue if you use raspberry pi to power your motor.

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

Last Edit: by Kaczorek.

Astroberry Focuser with Adafruit Motor HAT 3 weeks 4 days ago #17056

  • Ihoujin
  • Ihoujin's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 146
  • Thank you received: 6

Kaczorek wrote: Does a stepper motor get warm after a while in the stop position? If so, it means it uses break/cost mode to hold the motor still in the last position. I will disable if it is the case.

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'

Kaczorek wrote: 500 is a lot for a backlash.

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.

Kaczorek wrote: Could you check how many steps you need for 1 revolution of the motor?

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

Kaczorek wrote: I will not be able to do anything with this. It probably comes from wiringPi library OR it might power drop issue if you use raspberry pi to power your motor.

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.

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

Astroberry Focuser with Adafruit Motor HAT 3 weeks 4 days ago #17059

  • Kaczorek
  • Kaczorek's Avatar
  • Away
  • Gold Boarder
  • Gold Boarder
  • Posts: 297
  • Karma: 1
  • Thank you received: 95

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

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.

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

Astroberry Focuser with Adafruit Motor HAT 3 weeks 3 days ago #17075

  • Ihoujin
  • Ihoujin's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 146
  • Thank you received: 6
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: Kaczorek

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

Astroberry Focuser with Adafruit Motor HAT 3 weeks 2 days ago #17086

  • Ihoujin
  • Ihoujin's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 146
  • Thank you received: 6

Kaczorek wrote: There's no dedicated function for disabling break/costing mode in the library


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

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

Time to create page: 0.455 seconds

Login

3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!

Gallery

Replica

Why INDI

Replica