I am using a raspberry pi 4 B+ that is connected to the A4988 driver, it is connected as listed below:
5 VDC from pi to VDD on A4988
GND from pi to on A4988
GPIO14 from pi to MS1 on A4988
GPIO15 from pi to MS2 on A4988
GPIO18 from pi to MS3 on A4988
GPIO18 from pi to direction on A4988
GPIO18 from pi to step on A4988
I am using a 100uF cap as well between 12v supply and vmot I am using 12 to power this chip.
When I power everything on my stepper motor begins to make a high pitch noise why would that be?
I have Vref=1.25 V right now the stepper I am trying to drive is rated for 1.5 amps. is there anything I could be missing ?
I suspect there are errors in your list of connections since you are currently indicating that GPIO 18 is connected to three different pins on your driver.
If you are using one of our A4988 drivers, then setting VREF to 1.25V corresponds to a current limit of 2.3A, which is too high for both your stepper motor and the driver, so I suggest reducing that before you continue testing your driver. In our testing (room temperature, open air environment with no additional cooling), the original A4988 driver carriers (green boards) can continuously handle up to 1 A coil (VREF = 0.54 V), and the [four-layer black edition A4988 carriers] can continuously handle up to 1.2A per coil (VREF = 0.65V).
If you post some pictures of your setup that show all of your connections, along with close-up pictures of the top and bottom sides of your board, I can let you know if there are any other obvious issues.
Reducing the current limit might to a reasonable level for your hardware might help the noise, but it probably will not completely eliminate it. High pitched whines are a relatively common when using stepper motors, and there is not a single method guaranteed to eliminate it, though there are some different ways you could try to reduce it. You might consider reviewing this web page that describes the source of stepper motor noise and gives some general suggestions for how you could try to deal with it.
Another option you might consider is switching to a different stepper motor driver that has more options that you could try out for reducing the noise, like configurable decay modes or automatic gain control features. Additionally, some of those drivers can support higher currents if you want to maximize your motor power.