Connect with us

Using ramps1.4 as generic stepper interface

Discussion in 'Microcontrollers, Programming and IoT' started by Chazz, Nov 3, 2018.

Scroll to continue with content
  1. Chazz


    Nov 3, 2018
    Hello everyone,
    I'm excited to be part of forum as it looks like I will be doing more, and more electronic oriented projects in the future!

    Anyways I have an extra arduino mega, and ramps board with working stepper motors from a previous 3d printer. I have been wanting to build a star tracker/pointer thing for a while. Anyways I figured I could easily use the ramps board to interface with the steppers as needed. I found this useful tutorial right here ->

    I used a volt meter to determine what pins I needed to initialize. I decided to go with the x stepper. I found A0 and A1 pins to be responsible for the "dir" and "step" and initialized them in code as he did.

    After getting it all set up, I couldn't get the motor to turn at all. Not even noise. I checked the stepper driver for a voltage on the "pot" and found a voltage of about 0.45v, which is correct that means it is getting power. I also made sure the loop was running correctly by dropping in some Serial.print() functions in there. I swapped out the driver just to be sure, and doubled checked that I didn't have the pins initialized backwards. Maybe the stepper is sleeping do to other pins I'm not aware of not being initialized correctly? Maybe M0, M1, M2, are initialized incorrectly(I doubt that though, I am guessing they are hard wired to 5v). I will say that I did pull the jumpers out to see I could at least get it moving in full step mode. None of that worked. Maybe there is a good library for doing this, but I really like the tutorial linked above as it gives a lot of options when it comes to programming.

    Hopefully its something minor in the code that I am getting wrong! I have working in matlab lately so jumping back into C++ has had a few hiccups!

    Anyways thanks for any help in advanced looking forward to hearing from you guys.

  2. Chazz


    Nov 3, 2018
    I am sure this is good news to all, I did a bit more research as many encourage, and it turns out that the enable pin needs to be set to low. On the x stepper that is pin number 38. I went ahead and set it to low and it worked like a charm.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day