Go Down

Topic: Did I recieve a bad stepper motor? (Read 280 times) previous topic - next topic

Dantor19

Hello all.  I am pretty new to Arduino, and to C++, but less new to electronics in general.  I recently recieved my Arduino Uno kit that came with a stepper motor and stepper driver board.   I have run some successful tests using a potentiometer and LED's, but am having trouble with this stepper.  It almost seems like its missing a phase.  Certain speeds kinda work, but most commanded speeds don't produce any rotation, but the motor is vibrating, and generating a significant amount of heat.  I am using the stepper_speedControl example, and providing seperate 11.5v to the stepper driver board. 
I'm using pins 8 through 11 for data to the motor driver, and using anolog pin 0 as the input reference.  I have similar results whether I use the 3v or 5v for the potentiometer supply voltage.  Is the stepper not functioning correctly, or is my method incorrect?

Dantor19

I almost forgot,  I am using a 28BYJ-48 step motor, and I am unsure of the correct # of steps to define in the sketch.  There seems to be a lot of conflicting information out there on this very topic.  When I use the Stepper_oneRevolution sketch, and define 512 steps, it seems to function smoothly-ish, but only turns about a quarter turn before pausing to reverse direction.  Any thoughts?

Zapro

#2
Dec 28, 2015, 08:31 pm Last Edit: Dec 28, 2015, 08:32 pm by Zapro
I see no ground connection from your Arduino to the stepper-motor driver (ULN2003)?

Unless you are using radio signals, you /need/ the ground connection.

After all this is an electronic circuit - without any return path, there is no circuit :D

// Per.

Dantor19

Where would I attach ground to on the driver board?  There aren't any available pins left to connect an additional ground. 
The Arduino is sending out the digital pins 8 through 11, to the driver board.  The driver board gets an isolated power supply of 11.5V which it then uses to drive the stepper based on the digital inputs.  Why would I need a ground going back to the Arduino?  I have a complete circuit with my supply voltage(white and red clips on the right of the photo.  Do the digital pins need a seperate ground to the Arduino?  If so, why? 
Also, if a ground was needed but was not connected I don't believe I would get any output/movement from the motor, but as I mentioned, I do, just not movement that makes sense to me. 

CrossRoads

All GNDs need to be connected to have a common reference level for signals.  Make some parallel connections to a pin if you need to.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Zapro

Also, if a ground was needed but was not connected I don't believe I would get any output/movement from the motor, but as I mentioned, I do, just not movement that makes sense to me. 
The reason that it "may" work somewhat is because some of the pins is low, and some are high, this makes a "virtual" ground for the ULN2003-chip. It's a bad thing to do, so don't!

Make a proper ground and your problems go away.

// Per.

Dantor19

So, I've jumped from the return side of my ULN2003-chip supply, to the ground of the Arduino.  The results have not changed at all.  I get a smooth-ish quarter turn when I define it as a 512 step motor, and run the stepper_oneRevolution example, and I get weird inconsistent stuttery movement when I use the MotorKnob example.  Also, heat is still being produced by the stepper motor. 

TomGeorge

Hi,
Quote
So, I've jumped from the return side of my ULN2003-chip supply, to the ground of the Arduino.  
Umm.. return side of the chip???

I would connect the -  negative pin on the driver board to the arduino gnd.

Tom..... :)
Everything runs on smoke, let the smoke out, it stops running....

Dantor19

So after doing a fair bit of research I found the following instructions:

https://arduino-info.wikispaces.com/SmallSteppers

The instructions are a bit complex, but the important take away was that the library example for steppers is incorrect, or at least it is for this motor.  The line where you initialize the stepper library on pins 8 through 11 needs to be defined as follows to allow for correct stepping.  If they are left as they are (8, 9, 10, 11) then the pulses get sent to the wrong place at the wrong time.

Code: [Select]
Stepper small_stepper(STEPS_PER_MOTOR_REVOLUTION, 8, 10, 9, 11);

After making this change, everything worked perfectly and smoothly, even at slower rpms. It was then just a matter of tweaking the mapped ranges for the best effect.  '

The one persistent problem however is the amount of heat being generated by the stepper motor during operation.  Just after a couple minutes of running, it gets too hot to touch.  This is not ideal for my project, as I will require a stepper to run continuously for hours without burning up itself, or its surroundings.   Any thoughts?

MarkT

Steppers are often rated for 60-80 degree rise above ambient at full rated current.  They are designed
to be mounted onto large pieces of metal to help dissipate heat.

You are free to run them at a lower current, in particular its common to drop the current to about 50%
whenever the motor is stationary.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

TomGeorge

Hi,
Stepper motors usually are not powered OFF when you stop them, if you try and turn the shaft by hand with no power and compare it with the stopped but powered motor you will feel the difference.
So even when stopped but powered they are dissipating energy.

Tom.... :)  
Everything runs on smoke, let the smoke out, it stops running....

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy