# Questions tagged [stepper]

Questions about programming and controlling stepper motors.

198 questions
Filter by
Sorted by
Tagged with
1 vote
28 views

### Stepper Motor Direction Not Changing with Toggle Switch - Need Help

I’m trying to control the direction of a stepper motor using a toggle switch with my Arduino. While the LED indicates that the switch is working correctly (i.e., it changes state as expected), the ...
• 19
71 views

### How to control a stepper motor using an absolute position sensor which has an error band?

I am using Feather M4 express development board with DC Motor + Stepper FeatherWing and Ethernet FeatherWing stacked on it. The idea is to read the target position from the UDP from 0 t0 360 degrees ...
73 views

### Controlling a NEMA 17 with PID on TB6600, motor too slow

I'm writing there as I am kinda desperate to find a solution after many trials, back and forth with online solutions and ChatGPT, so maybe someone here can help. My project is quite simple: I'm trying ...
• 11
648 views

### How do I find the whole number (n) that when multiplied by (m) will be closest to (x)? [closed]

I've designed an apparatus that uses stepper motors, and they are linked together so that when armature A turns, it consequently moves armature B by a ratio of 1/4. In order to keep armature B in the ...
• 494
1 vote
56 views

### Driving stepper to follow sequential positions

I was exploring the stepper motor library AccelStepper and using it because of it's easy interface to control multiple stepper motors simultaneously. Recently I got a problem. I needed a stepper motor ...
• 11
245 views

### Running code inside void loop() vs inside a separate function with an infinite loop in it

I'm writing a program for running a stepper motor at a high RPM using accelStepper on a NodeMCU esp8266. Super New to the accelStepper but reading, experimenting and learning as I go When the code to ...
• 1
309 views

### How to change the direction of a stepper motor using the AccelStepper library?

I'm using a Nema 17 stepper motor (200 steps) and a DRV8825 motor driver. This is the configuration I am using: I am using a 9 V power supply. The dirPin is connected to pin 3 on the Arduino board, ...
76 views

### Give zero volt to specific servo motors in a certain time

I have a robot that uses 4 mechanical arms. Each mechanical arm has 4 "READYTOSKY 30kg" servo motors on them. At some point, I need to use the absolute maximum force of only two mechanical ...
• 11
71 views

### Confusing stepper reaction to increase in delayMicroseconds()

I have been following this tutorial using the same hardware, TB6600 driver, 42HS48-1704A (yes I think its supposed to be 42hs40 but thats not what it says the sticker) stepper but am controlling via a ...
• 161
359 views

### TMC2208 Stepper Motor does not change its RPM linearly

This is my first project working with stepper motors, so I may have a bit of a shaky understanding of the electronic side of the project. I'm trying to create a simple device with 4 buttons connected ...
• 76
224 views

### Controlling Stepper motor using RC receiver

I am using Arduino UNO with a DM556 Micro step driver to control the Stepper motor. PUL+ --> pin 3 DIR+ --> pin 5 RC receiver --> pin 2 Using CH2 of receiver With out the RC receiver (R9SX) ...
• 21
1 vote
599 views

### How to drive two Stepper motors and use an Ultrasonic sensor together?

I am working on an autonomous robot using two 4-pin stepper motors, HC-SR04 ultrasonic sensor, 2 L298N motor drivers (one for each motor), and an Arduino Uno. My problem is that when I use the stepper ...
1 vote
91 views

### A4988 Jitter on stepper motor, some of the time

Hardware: Arduino Uno Rev3 A4988 Driver Nema 8 Stepper Setup: I've adjusted the VRef of the driver based on the formula VRef = Imot * 8 * Rsen. With the values of Imot = .5 (max = .6), Rsen = .068. ...
• 111
1 vote
71 views

### Need help figuring out how to organise a system to run a stepper motor at low speed without Steps-skipping

TL;DR : How to prevent step-skipping with a NEMA gearbox motor at low speed. I am in the process of creating a system in which I want an object to turn on a plate and to show a letter depending on the ...
2k views

### Using a limit switch to stop a stepper motor

I am building a machine with a moving bed, the bed moves forward and backward. I need to incorporate a limit switch at the two ends that makes sure the motors stop at the two extremes. I have 2 ...
2k views

