Welcome! Log In Create A New Profile

Advanced

Stepper motor randomly changing directions?

Posted by rowow 
Stepper motor randomly changing directions?
July 17, 2014 04:28PM
Hello, I ordered 39 steppers motors on ebay, almost all of them are 4-6 wires, I have a arduino ramps 1.4 connected to a computer power supply,
I used my multimeter and found the 2 coils on a few on my motors (I didnt check the rest) I connect it to my arduino and open pronterface,
I can manually run the motors (right nothing connected to the arduino except the 1 stepper motor) to turn when I click the +x, but when I do it the motor turns counter clockways then counter clockway randomly... sometimes counter clockways first, but it does this many times when I click 100+ x, but when I press x- on any number (10 100 etc) it dosnt move at all... I retested on y also, and z will also only go when I click + but not -, no matter what number, I flipped the coils wires on the motor, I regulated the voltage, changed beetween 5 motors, and its the same outcome, please help...
VDX
Re: Stepper motor randomly changing directions?
July 17, 2014 05:03PM
... moving in only one direction is common with activated endstops ... randomly changing direction points to problems with the DIR-pin configuration/wiring or voltage level ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Stepper motor randomly changing directions?
July 17, 2014 05:13PM
I configured the wires any way possible, back wards, flipped coils, flipped one wire with each other on each coil, etc etc, still the same, and I already configured the voltage level from the lowest to highest, is there a way to test if the dir pin is correct?
VDX
Re: Stepper motor randomly changing directions?
July 17, 2014 05:35PM
... a proper configured DIR output would change between HIGH and LOW when changing the moving direction and start to move ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Stepper motor randomly changing directions?
July 17, 2014 05:39PM
high and low? I dont think I understood you, as in change of voltage?
VDX
Re: Stepper motor randomly changing directions?
July 17, 2014 06:25PM
... yes, LOW is normally at 0V and HIGH depending on your system at 5V or at 3,3V.

One problem with 3,3V electronics could be, that the 3,3V HIGH level is not enough to trigger a 5V input ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Stepper motor randomly changing directions?
July 17, 2014 07:23PM
is a .6v enough?...
Re: Stepper motor randomly changing directions?
July 17, 2014 07:47PM
did I do it right? I connected the tester with a- a+ and the high was .5-.6V then I connected to b- and b+ and the high was 1V... that is when the tester is in line with the motor and the arduino, if the motor is disconnected then its 12V always
VDX
Re: Stepper motor randomly changing directions?
July 18, 2014 02:49AM
... do you have experience with measuring electonics?

You don't have to measure inline the motor wires - and be carefully, don't disconnect/connect the motor with power on, this will wreck the driver!

The essential pins are the DIR and CLOCK pins of the driver, which are controlled by the Arduino - the CLOCK pin is the stepping frequency, this can only be seen/measured correct with an oszilloscope, as it's a pulsing signal with some kHz, so not measurable with a voltmeter.

The DIR pin is easier to measure, as it will change polarity when changing the moving direction of the respective motor in the software.
This voltage value should change between 0V in one direction and something between 3V and 5V in the other ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Stepper motor randomly changing directions?
July 18, 2014 10:09AM
I have very basic experience in measuring electronics, also isnt the dir pin connected to ground? so where else do I connect the tester to (http://www.pololu.com/product/1201) at the bottom of the page is the diagram... sorry if I sound really stupid to you, trying to learn, im a airsoft mechanic so im better at mechanical devices,

Edited 1 time(s). Last edit at 07/18/2014 10:10AM by rowow.
Re: Stepper motor randomly changing directions?
July 18, 2014 10:20AM
im guessing I shouldve connected the tester to the dir pin and the volt meter, and it was 4.1v always if I clicked + but when I clicked home or - it went to negitive .5v and stayed there untill I clicked +, cause the reason its not getting enough voltage to go backwards
VDX
Re: Stepper motor randomly changing directions?
July 18, 2014 04:56PM
... this sounds good in relation to 'working DIR-pin' -- -0.5V and +4.1V are the two different values indicating the different moving directions ... and the levels seems to be OK for me.

The issue with "moving only in one direction" could be caused by 'triggered' endstops -- deactivate or invert the endstops in your configuration.

This randomly switching direction is another problem ... but first solve the first issues and be sure the drivers and motors are functional ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Stepper motor randomly changing directions?
July 18, 2014 05:02PM
today I changed the connections (motor to the ab pins) from quick connection to solder, and it seemed to stop the random changing direction, and for the only one direction turning, I dont have any end stops, only 3 motors (I added 2 more) so is there a way to check if the program or arduino is triggering the end stop for some reason
VDX
Re: Stepper motor randomly changing directions?
July 18, 2014 07:29PM
... search the settings for the endstops in your configuration and invert them all -- this will 'deactivate' them ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Stepper motor randomly changing directions?
July 19, 2014 02:44PM
I cant find how to invert the endstops, so instead I have some switches (endstops) and I connected them to the arduino and pressed them, now the motors go reverse!!! thank you!!! but it be really great if you told me where to find the setting to invert the end stops on the pronterface... I searched on google and couldnt find anything, and I searched everywhere on my pronterface setting/etc and there is no setting for endstops anywhere,
VDX
Re: Stepper motor randomly changing directions?
July 19, 2014 03:45PM
... this settings depends on your firmware-sources, but most of them should have a file "configuration.h" in the source files, where you can change all parameters and pin-wiring or behaviour.

After changing this you have to upload the firmware again ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Stepper motor randomly changing directions?
July 20, 2014 06:07AM
As the Dir signal changes as expected, it can't be a endstop/firmware problem. Also, if M119 reports what's expected, endstops actually do work fine.

Did you solder the pins into the Pololu? I had cases where people considered these holes in the PCB to be a pluggable connector.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Stepper motor randomly changing directions?
July 20, 2014 12:06PM
we already fixed the problem... it was the endstop issue... all I need to do is find how to invert the endstops because for now I have a getto invert system by taping the endstops closed, but its for now while I am installing the motors on my homemade 3d printer, if you have any advice where to find on how to invert the endstops because I couldnt find the file, or anywhere on google on how to, still searching
Sorry, only registered users may post in this forum.

Click here to login