×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Connect stepper driver via USB

  • Posts: 281
  • Thank you received: 29
I wonder about the following:

For some time, I have my stepper motor controller (A4988) connected to the Raspberry Pi‘s GPIOs and leverage on the great astroberry-diy library (astroberry focuser).

Alternatively, one could use an Arduino, connected via usb, to connect to the driver, e.g. Pololu A4988. See for instance:

hansastro.github.io/Focuser/

But why putting an Arduino in-between? I have seen, that on the Pololu website there is also a stepper controller that can be connected directly to USB, see www.pololu.com/docs/0J71/all

So, in theory (unfortunately I am lacking of the programming skill), wouldn’t it be possible to address the stepper controller via usb?

www.pololu.com/docs/0J71/12.1

Just thinking it would need a driver like the Astroberry drivers that enables to connect the the stepper driver via usb.

Why of interest - it would allow using mini pc‘s with usb 3.0 instead of the Raspberry Pi - and without the need of an Arduino.

Any views?
5 years 4 months ago #30995

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

  • Posts: 407
  • Thank you received: 74
I think this article is about right except it ignores price :-) hackaday.io/page/2944-is-arduino-or-rasp...ervos-stepper-motors
RPI3 Ubuntu 16.04 / AMD desktop Kstars under Ubuntu 16.04 Mounts :azeq6 ,SWAZGoTo

RPI3 Fedora testing out on AMD desktop Fedpra 28 - running kstars 2.9.4 , Indilib 1.7.4 ?????
The following user(s) said Thank You: Helge
5 years 4 months ago #31036

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

  • Posts: 281
  • Thank you received: 29
Thanks for sharing the article, really helpful for my understanding!

However, still, with the astroberry focuser I do not encounter any of the potential issues (latency, interrupt handling) as described in the article (here in my set up the Raspberry GPIOs drive the A4988 Pololu stepper controller). I guess, it is a matter how complex the programs running on the Pi (in parallel) are?

I have ordered in the meantime the Tic T825 Controller and give it a try...something to keep myself busy as autumn and clouds finally arrived!
5 years 4 months ago #31040

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

  • Posts: 407
  • Thank you received: 74
If it works for you then it works - who cares about the purist theories LOL
RPI3 Ubuntu 16.04 / AMD desktop Kstars under Ubuntu 16.04 Mounts :azeq6 ,SWAZGoTo

RPI3 Fedora testing out on AMD desktop Fedpra 28 - running kstars 2.9.4 , Indilib 1.7.4 ?????
Last edit: 5 years 4 months ago by Clive Stachon.
5 years 4 months ago #31048

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

  • Posts: 151
  • Thank you received: 27
hi!
the pi is preemptive. it is possible that it does not send pulses for a certain amount of time to the stepper. at that point the stepper stops. no big issue for a focuser. driving a stepper with USB directly is no good idea. USB sends 64 byte chunks ... a puls signal is hard to convey that way. the hansastro code is great, btw ...
yours
wolfi
5 years 4 months ago #31055

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

  • Posts: 281
  • Thank you received: 29
Hi Wolfi,

Many thanks. I guess, what you are saying about he 64 Byte chunks is the reason for the „latency“, described in the article. Regarding pulse messages, what does it mean for the focuser? If, just for the example, I want to move the focuser by three steps forth, and then five steps backs (in the course of focusing), does it mean it will not work? What is actually a pulse message, technically speaking?

Best, Helge
5 years 4 months ago #31060

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

  • Posts: 151
  • Thank you received: 27
hi!
the stepper is not driven by messages, it is driven by 5V on/off pulses at a certain update rate. this you cannot send via USB.
yours
wolfi
5 years 4 months ago #31061

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

  • Posts: 281
  • Thank you received: 29
Hm...but this one seems to be designed to do the job:

www.pololu.com/product/3131
5 years 4 months ago #31063

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

  • Posts: 151
  • Thank you received: 27
hi!
yes. the microcontroller on that board communicates via USB and drives the stepper :)
yours
wolfi
5 years 4 months ago #31066

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

  • Posts: 281
  • Thank you received: 29
In which case I consider myself lucky - since I already ordered one of those...

Thanks a lot anyway!
5 years 4 months ago #31067

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

  • Posts: 281
  • Thank you received: 29
For those interested: Pololu now provides a C code example which enables to move a stepper motor forth and back with the TIC825 controller. This should help developing a focuser Indi driver - and simplify.

www.pololu.com/docs/0J71/12.1
5 years 4 months ago #31649

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

Time to create page: 0.773 seconds