Welcome! Log In Create A New Profile

Advanced

Help Troubleshooting Ramps Board

Posted by ThePinkCow 
Help Troubleshooting Ramps Board
May 14, 2017 01:26PM
Hi everyone,

A while back I bought a folgertech prusa i3 kit and put it all together but it didnt work. In an attempt to figure out why my motors were not moving at all, I've put together the ramps and arduino boards with a single a4988 driver. The motor is wired according to this tutorial. There is a power supply connected to the ramps board at 12V and 1.5 A. I've set the potentiometer on the driver to .5 V so it should be within the tolerances of what I'm guessing is a 1.2 A motor (folgertech doesn't have the specs on these motors, guessing theyre cheap). Originally the 2A and 1A connectors from the motor were swapped so I "fixed" that, again according to the tutorial. My setup looks like this:


I've written some really simple code to just try and get the motor to spin:
const int stepPin = 54;
const int dirPin = 55;

void setup() {
  // put your setup code here, to run once:
  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(dirPin, HIGH);
  
  digitalWrite(LED_BUILTIN, HIGH);
  for (int x = 0; x < 200; x++)
  {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(500);
  
    digitalWrite(stepPin, LOW);
    delayMicroseconds(500);
  }
  digitalWrite(LED_BUILTIN, LOW);
  delay(1000);
}

The pins I'm using are the X motor pins according to the reprap wiki. The code should turn the motor 90 degrees every loop (since its a 200 step motor but I've put all 3 jumpers in). However with this setup and when the code is running, nothing moves. I've measured the voltage coming across the 1A, 1B, 2A, 2B motors and its all around a constant 3 V. I'm really lost as to what I could be doing wrong and am open to all suggestions.

Edit: I said a quarter rotation with all the jumpers in, I meant one sixteenth rotation

Edited 1 time(s). Last edit at 05/14/2017 01:59PM by ThePinkCow.
Re: Help Troubleshooting Ramps Board
May 14, 2017 02:14PM
Does it buzz/whir?

Or just not do anything at all?

Edited 1 time(s). Last edit at 05/14/2017 02:16PM by frankvdh.
Re: Help Troubleshooting Ramps Board
May 14, 2017 02:21PM
Doesn't buzz or anything, I did get some buzzing when I had the driver hooked up directly to an arduino uno, without the ramps, so I'm hopeful that its not the motors?
Re: Help Troubleshooting Ramps Board
May 14, 2017 02:49PM
use the ramps test code.. [reprap.org]

your code hasn't enabled the stepper driver.
Re: Help Troubleshooting Ramps Board
May 14, 2017 03:01PM
just tried uploading the ramps test code, motor still doesn't move but there does seem to be more resistance in the motor now. However, as opposed to before, now I'm not reading any voltage from the motor pins (1A, 1B, 2A, 2B ).

Also I thought the enable pin was only for enabling/disabling some kind of output on the driver and not necessary for simply getting the motor to move?
As per this document which says:
Quote

The translator inputs STEP, DIR, and MSx, as well as the internal sequencing logic, all remain active, independent of the ENABLE input state.

Edited 1 time(s). Last edit at 05/14/2017 03:07PM by ThePinkCow.
Re: Help Troubleshooting Ramps Board
May 14, 2017 03:42PM
The internal logic is maintained, its current phase etc, the FET that actually drives the coils are off, ie It will not move.


The full paragraph
.
Enable Input. This input turns on or off all of the FET outputs.
When set to a logic high, the outputs are disabled.
When set to a logic low, the internal control enables the outputs as required.
The translator inputs STEP, DIR, and MSx, as well as the internal sequencing logic, all remain active, independent of the enable input state.

Energized is good.. getting closer..

you say "12V and 1.5 A." but you also say stepper is 1.2 amp (that's is normally per coil, so you need twice that)
NB on the ramps is two power input 12v 5a (this powers the stepper and logic and hotends and fans) and the 12v 11amp, this is only for the heated bed, and inst needed at this time.
Re: Help Troubleshooting Ramps Board
May 14, 2017 06:04PM
Oh okay interesting, thank you for correcting me.

So I gave it a break and when I came back, there were two red led's blinking on the ramps board.


It seems that this is part of the test code? LED_PIN?

When I plug in the motor it rumbles! As in the shaft isnt spinning but looking at the code, it seems like that what's supposed to happen! Going to try and upload something to get it to spin now, keeping in mind I have to enable the driver first.
Re: Help Troubleshooting Ramps Board
May 14, 2017 06:09PM
The test code also turns on the mosfets, which are connected to the leds

Its meant to move the motors back and forward

every time it goes around loop it it toggles the step line
If its if (millis() %10000 <5000) the direction line is high, otherwise its low, ie back and forth for 5000 mills in each direction.

Rumbling is normally broken wire to steppers, or miss wired steppers

Edited 1 time(s). Last edit at 05/14/2017 06:55PM by Dust.
Re: Help Troubleshooting Ramps Board
May 14, 2017 06:45PM
Well I feel kinda dumb right now. Turns out the 4 wires I have supplying power to the ramps aren't the most stable....which is why the first time I tried the test code, nothing happened and I measured nothing coming from the motor pins. Furthermore the rumbling is a result of me messing with the wiring. Whereas all the diagrams online have a nema17 motor with the wires from the coil going in order 1B to 2B, the ones I have need what would usually be the 1A and 2A pins to be swapped so my initial attempt to "correct" this causes the rumbling.

The diagrams:
reprap wiki

Mine:


Since then I've resorted to the given motor wires and redid the connections to the ramps board and everything works swimmingly! I'm starting to think the original reason my printer didnt work when it was fully assembled was because I didn't properly attach the power cables...So yea again feeling a bit dumb but thank you so much for your help!
Re: Help Troubleshooting Ramps Board
May 14, 2017 06:58PM
Sadly there is no such thing as standard colors with steppers

Fairly sure these suppliers use what ever scrap cables they found while sweeping the shop

Edited 1 time(s). Last edit at 05/14/2017 06:58PM by Dust.
Sorry, only registered users may post in this forum.

Click here to login