×

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

Bi-monthly release with minor bug fixes and improvements

DIY focuser w/o Motor HAT or PiFace?

  • Posts: 23
  • Thank you received: 0
I finally got to load the indi_rpifocus driver, I had to recompile the drivers from source. I get the Astroberry Focuser tab in my Ekos client. I still DO NOT manage to get the motor going. Could anyone who has managed to get the a4988 board working tell me which pins of the board should be connected to?

What port should be used? Default is /dev/ttyUSB0 but that looks wrong.

Thanks!
Last edit: 6 years 6 months ago by Maurizio Baldassarre.
6 years 6 months ago #19109

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

  • Posts: 983
  • Thank you received: 375
First of all (as per A4988 datasheet) - RESET turns off all of the FET outputs. All STEP inputs are ignored until the RESET input is set to high. This means that connecting it to SLEEP will set it to high state and will enable outputs.
Now, ENABLE turns on or off all of the FET outputs. When set to a logic high, the outputs are disabled. This means you need to make sure that it is set to low state.
Take a look at this image to connect the A4988 controller to RPi pins.

Make sure that GPIO pins are connected to proper pins at A4988 i.e. GPIO04 - DIR, GPIO17 - STEP, GPIO22 - M0, GPIO27 - M1, GPIO23 - SLEEP (BTW. please note that GPIO number is not the same as pin number e.g. GPIO04 is pin 7 and GPIO17 is pin 11 etc.) - see the pinout below.
Last edit: 6 years 6 months ago by Radek Kaczorek.
6 years 6 months ago #19113

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

  • Posts: 23
  • Thank you received: 0
Thank you very much Radek,

I have wired everything and checked all connections with a multimeter. The motor just won't work. I'm starting to think it must be some sort of software issue, for instance missing libraries.
I attached pictures of the RPi and board, and screenshots of the "Astroberry Focuser" tab under INDI. Please not that the default port is /dev/ttyUSB0. This is weird, why should it be USB?

When I send move commands via Ekos, the voltage on SLEEP rises to 3.3, so I think the RPi does send commands. I checked the voltage of the motor at rest, and the readout is 1.5 volts on each of the 4 pins relative to motor power supply GND. Strange.

Vref does not go beyond 1.2V. Is that enough?

Any explanation?
6 years 6 months ago #19188

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

  • Posts: 983
  • Thank you received: 375
First of all your stepper motor does not look like 28BYJ-48. Could you specify what motor you're using?
Second, does the stepper motor vibrate or gets warm when steps are sent from the driver? Check it out carefully. Based on your pictures I cannot verify if its connected properly. Pictures showing connectors to the stepper and stepper controller and RPi would be helpful.
You can ignore serial port in the driver. It's a leftover and it's not used. I will remove it from the code for transparency.
6 years 6 months ago #19189

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

  • Posts: 23
  • Thank you received: 0
It's not a 28BYJ-48 (unipolar), but a Nema 17 (bipolar). I don't think the a4988 can drive unipolar motors, so I purchased this one for testing. The motor does not vibrate nor gets warm. Looks like no current is flowing at all. Maybe Vref is too low. The voltage on the motor pins on the driver board rises to 4.6 V while I'm sending commands. Starting to think it's a matter of current.
6 years 6 months ago #19190

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

  • Posts: 281
  • Thank you received: 29
Are you sure it is a 5v stepper, and not 12v?
6 years 6 months ago #19191

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

  • Posts: 23
  • Thank you received: 0
On the Amazon page it says "nominal voltage: 3.45 V, nominal current: 1.5A (monophase)".
6 years 6 months ago #19192

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

  • Posts: 281
  • Thank you received: 29
Ok. But 1.5A exceeds the 1A the a4988 is designed for. In any case you would need to check the Vref pin - but pls check the pololu Instructions first...
6 years 6 months ago #19193

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

  • Posts: 281
  • Thank you received: 29
6 years 6 months ago #19194

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

  • Posts: 281
  • Thank you received: 29
Forgot to mention, there are loads of instructions on YouTube on how to convert the 28byj48 into a bipolar stepper - it is actually fairly easy to do.

Best, Helge
6 years 6 months ago #19195

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

  • Posts: 23
  • Thank you received: 0
I DID IT!!!! I took the risk and increased the voltage to 12 V, and not it works! I have no idea why it says 3.45V on Amazon, must be a typo!!
6 years 6 months ago #19196

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

  • Posts: 281
  • Thank you received: 29
Fantastic, well done! - then current will presumably be lower than the 1.5A. Can you check what current is drawn?

I was also running a 5v stepper at 12v. Unless it is getting warm, should be ok - but I am not an electrician (=disclaimer).
6 years 6 months ago #19197

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

Time to create page: 0.713 seconds