Questions tagged [motor]

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

111 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
1k views

Leonardo-based tachometer?

I'm new here. I'm not a native speaker, so pardon my English. I just received my Arduino Leonardo today. I tried some basic calculations and stuff like blinking and LCD interfacing. Its interesting. ...
1
vote
0answers
30 views

L293D to change the direction current and amplify it - Temperature-Stabilizer

I have a question about my project. I'm going to make a temperature-stabilizer. To make this, I think I should use a TEC with a H-bridge and a LM35. First of all, I tried to make a H-bridge by myself, ...
1
vote
0answers
41 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
66 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
vote
1answer
166 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 ...
1
vote
0answers
24 views

CIRC-03 Spin Motor Spin

I am experimenting with CIRC-03 but the DC motor won't start spinning with motorAcceleration(); unless I give it a push. Also, it makes a little noise when it stands still. It does spin, however, ...
1
vote
0answers
53 views

Solenoid flyback, relayboard switch

I want to open a solenoid valve with an arduino, and have set up the following circuit The plan is to add solenoids to every relay on the board. I am wondering if this circuit is any useful, or if ...
1
vote
0answers
185 views

Motor on transistor causes arduino to reset

I have a motor hooked up to the emitter of a NTE24 transistor and ground, the collector is hooked up to 3.7V, and the base is connected through a 10ohm resistor to a PWM pin on an arduino mega, which ...
1
vote
0answers
265 views

How can I connect a force sensitive resistor to a vibration motor via Arduino?

Please forgive me if my knowledge is limited--still very new to this! I'm currently working on my senior thesis for my Industrial Design program and I'm struggling to figure out the components and ...
1
vote
0answers
63 views

Issue regarding executing sketch code when not connected to USB