### How to count steps of a stepper motor with AccelStepper?

I want to turn on my motor and count how many total rounds it has until my limit switch is switched on. After that, I want to count rounds counterclockwise until another limit switch is pushed. For ...
1 vote
73 views

I am trying to use the stepper library and the stepper object is documented like this This function creates a new instance of the Stepper class that represents a particular stepper motor attached to ...
1 vote
184 views

### Where am I going wrong in modifying Timer0 and the ISR interrupts in this example?

(Arduino) Hello I don't know where I am going wrong here, please advise. In the end I want to step a bipolar motor, HIGH/LOW, using Timer0 with OCR0A and OCR0B interrupts to adjust the motors step ...
1 vote
38 views

### Problem regarding on HC-SR04 sonar with an additional stepper and SG90 servo motor

I'm making a project based on HC-SR04 ultrasonic sensor with a stepper motor and an SG90 servo motor. I have done some conditions for my stepper motor that is given below. Now I want to include my ...
• 11
795 views

### arduino 28BYJ-48 stepper only whining, not rotating

Edit, this question has been answered in the comments by chrisl, and also after retesting the code with delay() which showed I forgot to update my lastupdate variable(eerst), I have answered it in the ...
• 154
1 vote
211 views

### Stepper motor with microstep driver

In my project I have to control a stepper motor using arduino and microstep driver, can I control the motor so that it can move 90 degrees then stop for like a second and then move again and repeat ...
1 vote
77 views

### Issue with input from weighing scale controlling a stepper motor based valve

Hello and thanks for any help in advanced. What changes do I need to make to my code to get rid of the issue of the valve opening up again at end of cycle in "Auto" function. Hardware: ...
• 11
105 views

### Why can't I just plug a stepper or gimbal motor (BLDC) into the ground, 5v, and analog pins of my Arduino?

