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
-1 votes
0 answers
19 views

Help with Linear Actuator problem 12V

I'm new to the community, I would like your advice to help me with this project. Thank you in advance! I want to power these two 12V Linear Actuators using this LiPo Battery which I bought. And an ...
logpillow's user avatar
2 votes
1 answer
74 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
56 views

Is it possible to use analogWrite() using an external Power Supply Unit?

As far as I know, my Arduino Nano can perform analogWrite() ranging from 0 to 1023 for 0 to 5 V respectively, but I want to control a DC motor which requires 9 V for good performance. Is it possible ...
Tapan Gupta's user avatar
-1 votes
1 answer
181 views

Why does an ESP01 WiFi module reset when it's connected to a DC motor/water pump?

When I connect an ESP01 WiFi module and water pump in a parallel circuit to an Arduino Uno's 5 V pin, the ESP01 stops working. The ESP01's built-in LED starts blinking chaotically and the serial ...
stanimirsp's user avatar
-1 votes
1 answer
81 views

L298n driver with Arduino with 2 motors won't work

I connected the 12v power supply with 9v battery. The problem is that when i run 1 motor at time from any side (out 1, 2 out 3, 4) it works perfectly, but when I try to run both of them, only one will ...
nitu sahay's user avatar
1 vote
0 answers
59 views

How do I control a BLDC with greater precision using bluetooth?

I am building a quadcopter drone and I have 4 BLDC motors that I can control using an HM10 Bluetooth module and the "Dabble" application. My problem is that when I use a virtual joystick in ...
gabe29's user avatar
  • 11
-1 votes
1 answer
77 views

Arduino not reacting sometimes when reading serial commands

When I am sending hex numbers via computer to the arduino leonardo, it sometimes won't react, but the serial monitor says that it was sent. My code; void setup() { Serial.begin(9600); pinMode(...
Kyle_3_1415's user avatar
2 votes
1 answer
73 views

I would like to know why my four gear motors are rotating at different speeds when connected to 2 L293D motor drivers, controlled by the arduino

Ignore direction of the motors(for now). This is my connection diagram. Any and all improvements to this are welcome. Bottom left motor seems to run at 210-224 rpm Bottom right motor runs at 160-180 ...
Veeraja Veeraesh's user avatar
0 votes
1 answer
116 views

Problem with Bing generated code for automated chicken coop door

Glenn from Sweden here. I was wondering if some kind soul could help me out here. My partner bought a cheap chinese knock-off automatic chicken coop door that operates based on sunlight. Link to the ...
Glenn's user avatar
  • 13
2 votes
2 answers
186 views

Using Internal Timer Interrupt to Read Analog Sensor

I'm having difficultly using an internal timer interrupt with my Arduino Nano to properly capture a specific value from a linear potentiometer and then instantly stopping the actuator. I basically ...
wickedhurricane's user avatar
2 votes
1 answer
57 views

Code not Executing Reliably on Push Button Activation

I have put together the following code to activate a motor using an Arduino Uno via push buttons. Two push buttons should be pressed simultaneously to activate the motor for a specified number of ...
chandler's user avatar
3 votes
0 answers
64 views

nano 33 BLE problems with reading RC signal

I'm using an Arduino Nano 33 BLE and a L293D motor driver to control a three-wheeled RC robot. The sketch I'm using worked fine with my Uno Rev3, but I've moved to the Nano for size/weight reasons, ...
starthrow's user avatar
1 vote
3 answers
132 views

are 4AA batteries (6V) power my arduino

I'm actually new to using arduino , and trying to make a simple car, using two dc motors, a l298n and an arduino, the problem is that a 9v battery doesn't seem enough to just power the l298n and one ...
Marouane Rakine's user avatar
1 vote
0 answers
181 views

ESP8266 + NodeMCU Motor Shield spinning motor only in one direction