`I have an Arduino Uno A000066 Board R3 that has an Arduino A000079 Motor Shield Rev3 attached to it. Also I have connected two DC Servo Motors to the Motor Shield and wrote the following sequence: ...
1
vote
0answers
589 views

How can I reduce speed of motor with motor shield?

I'm using Arduino and Adafruit to control 4 motors for a little robot. I have this code example: #include <AFMotor.h> AF_DCMotor motor1(1, MOTOR12_1KHZ); // create motor #2, 64KHz pwm ...
1
vote
0answers
504 views

Controlling 20 servo motors independently with a single Arduino

I am wondering if I can control 20 different servo motors with only a single Arduino Uno board. My motors must be able to rotate in both directions and I also should be able to define the speed for ...
1
vote
0answers
179 views

ATMega328 not able to fully switch coreless motor on

I'm having trouble regarding motor control in a project I'm working on. It uses an ATMega328 DIP package on a PCB. The motors I'm using are small coreless motors and I'm trying to control them using ...
1
vote
0answers
25 views

is it possible to code microservo automatically stop when the speed of rotation getting slower?

my group is doing a project which call automatic bed maker. we want to use a servomotor to pull the sheet of the bed. can we possibly make the servomotor stop rotate when the speed of rotation ...
1
vote
0answers
438 views

Best 2a stepper motor driver for Arduino Uno

What is the simplest (from a user/install standpoint) 2a stepper motor driver for an Arduino Uno? I would like something simple and easy to stack like the Adafruit Motor/Stepper/Servo Shield for ...
1
vote
0answers
201 views

Why doesn't PWM work on arduino in this code?

I am trying to control a dc motor speed with PWM. When I test it with simple program like spin in one direction with set PWM value it works. If PWM>70 the motor will start spinning and max is 255. ...
1
vote
0answers
1k views

How to reverse BLDC motor using programming arduino?

I bought ESC from here but it rotates motor in one direction only. Is there any program which will control direction of rotation clockwise or anticlockwise with same wire configuration.
1
vote
0answers
1k views

Adafruit motor shield 1 and Arduino Pro Mini

Can any one tell me how to connect Adafruit motor shield v 1.0 with Arduino Pro Mini 5v 8 Mhz. Motor shield uses which pins as I want to replace my Arduino UNO to Pro Mini and need re-wiring. Tried it ...
1
vote
0answers
1k views

DC Motor speed control by using pwm

I am using Arduino Uno, and MPU6050(3 axis imu sensors), not gate, and L298 dc motor drive. My algorithm is very easy. Receive an angle how the balancing robot is tilt. Decision speed of motors by ...
1
vote
0answers
146 views

Arduino-controlled current limiter for lathe

I'm building a lathe that will be powered by a 3-phase 750w AC motor (4 pole, max unloaded RPM of 1400 RPM). I want to be able to control the RPM using a potentiometer attached to an Arduino mega ...
1
vote
0answers
619 views

My Arduino Robot doesn't move, and it's the only thing that doesn't work

It will be simple. I started to look at the sketch of the Arduino Robot and just tried one, Disco_Bot, and uploaded it one the top board. The Arduino started to play some music and the name was on de ...
1
vote
0answers
814 views

Motor Shield with 4 DC motors + small servo, which battery is suitable?

I am building my first 4wd vehicle with Adafruit motor shield with one Ultrasonic sensor and one small servo to move sensor. I am facing some problems. Bought 4 motors (2 GM9 and 2 GM3), found the ...
1
vote
0answers
750 views

Which Arduino DC motor controller shield to use?

I wanted to try and experiment on 24 V DC motors (Dual) and was looking for controllers compatible with Arduino Uno. When I found this Pololu TReX Jr 2 x 2.5A 5-24V Dual Motor Controller, the ...
1
vote
1answer
185 views

Ways to turn a knob with a stepper motor and an ATMEGA32u4

Hey all I am wondering what would be the best items to purchase for me to be able to turn this know (continuous) below: As I mentioned above, I would need the stepper motor to have a continuous ...
1
vote
1answer
502 views

Controlling 2 DC Motors with L293D and 6 V battery pack?

Sorry if my question looks newbie, but I'm just starting to delve into robotics and electronics, and my first project was building a small arduino collision-avoidance robot with a ultrasonic range ...
1
vote
1answer
83 views

Arduino UNO not working?

Recently I assembled my Shapeoko machine, we used Grbl shield with an Uno for the same. For 1-2 weeks everything worked perfectly then once when I tried to work the machine, the serial communication ...
0
votes
1answer
18 views

3,6V DC motor spinning with L298N and Arduino

I'm trying to control a re used DC motor from a drill (3,6V) with a L298N and a Arduino. It's powered with a 5V - 60A power supply. I tried to follow this step by step tutorial (https://www.youtube....
0
votes
1answer
23 views

How to power 6 servo motors using battery to create a robotic arm?

I am trying to create a robotic arm. The problem is that I could not run all 6 servo motors -3 MG966r servo motors and 3 MG90S servo motors - simultaneously, using 12V and 3A AC to DC adaptor. Last ...
0
votes
0answers
23 views

Weird behavior when 2 functions are trying(?) to run at the same time

So I just finished my weak project which is a remote controlled car. My problem is that when I press the button for going reverse (as an example) while the opposite action is currently in progress, ...
0
votes
0answers
30 views

Potentiometer motor system is not working

I am setting up a potentiometer system that includes a motor that is supposed to spin with the potentiometer changing the speed of the spin and a button to reverse it. I checked the coding and it is ...
0
votes
0answers
28 views

Motors would make the car go extreme left instead of forward (Self Driving car)

This is my very first day in the community, please bear me until I make myself comfortable here. Coming to my question, I'm making a self Driving car. My car instead of moving forward it moves on the ...
0
votes
0answers
41 views

Motors working with Ultrasonic Sensor and Servo as expected?

So, I tried making an Arduino Project(Controlling Motors by Remote and Ultrasonic Sensor would activate Servo when the distance is less than 50cm). I am trying to build a project, A remote controlled ...
0
votes
1answer
36 views

ESP01 to DC Motor powered via Battery with Power Regulator

Hi I'm wanting to control a dc motor through esp-01 and to have it powered by batteries. To keep my esp-01 safe, I have found the esp-01 adapter to regulate voltage. I am wondering if anyone could ...
0
votes
1answer
71 views

ESP8266-01 Resetting when DC motor runs

DC motor: 3-6v Servo sg90: 3-7.2v Esp 8266 01: 3.3v I have 2 Arduino Uno both has their own ac-dc power adapter. Lets say, 1st Arduino is Ard1 and 2nd is Ard2. The Ard1 communicates to a web ...
0
votes
0answers
18 views

Arduino Mega with Makerfire BLHeli_S ESC strange shaking and shorks

I'm trying to use Arduino to control brushless motors with Makerfire BLHeli_S ESC through Servo library. However, I've encountered the following issue. First, when the Mega board was updating ESC ...
0
votes
0answers
32 views

Regarding Geared motor encoders

I wrote a simple code to count the number of pulses when the motor runs. The code just counts the number of interrupts from the encoder, but the output is very weird. Even when the motor is not ...
0
votes
0answers
23 views

Using arduino uno and an adafruit shield to control 3 dc motors and a linear stepper motor

Hello I am currently doing a project at my university which requires me to order and program 4 motors using an arduino. I will be using an arduino uno and an adafruit motor shield. 2 of the dc motors ...
0
votes
0answers
68 views

Error to work in reverse VNH2SP30

ım building a rover and ı using Johson 12v Dc motor and VNH2SP30. My code and motor works perfectly but my motor driver works only one way. It cant go to reverse and motor starts buzzing when it tries ...
0
votes
0answers
40 views

How do I write my code to reverse the motors in the opposite direction so the RSLK can move backwards?

I've assembled the TI RSLK Robot Maze Edition for a final project for my embedded systems class. Instead of using the MSP432P401R LaunchPad that came with the kit to control the power board, I've used ...
0
votes
0answers
34 views

MPU6050 with Arduino I2C Unreliable with Motor Noise

I have an autonomous wall-tracking robot that uses relative angle changes from a I2C-connected MPU6050 module along with ultrasonic 'ping' sensors for motor speed control to acquire and then track a ...
0
votes
0answers
30 views

Trying to get a servo motor to move to certain setpoints when a control potentiometer shows certain values

Here's my Code so far: void setup() { Serial.begin(9600); } void loop() { float a; float angle; int setpoint; a = analogRead(A1); angle = map(a, 0, 1023, 0, 180); if ( (angle>0) &...
0
votes
1answer
132 views

Trying to control DC motor speed with PID

i'm trying to control a DC motor with PID. I have already made a code where i control the motor with an ultrasonic sensor (for distance) but now i need to run the motor at a given RPM (the Output). I ...
0
votes
2answers
91 views

How to toggle LED and motor on button press?

we want to have a LED turn on with the press of a button, and become brigther and brighter as times go by (whithin a defined time frame), and when it reaches maximum brightness to turn off for a ...
0
votes
1answer
33 views

How to Control 2-wire Rotary-Gear Linear Actuator

Any ideas how to control a 2-wire DC 5V 10mm Stroke Mini Linear Actuator based Rotary Gear Motor? Most linear actuators (aside from solenoids) are controlled via 3-4 wires. Do I need a separate motor ...
0
votes
0answers
26 views

To stop the geared DC motor based on the number of rotation

I am doing a small project in which I need to stop rotating the dc geared motor based on its number of rotation (in my case I need only 2 rotation), after two rotation it should stop rotating. I am ...
0
votes
0answers
51 views

Will this code for braking of dc motor using sensor work?

#define trigPin 13 #define echoPin 14 #define e1 10 // Enable Pin for motor 1 #define t1 8 // Control pin 1 for motor 1 #define t2 9 // Control pin 2 for motor 1 #define led 3 #define led2 5 #...
0
votes
0answers
466 views

Difference between L298 and L298N motor driver

I was planning to buy a motor driver for my project purpose, but I don't understand which motor driver will suit my purpose. As there are two motor drivers available online. Can someone explain me the ...
0
votes
0answers
93 views

Guidance on controlling gimbal brushless motors?

i want to make a gimbal using an arduino and im having trouble finding how to control brushless gimbal motors with arduino as they all go into a BGC ive found a BGMC https://rovertec.com/products/...
0
votes
1answer
101 views

ESP12E motorshield analogWrite issue when powering DC motor

I am relatively new to adruino and this whole space. I am currently trying to power a DC motor using an ESP12E motor shield and an ESP8266 Module Motor Shield - https://www.amazon.com/gp/product/...
0
votes
0answers
582 views

Please help! My Bluetooth Controlled Car Isn't working

I followed this tutorial: enter link description here I built it according to the schematic except I didn't connect an LED (I assume this isn't the problem). This is the schematic: I'm a beginner so ...