Motor driver for Stepper Motor

I try to built a Robot with this Stepper motor-
I realized that i need some driver to set 1.6 A to the motor (Current rating: 1.68 A per coil)
so I bought this driver motor-
my Arduino is-
I checked the connect betwin the arduino and my driver and everithing work.
the power supply to the arduino is the usb (its connect to the computer all the time) and the motor power supply is a changing DC supply (0-40 V)

then i use the spi mode to set the current to 1.68 A -in my program I wrote:

#include <SPI.h>
#include <AMIS30543.h>
const int stepPin = 3;
const int dirPin = 2;
AMIS30543 stepper;

void setup() {
  pinMode(2,OUTPUT); //dir
  pinMode(3,OUTPUT); //nxt
  pinMode(4,OUTPUT); //enable


  // Enable the motor outputs.

I try to use the srep test from the libary and he send me all the time "driver power might be off"
I dont understand where is my problem and I would be happy to some help.
thank a lot


I added code tags to your first post so that your code is displayed and formatted properly. You can see the modifications by clicking on the pencil icon in the upper right-hand corner of the edited post and view the raw source. Please use this method to post code in the future.

I just want to clarify for those following this discussion that you are running the StepTest example from the AMIS-30543 library. (It might not seem apparent in your last paragraph.)

Can you send the entire error message you get when running the StepTest example code? The example has two different error messages which contain “driver power might be off”.

Can you elaborate what you mean by “everithing work”? What did you do to verify your connections between the A-Star 32U4 Mini LV module and AMIS-30543 micro-stepping stepper motor driver? Can you send pictures that clearly show all your connections?

Also, what power supply are you using to power the AMIS-30543 driver, the A-Star, and the stepper motor?

- Amanda

I chcked my connections with oscilloscope and the Input/Output voltage
behave well.
I can send picture buut I dont think it would help you to understand
because the wires cover in my robot.
The Amis powered by 12V battery, the A-star connect to USB.
As I said the only connection between A-star to AMIS is:
with the scope I tried to check the current but it dosent show nothing-
like there is no voltage.
the entire massage is what I wrote- “driver power might be off”. and
nothing else.
thank you very much.

In your first post, you defined pins 2 and 3 on the A-Star as the DIR and NXT pins on the AMIS, respectively. However, in your recent post, you are saying that those connections are swapped. I suggest that you verify your connections between the A-Star and the AMIS and make the appropriate changes in your code (e.g. making sure the A-Star’s pin 3 is connected to the AMIS’s DIR pin and dirPin is defined as pin 3).

If your code still does not work, can you try running BasicStepping.ino in the AMIS library and let us know the outcome? Please make sure that the correct pins are defined for amisDirPin, amisStepPin, and amisSlaveSelect before running the code.

By the way, the StepTest example requires a connection between the A-Star’s MISO pin and the AMIS’s DO pin in order to work, which is most likely the reason why you were getting that error.

- Amanda

O.K I rechecked my wires and this like in the code (as I wrote first
time:3-NXT ect)
I connect the MISO pin to DO pin. despite this I dont connect CLR pin.
still, the massege that I get is "Writing or reading WR failed; driver
power might be off.“
the voltage are fine? the A-star can get his power durectly from the
I use AMIS correctly? I dont need another part to supply power or current?

Sorry, I just noticed I forgot to mention that the StepTest example also requires a connection between the A-Star (pin 5) and AMIS’s CLR pin. The StepTest example is intended to be used by developers of the library, which is stated at the top of that sketch.

Based on our conversation so far, it seems like you are just trying to get the your stepper motor to step. Did you run the BasicStepping example like I had suggested in my previous post?

Can you send pictures showing how you have everything connected in your setup? In a worst-case scenario, the pictures would not help me understand the cause of the issue but do not do any harm. In a better scenario, I can narrow down the problem to a specific area in your setup.

- Amanda