Questions tagged [stepper]

Questions about programming and controlling stepper motors.

Filter by
Sorted by
Tagged with
0
votes
0answers
31 views

How can I pause a stepper motor with a ultrasonic sensor?

I'm trying to use a stepper motor to stay stationary and rotate about 90 degrees, when the ultrasonic sensor detects something in front of it, and stay at that position until the ultrasonic sensor ...
-2
votes
0answers
30 views

Stepper motor with 3 limit switches

can any one help me by programing for below steps: 1) when the button on, check stepper motor at home position limit switch 1,if not steeper motor at home position actuated to limit switch 1. 2) moved ...
1
vote
0answers
19 views

Arduino Uno - Stepper motor not working with button

I am completely new to Arduino, and all sorts of hardware and software. I have a stepper motor, which I want to rotate by a number of rotations when I press a button, and then go backwards by a number ...
1
vote
2answers
158 views

Execute code only once

I am trying to create an if statement that only runs once, the very first time the void loop is started and switches to another code after that. But the following only executes stepper1a(). Any help ...
0
votes
1answer
35 views

Can you drive a stepper motor without the L293D

Can you drive a stepper motor without L293D. Don't awnser without giving explanations or saying it will be cheaper to buy the L293D. Thanks
0
votes
1answer
39 views

Accelstepper - how to switch from fullstep to halfstep in loop?

I am using Accelstepper library to control a unipolar stepper motor. In my project, I would like to run the stepper in full-step mode when I need speed and in half-step mode when I need precision. As ...
0
votes
0answers
41 views

how do i use a Nema 34 stepper motor with DM860 motor driver using input degrees?

I use Arduino and I'm beginner. Anyone can help me for the script code? I use the code below, but i don't understand.
0
votes
2answers
28 views

Controlling a Stepper Motor - sending to specific positions on a 'buttonPushCounter ==' cue, forwards and backwards

I am working on a project using an Arduino control a Stepper Motor. The motor drives a lead screw which moves coloured filters to specific positions along a linear track - forwards and backwards. The ...
0
votes
1answer
150 views

Powering an Arduino directly from a motor driver (DRV8825) or external power source?

Hello people from StackExchange, I'm new to Arduino and driving stepper motors in general; please excuse me for my limited knowledge on the subject. I've been doing research for a few hours already, ...
0
votes
1answer
38 views

Code causing Servo motor not to work!

My sketch is compiling and loading, but when the program runs, the Servo motor does not work. The buttons work, the LED light works, Piezo buzzer plays the melody, the Stepper motor works but not ...
1
vote
1answer
176 views

Control Stepper via Serial Monitor

I would like to control my stepper via serial monitor and unfortunatley the code below did not work. Serial monitor works (Serial.println()), but it does not execute the stepperOne() part. Any ideas ...
0
votes
0answers
39 views

How do you make a stepper motor move at decimal (such as 0.5) steps?

if I were to use a code with the following format, //some loop digitalWrite(STEP_PIN,HIGH); digitalWrite(STEP_PIN,LOW); // each loop would make the motor move at one step. With this loop I can also ...
0
votes
1answer
95 views

How to Home a stepper and make it move 45 degree after that

I am trying to let a stepper find home (via microswitch) after power up. After that make it move 45 degrees (or the equivalent in steps) and wait for 3 seconds. Below is the code i found/adapted. ...
0
votes
1answer
97 views

Controlling 3 Steppers exactly

