We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [motor]

Use this tag for questions about connecting, controlling, and safely operating motors using an Arduino board.

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

Use joypad to control a robotic arm with 8 servos

I'm using Arduino UNO and the SSC-32U board to control a robotic arm made up by 8 digital servos. At the moment, I'm correctly able to move each servo by using the following code: move1(servo_pin, ...
0
votes
1answer
38 views

Help Troubleshooting L298n connected to dc motor

I am relatively new to Arduino, and I am trying to power a DC motor with the L298N dual H-Bridge. I have done as follows: I am powering everything with the Arduino that is connected to the PC. (I know ...
0
votes
0answers
36 views

Servo not moving

I have connected my servomotor (MG996R) to my L293D motor shield, which is connected to an Arduino Uno R3 Board. I use 4x AA 1.2V NiMH batteries to power the shield, and a regular 9V battery to power ...
0
votes
1answer
301 views

How to connect L298N motor driver to 5v input supply? [closed]

I'm trying to connect 5v supply to a L298N motor driver at it's 12V-35V input pin but it's not working. If I'm connecting to 7.2V supply it's working. Is there any way to connect 5v supply? I want a ...
0
votes
2answers
169 views

Speed Control of Brushless DC Motor

I cannot understand the code of controlling the speed of brushless dc motor using ESP8266 WiFi Module. I found it in- https://ubidots.com/blog/speed-control-for-brushless-motors-with-an-esp8266-2/ ...
0
votes
1answer
32 views

ESP8266 NODEMCU V3, HOW TO USE AND CONTROL V3 OUTPUT POWER [closed]

this is my very first post in here so I apologise if I am not giving you all the information that I should. I am creating this topic to ask you help regarding how to control and use the v3 output of ...
1
vote
1answer
261 views

declared variable inside void setup is forgotten in void loop

if i declare a var in void setup() and try to do something with it in void loop(), it just says that the variable is undeclared. here is the code: #include "Servo.h" void setup() { Servo servo1; ...
0
votes
0answers
266 views

Spinning ESC Brushless Motor Slower

I am controlling a g-series 1000kv brushless motor with my arduino. Currently I have my setup as follows: Now I used the code given to me in a tutorial which is also as seen below: #include <...
0
votes
0answers
240 views

PID controlled DC Motor Speed

I'm writing a PID program for a simple DC Motor. This motor has an encoder at the bottom which allows me to read motor speed. The goal of the project is to provide a constant speed if there is light ...
0
votes
0answers
17 views

Arduino Due and Mega sensor shield control of a 12v dc motor not working

const int pwm = 3 ; const int in_1 = 18 ; const int in_2 = 19 ; //For providing logic to L298 IC to choose the direction of the DC motor void setup() { Serial.begin(9600); pinMode(pwm,OUTPUT) ; ...
0
votes
2answers
23 views

Encoder coupled with motor shaft.Encoder is giving larger redings than expected

I am a rookie and i dont have much experience on arduino. please help me. I intend to build a robot that will drive on a straight path even on nonuniform surfaces like the ones we see in agricultural ...
-1
votes
1answer
49 views

Servo motor not working properly with arduino

I have some problem with my fyp, which is auto serving of food using train. I have 4 servo motors, first servo motor's function is to connect the track to table no.1, and second motor for table no.2 ...
0
votes
0answers
31 views

Control motor DC with buttons

i'm new user with Arduino, i want to know if there is a tutorial to control the rotation of a motor like : with 4 buttons, the first to rotate +pi/2 the second to rotate -pi/2 the third to rotate +-pi ...
0
votes
0answers
14 views

PPM of Wasabi Eco

I'm currently trying to control a brushless DC motor (EMAX 1806-2280Kv) with a ESC called Wasabi Eco 12A (Wasabi Eco specifications#1 , Wasabi Eco specifications#2) I'm trying to control the motor ...
0
votes
1answer
74 views

Slow speed with stepping motor

I am currently working on a project where i need a stepping motor and a servo running at the same time, the servo turns fine and the speed is ok, but the stepping motors speed is very slow and as a ...
-1
votes
1answer
56 views

Brushed ESC won't move slowly [closed]

I'm trying to control the brushed motor in a Traxxas Slash RC car with the built-in XL5 ESC using the Servo library on Arduino. I previously had success controlling this car with a Pololu Micro ...
-1
votes
1answer
56 views

Basic Arduino Airplane Control

I have a task where I need to control the airplanes thrust and altitude direction(Up-Down). For the thrust I thought of using a DC Motor and a Servo for the other. Control of servo will be from the ...
-1
votes
1answer
182 views

How to stop motor after a desired time?

I am trying to stop a dc motor after a desired amount of time !! And the motor starts upon settling on a condition !! From that very moment i want my motor to just run for 5 seconds and stop!! Below ...
0
votes
1answer
390 views

How to control DC motor speed with L298N and Node MCU?

I want to control an RC car with a joystick in mobile. Currently, I can only make the motor move forward and backward but not able to control the speed. Node mcu is used as a processor to receive the ...
0
votes
1answer
49 views

Program to run two motors with Motor driver

I'm trying to make a program that would run two motors clockwise and then anticlockwise. But my program is causing my motors to only run clockwise everytime . It doesn't run anticlockwise at all. Can ...
0
votes
1answer
63 views

Varible Ramp up speed for motors controlled by joytstick [closed]

I trying to create a piece of code which will ramp up the motors speed to a changing value controlled by a joystick. For example joystick requests 120 speed to motors so instead of going 0 to 120 it ...
0
votes
1answer
434 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, ...
2
votes
5answers
3k views

Why is Arduino resetting while driving motors?

I am driving motors for my line-follower project . The circuit schematic is given below The power source is a 11.1V 2200mAh 25C Lipo . Practically the cells give 11.5-12V. I used a switching buck ...
0
votes
0answers
27 views

Can 2 H-Brides be controlled by one Arduino?

The three motors are from windshield wipers, with one of the brushes disconnected in each. The controllers are BTS7960 43A modules One Bridge for two drive motors (speed and direction), and the ...
-1
votes
1answer
74 views
-1
votes
1answer
62 views

L293D with arduino's 5V

I am trying to use L293D with relay to power a 12V DC motor. Can I use arduino's 5V to provide L293D inputs 4 and 8 such as in the drawing? Or do I need to use a separate source, e.g. a power module?
0
votes
1answer
28 views

Arduino acts odd when disconnected from computer

I'm building an self-navigating robot with an arduino, an ultrasonic sensor, and two DC motors. I'm currently within the process of coding the robot but I've discovered I have an unusual problem; ...
0
votes
3answers
195 views

analogWrite is not working - while trying to control DC motor speed

I'm trying to control the speed of DC Motor using Arduino R3 NPN Transistor (2N2222A331) 10k potentiometer 2M ohm resistor Diode I'm not using L298N and I'm also not using L293D. DC motor is ...
0
votes
1answer
61 views

arduino is skipping the if statement [duplicate]

Hi guys I am new to this language and i just tested the code to control a servo motor Can anybody help me please ? here is the code void setup() { servo_test.attach(3); pinMode(9, INPUT); ...
1
vote
0answers
29 views

How can I get the count of pulses of two encoders on the serial monitor?

I have two encoders; I connected them to pin 2 and 3 and I want to count the pulses of them to make two DC motors to work until it reaches a specified number of pulses, than stop working. I have ...
1
vote
0answers
24 views

Having trouble with motor shield running off external power source

I apologize if I don't immediately give important info, I'm very new to arduino's/circuity of any kind. I'll try to include as much info as possible. Some preface: I'm currently working on a project ...
1
vote
0answers
48 views

Help with code for changing motor speed depending on MPU6050 angles read

I have been trying to create code where my MPU6050 is constantly reading the angle it is at and based on that angle, increase or decrease the motor speed. For example the motor will be off when the ...
-1
votes
2answers
50 views

Choosing a motor for my project [closed]

Sorry For my bad English. I will start to make a mini conveyor (100 cm x 30 cm) with an Arduino Uno. What is the best motor should I choose for my project ? - Stepper Motor ? - DC Motor ? Etc. ...
0
votes
2answers
128 views

Servo Motors PWM pins, Arduino Uno

I wanted to understand how people are connecting a servo motor to pins without PWM, so I went searching and I read that the Servo library uses the timer1 of pin 9 and pin 10 to be able to use other ...
0
votes
0answers
21 views

Will this power supply work with a MG-996R Servo?

I'm trying to power a tower MG-996R servo with this universal AC power adapter for an arduino uno project. The adapter can output: 3V/4.5V/5V/6V/7.5V/9V/12V.Output current:1.2A, also has a USB port:5V ...
-1
votes
2answers
80 views

Keep motor moving

I have a problem on how to keep my stepper motor moving when button is released. It should only stop moving if I press the button again. For now, stepper motor is only moving IF the button is ...
0
votes
0answers
28 views

Brushless Motor and Electronic Speed Controller Initialisation Issues

I have been trying to make a brushless motor, working in synergy with an electronic speed controller, to work, however, all I have been achieving is the motor vibrating at a specific potentiometer/...
0
votes
0answers
321 views

How to operate a brushless motor & ESC with an Arduino

I have recently bought two brushless motors (Brushless-300w-6-5-Wheel-Tyre-Motor-Hoverboard-Swegway-Board-Replacement-Part) along with two ESC (https://hobbyking.com/en_us/hobbyking-40a-esc-4a-ubec....
0
votes
2answers
90 views

I cannot compile the Arduino sketch when I remove the void loop function?

#include <AFMotor.h>  AF_DCMotor motor(2,MOTOR12_64KHZ); void movefor (); void moveback(); void setup() { Serial.begin(9600); Serial.println("Motor test!");` `motor....
1
vote
1answer
120 views

Motors triggering Interrupt

I am using a 4wd robotic car to measure straight distances. I have attached two encoders on the front two wheels to measure the distance and I am using the back two wheels to adjust the car and keep ...
0
votes
0answers
25 views

How to connect to Arduino with old L293D Motor Driver

How to connect the below motor controller to the Arduino Uno board. I am new to this field. I haven't seen this type of motor controller in any tutorials. Two motors and input battery points I have ...
0
votes
1answer
66 views

Conveyor and Counter Project

I am new to Arduino and looking for advice if Arduino is the right microcontroller for this project. My project is quite simple, I want to build 3 conveyors using 3 DC motors. At the end of each ...
0
votes
1answer
88 views

Do you need an ESC to run this brushless DC motor with Arduino Uno?

This is the motor: https://www.aliexpress.com/item/Wholesale-JGA25-2418-8-5-1977-rpm-Electric-Motors-Brushless-Motor-High-Torque-Speed-Controlled-DC/32360228129.html I'm hooking it up to the arduino ...
0
votes
1answer
176 views

How to properly run 4 DC motors with an Arduino?

I am working on a project where I have 4 DC motors that is controlled by 2 L293D motor drivers. 2 of the motors act as the wheels of the robot, and the other 2 act as a mop. The Arduino board is ...
0
votes
0answers
74 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
268 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
72 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
229 views

Can I control 4 DC Brushless motors with arduino uno and Adafruit motor shield? [duplicate]

I need to control 4 DC brushless motors. I have no experience with arduino or coding. After some research the cleanest setup seems to be using the Adafruit motor shield, however the motors I'm using ...
0
votes
1answer
140 views

Arduino based fully controlled aquaculture

I am doing a project on aquaculture,so I am using temperature sensor, water level sensor, dissolved oxygen sensor, pH sensor and also 4 motor's and water heater is it possible for a single Arduino to ...
-1
votes
3answers
89 views

NEED Help With Servo motor

I have just bought a MG90s tower pro servo for my school project and there is a problem. As soon as I connect my servo to the cnc shield or directly arduino, the whole arduino board turns off. I ...