×
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.

DIY focuser w/o Motor HAT or PiFace?

2 years 10 months ago 2 years 10 months ago by m.baldassarre.85.
m.baldassarre.85
Junior Boarder
Junior Boarder
Posts: 23
More
Topic Author
DIY focuser w/o Motor HAT or PiFace? #19109
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!

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

2 years 10 months ago 2 years 10 months ago by Kaczorek.
Kaczorek
Moderator
Moderator
Posts: 901
Karma: 6
More
DIY focuser w/o Motor HAT or PiFace? #19113
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.

--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM

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

2 years 10 months ago
m.baldassarre.85
Junior Boarder
Junior Boarder
Posts: 23
More
Topic Author
DIY focuser w/o Motor HAT or PiFace? #19188
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?

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

2 years 10 months ago
Kaczorek
Moderator
Moderator
Posts: 901
Karma: 6
More
DIY focuser w/o Motor HAT or PiFace? #19189
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.

--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM

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

2 years 10 months ago
m.baldassarre.85
Junior Boarder
Junior Boarder
Posts: 23
More
Topic Author
DIY focuser w/o Motor HAT or PiFace? #19190
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.

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

2 years 10 months ago
HelgeMK
Gold Boarder
Gold Boarder
Posts: 307
Karma: 1
More
DIY focuser w/o Motor HAT or PiFace? #19191
Are you sure it is a 5v stepper, and not 12v?

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

2 years 10 months ago
m.baldassarre.85
Junior Boarder
Junior Boarder
Posts: 23
More
Topic Author
DIY focuser w/o Motor HAT or PiFace? #19192
On the Amazon page it says "nominal voltage: 3.45 V, nominal current: 1.5A (monophase)".

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

2 years 10 months ago
HelgeMK
Gold Boarder
Gold Boarder
Posts: 307
Karma: 1
More
DIY focuser w/o Motor HAT or PiFace? #19193
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...

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

2 years 10 months ago
HelgeMK
Gold Boarder
Gold Boarder
Posts: 307
Karma: 1
More
DIY focuser w/o Motor HAT or PiFace? #19194

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

2 years 10 months ago
HelgeMK
Gold Boarder
Gold Boarder
Posts: 307
Karma: 1
More
DIY focuser w/o Motor HAT or PiFace? #19195
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

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

2 years 10 months ago
m.baldassarre.85
Junior Boarder
Junior Boarder
Posts: 23
More
Topic Author
DIY focuser w/o Motor HAT or PiFace? #19196
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!!

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

2 years 10 months ago
HelgeMK
Gold Boarder
Gold Boarder
Posts: 307
Karma: 1
More
DIY focuser w/o Motor HAT or PiFace? #19197
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).

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

Time to create page: 0.990 seconds