Update Here the update regarding the code I tried to program. I have a stepper with an attached disc with little holes every 45 degrees where a microswitch can rest into (hole is the exact size of ...
0
votes
0answers
132 views

map() function with stepper motor

I am controlling a stepper motor with a potentiometer and I am trying to map the potentiometer values (0-1023) to the stepper motor steps (200). I only want this stepper motor to turn 1 (one) rotation ...
-1
votes
2answers
42 views

I need help makeing a light flash while a stepper is constantly moving

The starter code. #include <Stepper.h> const int stepsPerRevolution = 120; // change this to fit the number // for your motor of steps per revolution // initialize the stepper library on ...
0
votes
0answers
51 views

How to make a stepper motor move at sinusoidal acceleration?

I am new to arduino but I know basic concepts. How do I make the motor move at sinusoidal acceleration? I used the accelstepper library and it seems that at the end of each loop of distance with ...
0
votes
1answer
154 views

AccelStepper Library: How do I go to a position without decelerating?

When I make the motor move at a certain distance with setMaxSpeed(), setAcceleration(), and moveTo(), it always accelerates and decelerates. Is there a way to disable the deceleration?
0
votes
0answers
56 views

How do you make a stepper motor move in accordance to earthquake data using arduino?

I am new to arduino. I can import the acceleration data from a text file into arduino and I can also make the motor run at that acceleration with a distance calculated from an equation. I use the ...
0
votes
1answer
160 views

Controlling multiple stepper motors non-simultaneously

I want to control multiple stepper motors one after another and at different speeds/directions. I am using the ULN2003 driver and the stepper has 5 coils. My current code for controlling one motor is:...
0
votes
1answer
91 views

LB1847 stepper controller :how to connect to grbl atmega based board with step ,direction,enable , limit?

I like to use an LB1847 chip with stepper motor "both salvaged from old copier". I made a GRBL AtMega board, this board gives step, direction, enable and limit leads. So I tried to find the ...
0
votes
1answer
82 views

Using timer classes within classes

I am trying to develop a class for a pump that works on a stepper motor, it should be simple but its not working the way I thought it would. Once I move the timer object into the class the code wont ...
1
vote
1answer
976 views

Stepper Motor won't reverse/turn CCW

Before bothering anybody, I've been Googling this issue for the last three weeks and have not been able to solve the issue, so must reach out for help. My son has done multiple Arduino projects after ...
-1
votes
1answer
1k views

Arduino NOOB - Stepper Motor + Rotary Encoder Control

I have a very basic Arduino setup : Arduino Uno Rotary encoder Nema 17 stepper motor + A4988 driver How can I control the rotation of the motor with the rotary encoder? How can I get it to make one ...
0
votes
1answer
340 views

How to connect a SilentStepStick TMC2130 stepper driver?

please excuse the noob question Am connecting a SilentStepStick to arduino with a stepper, for bench testing. It requires 5V power, plus I have a 24V power supply for the steppers. +5V connected to ...
0
votes
1answer
65 views

problem with reading PS3 controller buttons

I'm working on a camera slider mount with an X stepper (to move along slider), Y stepper (pan left right) and Z stepper (tilt up down). All of this is being controlled by a PS3 controller (PS3BT ...
1
vote
1answer
229 views

How to randomize the delay in Arduino Stepper code?

How does one add a random DELAY between 10 and 20 seconds? For example in the following stepper logic I have a delay of 11 seconds - expressed in milliseconds as: delay(11000). What would I need to ...
1
vote
2answers
91 views

Arduino Clock Speed effect on Stepper Speed

I am running a Pololu A4988 Stepper driver with two (soon to be three) steppers using the AccelStepper library. I have wired 1/8th microstepping on both as smooth running is important. The motors ...
0
votes
1answer
1k views

Stepper Motor - Limit Switch for Position

I'm following this guide https://howtomechatronics.com/tutorials/arduino/diy-motorized-camera-slider-pan-tilt-head-project/ My question is with the following piece of code used to calibrate the ...
0
votes
2answers
64 views

Passing a reference as a variable

I have a function for manually jogging a stepper motor using the AccelStepper library. At the beginning of the function I would like the motor in question to be selected until told to stop. Here is ...
0
votes
2answers
817 views

Nema 17, Arduino Uno and stepper motor drive ~2H42B

I tried running Nema 17 stepper motor using the drive in the pic below (not the basic L298N drive, which BTW I successfully used to rotate the motor) . Could any of you review my existing connections ...
0
votes
1answer
77 views

I want to make my stepper motor work for 1 hour [closed]

I already tried code that makes the stepper motor work for a few minutes only. I'm using a clock module, a DS1302 and the stepper library already present. Also the driver I'm using is an L298n. If ...
1
vote
1answer
260 views

Problem in reading data from encoder with arduino

Hello guys I am trying to count the number of the steps of a stepper motor with an encoder (Avago heds). I found an Arduino sketch to count that steps and display them on the console and I found ...
1
vote
2answers
136 views

DC motor with L289N driver cannot set RPM lower than 130

My setup is using an Uno r3, and the motor driver is an L289N. I am going to set it to run at a lower RPM, but when adjusting enA or enB to set to below 130, it won't spin. // connect motor ...
0
votes
0answers
276 views

Programming NEMA 17 2 Phase, 4 Wire Stepper Motor

I have successfully programmed the Stepper Motor 28BYJ-48 with ULN2003 driver using the code below. But then I replaced the 28BJY-48 with a NEMA 17 Motor then it won't work anymore. I researched that ...
1
vote
2answers
103 views

Too many amps for Step motor

I have an adafruit motor shield and attached the Nema 17 stepmotor. Now the big problem is trying to power it without it overheating. I was originally using a 12v 6a power supply but quickly switched ...
1
vote
1answer
208 views

How to drive 16 stepper motors with Arduino?

I'm trying to drive 16 of these little steppers on an Arduino Uno. Each test driver uses 4 digital pins for control (2 for each coil) so that would be 64 pins I will need. I'm thinking either ...
0
votes
1answer
207 views

L298 with stepper.h disable break

I try to control a Stepper motor with an arduino and a L298. I use the library stepper.h and it works well but i have a problem : the L298 become very hot. So i want to disable the break (the thing ...
0
votes
0answers
313 views

Error when moving stepper motor - Alexa curtain opener

I've hit a wall with my code and keep getting a Panic error like this: Panic /Users/lewisaburrow/Library/Arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/core_esp8266_main.cpp:98 ...
0
votes
2answers
330 views

Action while button is pressed

My issue is that I can't rotate the motors continuously. If I press any button, motor.step will be executed and then it stops, even though I didn't release the button. This is my project so far. Code: ...
0
votes
2answers
45 views

Question about Variables [closed]

is there a way to use a previous assigned value to variable to adjust the step motor? what i mean is: example: Sensor reads 100 degrees so Adjust the step motor to 100 degrees and hold, then after ...
0
votes
1answer
749 views

A4988 and capacitors [closed]

I’m working at a project which involves 3 stepper motors that are driven by A4988 drivers. I have read that I have to connect an 100uf capacitor in parallel with the motor power supply that goes to ...
1
vote
1answer
128 views

Slowly decreasing the speed on a steppermotor over time

I am currently working on an elevator for my examsproject in school. It's a quite simple simulation of a lifesize elevator. I'm currently using a steppermotor for the elevatorchair and it's set with ...
0
votes
1answer
2k views

Run two stepper at same time

I am trying to run two stepper motor at same time with different RPM. I decided to use two rotary encoder for change the RPM separately. But, I am in problem with driving stepper at same time due to ...
0
votes
1answer
42 views

Steppers only vibrate, not rotate with I2C

The goal of my project is to be able to control two steppers with 4 buttons. Steppers are connected to Adafruit Motor shield(the older one) which is stacked on Arduino UNO, buttons are connected to ...
0
votes
1answer
743 views

Arduino UNO(master read) + NANO(slave write) i2c buttons+stepper

First of all, I'm new to arduino. Check the EDIT line below the two codes. I have connected motor shield to arduino uno. Connection between the two arduinos are A5 to A5, A4 to A4, 5V to 5V and GND ...
0
votes
1answer
201 views

Adafruit Motor Shield steppers not turning

The Adafruit Motor Shield is connected to 2 steppers which are wired correctly and work when I just use the onestep function. I understand that I cannot drive both at once, so I am using a while loop ...
0
votes
1answer
99 views

Two stepper one by one

I want to run two stepper motor one after the other Stepper1 has to5 rotation And stepper 2 has to move 1rotation Here is the code Stepper 1 is nema 34 And stepper 2 is nema 24 #include <...
0
votes
1answer
197 views

Connecting six stepper motors to Arduino Uno [closed]

I need to control six stepper motors using an Arduino Uno but most of the CNC shields I saw can control only four at a time. Is there a way to interface two CNC shields with a single Arduino Uno?
-1
votes
1answer
397 views

Will Arduino Mega support stepper motor NEMA 24, NEMA 34

Will two stepper motor NEMA 24, 10 kg cm, 2. 8 amp, 24 vdc work at same time on Arduino Mega and when they stop stepper motor NEMA 34, 34 kg cm, 4amp, 24 VDC will work or not? This is my first project ...