I hooked my ESP8266 Wi-Fi module to an ESP-12E Motor Shield and connected it to an RC car. It works fine when connected to my laptop (Goes forward, backward, left, and right. Though the car doesn't ...
Hamaad Fahim's user avatar
4 votes
2 answers
140 views

Arduino resets or stuck during run, only when DC motors are connected

I'm using an arduino connected to 2 DC motors through L298N. the arduino is powered by a 9V battery, and the L298N is powered by 4 AA batteries. there's also a switch that starts the movement. I've ...
young marx's user avatar
1 vote
0 answers
44 views

I2C Motor Driver (TB6612FNG) and DC fan error

I running the following code with Seeeduino Cortex M0, DC fan and Grove - I2C Motor Driver (TB6612FNG) but I get error ,any idea why? Code: #include "Grove_Motor_Driver_TB6612FNG.h" #...
alirazi's user avatar
  • 21
1 vote
1 answer
167 views

ARDUINO DC Motor Control over IR Sensor INPUT

I'm working on a school project where I'm building a small convyeor belt using an ARDUINO, DC motor and IR sensor for moving object detection so my color sensor can read color value. I'm using single ...
Sunny Gavali's user avatar
1 vote
1 answer
58 views

timing changes once DC motors are connected to power

I'm using an arduino uno with two DC motors. I'm also using the built in LED to tell me when the motors should be on as a debug tool. The code is a simple while loop that turns both the motors and the ...
young marx's user avatar
1 vote
0 answers
23 views

This DC Motor shouldn't have any current while I'm not pressing the button (pin 7 is LOW) but it has. (When I'm pressing the button its as intended)

I can't seem to find the problem, and I believe its not about the code but I will give you the code nevertheless. const int pinOFswitch = 4; const int motor_3 = 7; const int pushbtn = 5; void ...
IM OG's user avatar
  • 11
1 vote
1 answer
64 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
-1 votes
1 answer
32 views

Controll the dc motor that works with 2xAA bateries using 5v

I have a toy that has a dc motor and is runing with 2xAA bateries ( i think it is 3v motor) So i want to run it with 5v power supply. First question: Can 5v damage the motor Second question: i think i ...
wuqn yqow's user avatar
0 votes
1 answer
254 views

control 12v motor with NPN transistor via arduino

i want to control this 12v motor via arduino: Power source is 12v 5A motor will work 5 seconds in every 5 minutes and will be activated throught arduino mega i will try to use bd679a darlington ...
wuqn yqow's user avatar
0 votes
1 answer
103 views

Single Method for 2 Ultrasonic Sensor is not working as expected

So I have created a method to read and return Ultrasonic Sensor Data. I have 2 Ultrasonic Sensors. Below is my code.    // Ultrasonic Pins    #define T1 2 &...
Ansari Aquib's user avatar
1 vote
1 answer
803 views

What is the best (fastest and most robust) way to send messages back and forth between Python on a PC and an Arduino, over serial?

I am trying to communicate between a PC running Python using PySerial and an Arduino. The Arduino itself has a CAN shield, and is responsible for interfacing with a motor. My goal is for the PC to ...
ITregear's user avatar
1 vote
1 answer
423 views

Motor with ultrasonic sensor

I am new to programming so bear with me. I am writing a simple code to control a motor such that the motor will turn at full speed as long as the sensor does not detect an object within 5" of the ...
Pilot Ken's user avatar
3 votes
1 answer
452 views

I'm using nRF2401 and in my transmitter and receiver the Rx is not blinking and Tx is blinking; why does Rx not blink?

I did a search on the meaning of RX and TX and it seems TX means sending data and RX means receiving data. So when my transmitter is turned off, my receiver looks like this and it works with a battery:...
dagh's user avatar
  • 31
2 votes
1 answer
405 views

What components can be connected to pins 0/1 (RX/TX) without preventing uploading of code?

For a robot project I am using an Arduino Uno, and am running out of pins. The simplest solution would be to use digital pins 0/1. I know this means that I won't be able to use Serial communication (...
Rustony's user avatar
  • 31
1 vote
0 answers
131 views

I’m having trouble getting a motor to run for 10 seconds and then reverse direction every time push button is pushed down

i am brand new to arduino and was looking for a little help. i am looking to activate a motor once the button is pushed for 10 seconds and then have it stop. then the next time the button is pushed, ...
joe's user avatar
  • 11
1 vote
0 answers
135 views

Motor rotates well in one direction but runs slower in other with L298N and L293d

I connected 2 motors with an L293Nn driver. When I control it with my joystick, one motor works fine (Out 1 and 2 of driver.) It rotates in one direction and the other very smoothly. The problem ...
HexaTech's user avatar
1 vote
1 answer
542 views

Servo keeps resetting position when there is no difference in received value?

So I'm working on a code that basically receives x and y coordinates and stores them in a variable. Whenever a coordinate is received, it goes through a conditional statement to store them in a ...
Black Prime's user avatar
2 votes
1 answer
104 views

How to combine servo shield with peristaltic pump?

I am creating a project where I need 16+ (possibly up to 20) servos to open/close liquid flow through tubing, which in turn will be controlled by a peristaltic liquid pump (https://www.adafruit.com/...
nn123's user avatar
  • 21
1 vote
0 answers
35 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
1 vote
1 answer
616 views

DC Motor not running with the L298N (Green) card

I have a DC motor connected to a L298N (Green) controller. The controller is receiving electricity but the motors aren't. This is how we wired everything Our code: #include <SoftwareSerial.h> ...
Emir Sürmen's user avatar
1 vote
1 answer
99 views

PWM and attachInterrupts issues

I'm trying to control the speed of a DC current motor with PWM. I use an arduino UNO to send PWM signal to a mosfet Velleman vma411 to change the average tension of a my motor which is wired to ...
Grégoire Lefebvre's user avatar
4 votes
2 answers
807 views

Controlling a 5V fan and ultrasonic fogger with an arduino - do I need an external power supply?

I know the whole controlling a fan with an arduino thing is getting old, but somehow I still don't get it to work. Tried to answer it based on other questions but I am too much of a newbie to ...
crabdance's user avatar
1 vote
1 answer
54 views

Selenoid motor not responding to NodeMCU instructions

I just start a project migrating from Arduino Uno to NodeMCU, basically this projects control some selenoid motors triggered by a website instructions. For example: if website returns 2, the motor #2 ...
semasad's user avatar
  • 13
1 vote
0 answers
115 views

Controlling DC motor with joystick using Arduino

I am working on modifying code to control two DC motors with a joystick using Arduino. The code I have works, but the motor accelerates very rapidly and is difficult to control. I would appreciate any ...
Alex's user avatar
  • 11
0 votes
3 answers
85 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
164 views

stop motor instantaneous with hall sensor problem

I have a problem with stopping motor at same spot when magnet pass.. I tried to add interrupt and to make code as clean as possible but no joy so far. Any suggestions? sw will add later, just ignore.. ...
Milos's user avatar
  • 11
1 vote
0 answers
312 views

Arduino Nano PID Controller with Potentiometer + IBT-2 Motor Control Board

I have a potentiometer connected to an analog pin A1 and would like to implement PID Control to move a robot arm up and down based on to a given serial command. For this to work I will need PID out ...
Tonderai Ratisai's user avatar
1 vote
1 answer
83 views

can differential drive work together with ultrasonic sensor?

I've written a sketch to drive a differential drive system, specifically - to be able to drive strait. This does work. So I am trying to add the ability to stop when the path is blocked using US ...
יחזקאל הירשהורן's user avatar
1 vote
2 answers
2k views

motor driver only works on one side:

I have 3 motor drivers and all 3 other them only seem to only work on one of the 2 sides. I have used a voltmeter to check the voltages across the each of the 2 sections on each motor driver. For all ...
DigitalRookie4's user avatar
1 vote
0 answers
861 views

Using L298n motor driver without jumper (Voltage Regulator)

When I am using 9V supply with motor driver and Jumper connected so the red LED was blinking but when I did the same using 9V and 15V supply removing the jumper LED didn't blink. Neither the voltage ...
Ohm Vaghela's user avatar
2 votes
1 answer
541 views

How to control multiple servo motors at the same time with protothreading using an I2C PCA9685 PWM board?

I'm trying to use protothreading to control two (and eventually four) servo motors over I2C using a PCA9685 PWM board. To start, I am simply trying to sweep the two motors back and fourth at the same ...
H. M's user avatar
  • 31
1 vote
0 answers
391 views

How to control multiple servo motors simultaneously using protothreading?

So I'm trying to control 4 servo motors simultaneously using the Protothreads library by Ben Artin, but I am starting with 2 just to see if it works. I have succeeded in getting two LEDs to blink at ...
H. M's user avatar
  • 31
1 vote
0 answers
104 views

Is there a VESC firmware implementation that runs on Arduino?

I am looking to use an Arduino in a motor control application, and have found that the VESC^ project has done some good work in this. I would like to have some fine-grain control over the motor drive, ...
J Collins's user avatar
  • 295
1 vote
1 answer
119 views

MC33926 Brushed Motor Driver (Shield/Carrier)

How can I use a MC33926 Motor Driver like it is offered for Arduino to drive forwards, backwards with a PWM and a direction control. The problem is that the MC33926 has Inputs IN1 and IN2 and not PWM ...
cat's user avatar
  • 177
0 votes
2 answers
282 views

L298N motor controller board EN pins

For this device are the enable pins meant to be connected to PWM pins? If so then how am I able to use this device with an arduino uno? The uno does not have any pwm pins right?
Sanchez2009's user avatar
1 vote
1 answer
255 views

How to gradually increase and decrease the speed of a motor using IR remote

I am making an IR controlled helicopter and I have the very basic part of the code done, but I don't know how to make the motor gradually increase speed. I want the motor to gradually increase speed ...
Renier Jr.'s user avatar
0 votes
1 answer
59 views

Unable to get readings for "Motor with Encoder"

I've posted to the DFRobot forum, who makes the FIT0186 motors, but no one seems to be replying there. So, excuse the copy pasting. It's probably an issue with the motor/encoder, but perhaps it has ...
djb's user avatar
  • 103

1
2 3 4 5
14