A4988 output 12V instead of 3-4 V

Hi there,

I created my own motor board that has two A4988. One works perfectly, the other spins (but way to fast!)


Here you can see the X is the wiring of the A4988 that outputs the following:

B2 = 6v -> 12v when on
A2 = 0v -> 4v when on
A1 = 0v -> 4v when on
B1 = 6v -> 12v when on

However, the pins should be a stable
B2 = 4.8v
A2 = 4.8v
A1 = 4.8v
B1 = 4.8v

As well as:

Ms1 = 4.7v
Ms2 = 0.2v
Ms3 = 0.2v

which should be a consistent 4.8v

The code im running is:
combo.ino (2.1 KB)

Why do you think so? The A4988 is a chopper current driver. You cannot simply measure the voltage at the output pins with a voltmeter. The output switches with a high frequency between VMot and 0V.

Edit: And which board are you using? E.g. at a Nano you cannot use A6/A7 as OUTPUT.

I'd agree, I think you're trying to use A6 and A7 as digital pins and they are not (on many AVR Arduinos at least). They only connect to the ADC and nothing else. This is why they are not even pinned out on the Uno.

I will take a SWAG and suggest you swap A6 and A7 with any of the others A0 - A5 that are being used as analog inputs or use digital pins. Since you have a board I assume it is a finished project. Problems like this are why a prototype is built. A large chunk of your code is missing, I could not find comments explaining how it functions.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.