SparkFun Stepper Motor

Hi,

I am working on a stepper motor project. The stepper motor I am using is here. Also using a stepper motor easy driver here.

Attached is my code for the Arduino Uno.

I ran into a problem where there was a high pitched noise, and the motor wouldn't turn (apparently common). I fixed the noise issue by adding a delay in the main loop after calling the moveMotor function.

However, now the motor doesn't move and has a very quiet ticking sound. It is set to be full-step, not micro step mode at the moment.

There seem to be "high" transient currents of 330 mA drawn from my power supply, but then the value settles at the driver drawing about 50-60 mA. My supply is set to 10V and 2A as specified by the motor and motor driver (6-30V, 2A).

While writing this I tried testing it again, and my driver heated up quite a bit and the power supply drew more current (didn't catch the value on the display). I think it was the FET on the driver heating up? Anyway now I cannot program my Arduino, getting the error message:

"avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
avrdude: ser_drain(): read error: Device not configured
avrdude: ser_drain(): read error: Device not configured"

I appreciate any help with either of these issues. Thanks.

motorControlFW.ino (2.67 KB)

motorControlFW.h (878 Bytes)

My supply is set to 10V and 2A as specified by the motor and motor driver (6-30V, 2A).

I see this for a driver spec

Adjustable current control from 150mA/phase to 700mA/phase

and this for a motor spec

Current: 2.0A/Phase

I can understand why the motor won't turn and the driver heats up, but its not clear why the download to the Arduino is affected.

Can you explain more about the power supply, and provide a circuit diagram of how it was connected to the motors and the arduino?

To make that motor run as intended, you will need a stepper driver that can handle at least 2.0A/winding and an appropriate 3-4 A power supply.

I recommend this one from Pololu. For the time being, power the Arduino separately and connect the grounds.

So for the driver it also says 6-30V, 2A under the hookup guide for the M+ specifications. But even if that isn't right, it should be able to power the motor because previously I had a configuration where I sent commands to the arduino over serial with a raspberry pi. However, since the pi shouldn't be necessary I made modifications to the code to send the commands directly over arduino. When I was using the pi there were no over heating issues.

As far as the arduino issue, I am going to try to purchase a new one and replace it.