Skip to main content

Questions tagged [stepper]

Questions about programming and controlling stepper motors.

Filter by
Sorted by
Tagged with
1 vote
0 answers
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 ...
ghwnsrla's user avatar
0 votes
1 answer
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 ...
dreamcoder's user avatar
0 votes
0 answers
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 ...
ColChope's user avatar
2 votes
2 answers
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 ...
AJ_Smoothie's user avatar
1 vote
0 answers
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 ...
winner's user avatar
  • 11
-1 votes
3 answers
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 ...
Bart's user avatar
  • 1
2 votes
1 answer
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, ...
Michael Junior's user avatar
0 votes
1 answer
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 ...
Noy's user avatar
  • 11
0 votes
1 answer
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 ...
DrBwts's user avatar
  • 161
2 votes
2 answers
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 ...
jonathan's user avatar
2 votes
0 answers
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) ...
MJay's user avatar
  • 21
1 vote
1 answer
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 ...
Renier Jr.'s user avatar
1 vote
0 answers
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. ...
Michael's user avatar
  • 111
1 vote
1 answer
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 ...
Guillaume_slize's user avatar
0 votes
2 answers
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 ...
303jw1095's user avatar
2 votes
1 answer
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 ...
Korte Alma's user avatar
1 vote
1 answer
73 views

Please help me navigate the stepper motor object definition in the documentation

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 ...
Confused individual's user avatar
1 vote
1 answer
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 ...
localmartian's user avatar
1 vote
0 answers
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 ...
Toufiq's user avatar
  • 11
0 votes
1 answer
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 ...
TeD van Loon's user avatar
1 vote
1 answer
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 ...
master mind's user avatar
1 vote
1 answer
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: ...
MikeD's user avatar
  • 11
0 votes
3 answers
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 ...
Nick N's user avatar
  • 21
1 vote
2 answers
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 ...
Carter's user avatar
  • 131
1 vote
0 answers
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 ...
Galal Rashid Sallam's user avatar
1 vote
0 answers
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 ...
CoronelV's user avatar
  • 111
1 vote
1 answer
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 ...
Exes's user avatar
  • 31
2 votes
1 answer
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 ...
KidWithComputer's user avatar
1 vote
1 answer
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 ...
PlasticBlaze's user avatar
0 votes
1 answer
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 ...
user76578's user avatar
1 vote
1 answer
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 ...
SPatel's user avatar
  • 13
2 votes
0 answers
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 ...
Jonasoos's user avatar
1 vote
0 answers
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 ...
Claire's user avatar
  • 11
0 votes
1 answer
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. ...
Rossatron 's user avatar
1 vote
1 answer
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 ...
Epsicro N's user avatar
1 vote
1 answer
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 ...
some rand's user avatar
1 vote
0 answers
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 ...
clint's user avatar
  • 11
3 votes
1 answer
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 ...
Akashbabutammali's user avatar
0 votes
2 answers
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 ...
TungstenX's user avatar
  • 101
1 vote
1 answer
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 ...
PlasticBlaze's user avatar
1 vote
1 answer
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 ...
VKwochi's user avatar
  • 11
2 votes
0 answers
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, ...
A. Vreeswijk's user avatar
0 votes
1 answer
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 ...
A. Vreeswijk's user avatar
0 votes
1 answer
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 ...
DragonflyRobotics's user avatar
2 votes
1 answer
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. ...
czar1249's user avatar
0 votes
1 answer
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/...
Greg's user avatar
  • 39
1 vote
1 answer
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 ...
Kunal's user avatar
  • 81
2 votes
1 answer
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 ...
Lawliet's user avatar
  • 183
1 vote
1 answer
54 views

AMIS30543 | Data-Sheet understanding Status register

I was reading the data Sheet of AMIS-30543 stepper motor driver and I was not able to understand how to combine the result of the Micro step position status register MSP[8:0]. I know that its a 9 bit ...
Lawliet's user avatar
  • 183
1 vote
1 answer
464 views

2 stepper drivers speed control

I'm using two tb6600 to control two step motors. It's for letter writing cnc machine. Moving single axis works fine. I want to push 2 steppers in the same time along a diagonal. I tried to calculate ...
some rand's user avatar