Go Down

Topic: Stepper motor stopped responding when it used to work fine (Read 4345 times) previous topic - next topic

babycoder

Hello Everyone,

I am a bit confused.  Currently, I am working on a project that uses Arduino Uno, an EasyDriver, and a stepper motor.  The stepper motor is attached to a metal plate that will cover a camera lens at certain times.

When I would first run the code, the stepper motor would turn just fine, as it was supposed to.  A few days later it seemed to be fighting to rotate and now, it doesn't seem to respond at all.  I did change the code a bit so in order to make sure it wasn't an issue with the code I ran other people's test codes for stepper motors controlled by an Arduino.  Still nothing happened/I got no response from the stepper motor.

Is it normal for a stepper motor to just go bad?  I know it's wired correctly because, like I said, it worked before and I have not touched the circuitry.  Any suggestions would be greatly appreciated.

Thank you

MarkT

Which motor? What power supply are you using to the EasyDriver?  Have you checked it is
adequate for the load?  Have you measured its voltage when in use for instance?

Stepper motors have nothing to go wrong - after years of use a bearing might sieze up if you
are very unlucky.   One loose connection in the motor wiring however and you may fry the
EasyDriver though, the motor is highly inductive so you have to ensure solid connections and
never unplug it when the driver is powered up (that's a classic way to blow a motor driver)
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

babycoder

The motor is a Mercury Motor SM-42BYG011-25 16/2011.  Originally when it turned it was only hooked up to the computer via USB and worked fine. Also, I have not measured its voltage while it is in use.

I haven't unplugged it directly while it was powered on, it's a pretty simple set up (not mine originally).

Robin2

The usual advice. Post your code. And tell us what power supply you are using for the motor (volts and amps).

I have some of those motors. Try this simple stepper code. However the Easydriver defaults to microstepping and my code assumes full steps so you may need to increase the number of steps in the code.

...R
Stepper Motor Basics
Two or three hours spent thinking and reading documentation solves most programming problems.

babycoder

Thank you for the resources! Code will be posted momentarily.

babycoder

Alright, plot twist...now I am actually getting the error message "Problem uploading to board avrdude: stk500_recv(): programmer is not responding"

I am not sure why because it seemed to upload fine before (I promise this was working at one point, not perfectly, but it was working).

Probably best for me to sort this issue out first before I try to tackle any hardware issues. :(

I'll be back with the code and everything, thanks.

MarkT

That's a 12V motor, so you'll need 18V or more to drive it properly from a chopper driver - you haven't
said what voltage your power supply for the thing was...
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

babycoder

Alright so back on track now. 

Let me clarify, when this motor first functioned properly I used no external source (just plugged the Arduino into the computer via USB).  All was fine.  Then it seemingly began to weaken, after several weeks so I figured it would be good to use an external source.  The external source I used has the following specs:

center positive
output:12V dc and 600 mA

After using this power supply, still nothing happened.  Could I have made it worse or fried something?  Why would it have worked before on just USB power and now seems to be struggling?

Thank you.

P.S. I've attached the main code.

babycoder

Robin,

I tried your example code (the corrected version which you posted) and nothing happened when I compiled the code.  Is there something I could be missing?

Thank you again for your advice and patience everyone.

Robin2

Let me clarify, when this motor first functioned properly I used no external source (just plugged the Arduino into the computer via USB).  All was fine.  Then it seemingly began to weaken, after several weeks so I figured it would be good to use an external source.  The external source I used has the following specs:

center positive
output:12V dc and 600 mA
Before looking at the code I need to clarify this.

It sounds as if you are saying that the Arduino and the motor were powered from the computer USB connection.
I find that very hard to believe. It may well have caused damage to the Arduino.

Then it sounds like you disconnected the Arduino from the USB connection and powered the motor and the Arduino with a 12v supply plugged into the Arduino barrel jack.

If neither of these interpretations is correct, please provide a better description of both situations. The best thing, by far, would be to make pencil drawings showing all the connections and post photos of the drawings.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

babycoder

I will post an actual picture and make a drawing shortly!  Thank you.

babycoder

I have attached pictures of the actual set up, drawings still to come.  The little grey cord plugs into a Mac mini via USB.

babycoder

Unfortunately I'm no artist.  PLEASE let me know if anything is unclear.

Thank you all again so much.

justone

Are my eyes deceiving me or are your wires just pushed into the holes and not soldered?

babycoder


Go Up