SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By yair
i have an easydriver+stepper connected to an arduino.
only step pin is attached to pin 48 (mega).
if i connect a servo to any PWM pin > stepper STEP pin starts getting pulses > stepper rotates constantly.
i trimmed down the code, to the bare minimum to reproduce.
mybe i need some filtering ?
Code: Select all
#include <Servo.h>
Servo myservo;

void setup() {
void loop() { }  
power via modified ATX psu.
servo gets 5V and stepper 12V, arduino is powered via usb, ground is shared.
before i connected the servo i had no problems.
i also tried powering the servo via the easydriver regulated 5v output. same deal.
By EmbeddedMan
You may have a problem with floating inputs, specifically the DIR pin on the EasyDriver. Try tying that low and see what happens when you run your servo.

The other thing that comes to mind is that your servo is adding a ton of noise to the supply (and that's getting into the STEP output) or GND, and the EasyDriver is seeing that noise as valid step signals.

If you are not moving your servo (i.e. it's powered, but at a static position) does the EasyDriver turn?

By yair
hi Brain,
following your input i tried taking the DIR to gnd but that didnt solve the problem. i stopped debugging and moved this project to a dedicated servo controller, slaved to the arduino.

thank you for the input.