I plugged a BLDC gimbal motor in to my Arduino today, and it made a very small jitter. I tried to set an analog pin for the signal pin of the motor (motor had three pins, I assumed one was power, one ...
• 21
1 vote
639 views

### Arduino Motor Control at a Specific Time

Hello. Currently I'm working on creating an automatic dog food dispenser. I'm using a Arduino Uno R3, an L298N stepper driver, a DS1307 RTC breakout board, a Nema 17 stepper motor, and a breadboard to ...
• 131
1 vote
2k views

### accelstepper continuous rotation with forward and backward control

I am using Uno and the A4988 driver with nema17 motor and finally the Accelstepper, I want to make the motor run endlessly in a direction, but when I press a button I want it to stop and run in the ...
1 vote
124 views

### How to avoid stepper motor to revert its spin direction from code

I'm working with an Arduino UNO and a stepper motor NEMA 17. I would like to know how to avoid the stepper motor to revert its spin direction when I apply a load in the shaft. The motor works as I ...
• 111
1 vote
32 views

### how do i make stepper stop if both sensors are LOW ? im using a adafruit l293d motor shield

I've tried this code below but it doesn't stop it just rapidly switch direction that it looks like it's trembling I think because it always reads the void startF/R thats why it's trembling . I need ...
• 31
338 views

### 12V 28BYJ-40 motor is not generating enough torque

I am attempting to use a stepper motor to rotate one of my split-flap displays. However despite the thing the motor is rotating weighing probably half a pound, it struggles to do so. It really can ...
1 vote
1k views

### AccelStepper Library Help - Simultaneous Motor Driving

I’m working on a 4 wheeled robot driven with stepper motors. I have a Raspberry Pi that sends a random (based on input image) pulse count to the Arduino board serially and then steps that amount. I’m ...
119 views

### Not have to wait for if statement to run

I need some advice. I am trying to code a setup of 4 stepper motors that are connected to a keypad and 2 DC-motors that run a conveyor belt. My goal is to be able to push a key, the correspondning ...
1 vote
240 views

### Why does my stepper motor run when I open the Serial port?

For some reason my motor moves a certain amount every time I open the serial port without giving it any other instructions. It will move further by the same amount if I close and reopen the serial ...
• 13
1k views

### How to let Stepper motor spin constantly?

When i run the code on the Arduino the Stepper only does a small turn every cycle. How can i make that constantly turning? #include <Servo.h> Servo myservo; // create servo object to control ...
• 21
1 vote
326 views

### Moving and Stopping Stepping motor without using delay

I'm using a stepper motor with an external limit switch (so when power is on the motor will know where to start from) with an L6470 motor drive. What I want to do here is when power is ON → turn ...
• 11
296 views

### Coding for RTC and stepper motor

How easy is it to create a code using an RTC to rotate the stepper motor one way at a specific time and back the other way at a specific time? and that time being charged different months of the year. ...
1 vote
749 views

### Stepper motor won't change directions!

I am driving a bipolar stepper motor with an a4988 driver using the AccelStepper library. My goal is to press a button and the motor moves CW, then another button for CCW. I have looked at another ...
1 vote
59 views

### 2 stepper cnc inaccurate

I'm building a simple cnc machine that just writes letters. It uses 2 steppers for x and y axis. Here is how it works generate letters in c# and convert them to list of lines send to arduino mov_xy ...
1 vote
708 views

### Using AccelStepper to move a set distance while a button is held down

I'm working on a project and using a nema 23 stepper motor and driver. Need to be able to move the stepper 1/32 rotation when I press a button. I need a small delay so I have time to release the ...
• 11
4k views

### How to control speed of 28BYJ-48 stepper motor without using library?

Iam using 28byj-48 stepper motor and I want to know how to control its speed without using any library. I got to know that we need to add delays in between steps but I don't know how much delay I need ...
259 views

### Stepper not working properly using L298N

If googled and search here but can't find the same issue. I'm using an Arduino Uno, L298N driver (5v jumper is off - actually just 2 holes where the jumper pins were supposed to be), scavenge stepper ...
• 101
1 vote
116 views

### Serial Communication to Control Stepper

**I wanted to add an updated code after I have finished it to help others in the future if they are ever looking for it. EDIT AT END OF QUESTION AFTER ANSWER AND CODE UPDATE.** I currently have an Uno ...
1 vote
284 views

### How to make motors start when pressing a button, and then go through a cycle with a specific motor order?

I'm very new to arduino and have to work on a project for school. We have connected 3 motors (Servo, Stepper (180 degrees) and a DC motor) to an Arduino Uno, Adafruit motorshield and a pcb. With the ...
• 11
1k views

### Set acceleration for stepper motor with no ending

I have a problem. I am using a stepper motor with 2 buttons. In my code I am trying to rotate the stepper motor clockwise while holding button1 and counter-clockwise while holding button2. To do that, ...
• 123
379 views

### Stepper motor driver not working properly

I have a problem. I am following this guide about controlling a NEMA 17 stepper motor: https://www.makerguides.com/a4988-stepper-motor-driver-arduino-tutorial/ I uploaded the code to my arduino uno ...
• 123
216 views

### DIY CNC Machine Power Requirements

I want to make a CNC machine that uses 5 NEMA 17 rated for 2A and a RAMPS 1.4 to control it all. I have a power supply that can deliver 1.5A at 12V. Is it enough? I am worried that when all 5 motors ...
641 views

### Can AccelStepper accelerate non-linearly?

I am running a Nema 23 motor with an Arduino Uno and a microstepper driver. I am making a torsional vibration demo, which uses a series of springs connected to the motor driveshaft to spin gears. ...
• 55
123 views

### Code for Degrees not

Using Audrino Nano and MKS SERVO42 42 Stepper Motor With Driver Board Closed Loop with the LCD. I have got the motor going by using the menu on board. Now able to run Code1 https://github.com/makertut/...
• 39
1 vote
188 views

### Stepper motor not working as expected

Kunal Gupta: Guys plss help me .... I am having issues in using stepper motor I have tried both 28bjy with uln2003 and l293d .. giving it output supply of 5V . Motor is vibrating but its shaft is not ...
• 81
71 views

### AMIS30543 | DataSheet Understanding CIRCULAR TRANSLATOR TABLE

I was reading the data sheet of AMIS-30543 stepper motor and I didn't understand fully what does this Circular Translator Table means, I have a couple of doubts What does Circular Translator table ...
• 183
1 vote