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