Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
11
votes
3answers
2k views

What is the advantage of using a motor shield if I want to use a stepper motor?

I know that it is possible to connect a stepper motor directly to an arduino (as displayed here). I know that another option is to use a motor shield (for example the Arduino Motor Shield or the ...
10
votes
1answer
2k views

How to design and debug a custom I2C master-slave system?

How to proceed, when in need of a custom I2C master-slave system? What are the design criteria to apply? What are the debugging tools one can use to troubleshoot problems?
9
votes
4answers
8k views

Arduino motor shield orange/white pin usage

I have an Arduino motor shield like this one plugged into my Mega board. I would like to know some more information about the orange and white pin blocks on the board. The Arduino website has the ...
8
votes
1answer
2k views

How can the Arduino Uno support up to 12 servos if it only has 6 digital PWM pins?

According to this: The Servo library supports up to 12 motors on most Arduino boards and 48 on the Arduino Mega. On boards other than the Mega, use of the library disables analogWrite() (PWM) ...
7
votes
4answers
5k views

Debugging my Stepper Motor Driver circuit

I'm using the Pololu DRV8825 Stepper Motor Driver to control a NEMA 17 Steppermotor with an Arduino Uno. According to the Pololu website, the circuit should be wired as follows: I did, however, ...
7
votes
2answers
8k views

Control/count rotations of a DC motor

Using an Arduino and an L293D IC, can I control the number of rotations a DC motor makes? Or can I only control the direction and speed of the motor? I purchased a two-wheeled robot platform to learn ...
6
votes
1answer
901 views

Can a stepper motor be controlled directly from an Arduino?

I'm planning to build a simple XY plotter, and have been looking at the possibility of using a pair of small 5V 4-phase steppers to provide the movement. In my research, I've often seen stepper driver ...
5
votes
2answers
2k views

Arduino DC motor causes disturbance. What can cause it?

I tried to fix this problem the whole weekend but, after no success I decided to post it here. I would really appreciate any help. The problem The Wi-Fi module activates the DC motor and lets it run ...
5
votes
2answers
3k views

How do I (easily) power a 5 V 3-pin fan?

I have a 5 V 3-pin fan. I want to be able to: power it from an Arduino Uno or a Seeeduino Lotus board, and, ideally; be able to change its speed. Most resources I can find on the web explain ...
5
votes
1answer
33k views

Question different ways of connecting L298N motor driver board to arduino and motors and powering them

I read few posts and tutorials on this topic but none of them kind of answered my questions. I bought this L298N motor board and i have two motors that are rated 3V Now i am trying to understand how ...
5
votes
1answer
3k views

H-Bridge vs Motor shield for the arduino

Assuming we wish to control a small toy car with an arduino - meaning spinning the right and left wheels forward and backward and being able to break and control the speed, where each wheel has it's ...
5
votes
1answer
8k views

Can I use a spare Darlington Pair on my ULN2003A to drive a DC motor?

I'm successfully running a stepper from my Arduino via a ULN2003A and a secondary power supply. It uses the first four of the seven Darlington Pairs on the chip, leaving three spare. A) Is there any ...
5
votes
2answers
634 views

Understanding the relationship of Pulse and Stepper RPM

This may be a better question for the Physics StackExchange so tell me if I should move the question. I have a pretty simple script that I'm using to control the RPM of my stepper motor: void loop(){...
5
votes
1answer
19k views

How to control a Nema 17 stepper motor with an arduino? (too much current / heat)

I am trying to control a Nema 17 motor with a L298n dual bridge and an Arduino Mega. My wiring is from this Instructable: http://www.instructables.com/id/Control-DC-and-stepper-motors-with-L298N-...
5
votes
2answers
5k views

DC Motor Speed Measurement using Rotary Encoder

I have written the following code to measure the speed of a unidirectional DC Motor.I have attempted to measure the time between successive interrupts in order to calculate speed. boolean check; ...
5
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. ...
4
votes
5answers
1k views

Is it possible to make normal pins act like ground pins?

So what exactly I am trying to do is control a motor and be able to turn it both ways without any extra parts. So if the hmp was on (the plus pole) and the hmm (the minus pole) acted like ground the ...
4
votes
3answers
4k views

What happens if I don't use a relay for 5V pump

I am trying to build an automatic watering system by following some examples. However, I don't have all the components for the entire system, therefore I have built it in Fritzing using only the ...
4
votes
8answers
23k views

How to eliminate noise from PWM controlled 12V fan at low speed

I am trying to build a simple fan controller (single fan). So far I have successfully created a circuit which powers the fan with an external 12v DC adapter and added a transistor (NPN) to switch it ...
4
votes
1answer
109 views

Motor running slowly when connected to digital pins, but fine with 5V pins

I am trying to connect a Dagu DG01D motor to my Arduino Uno. First I tried connecting the black wire to GND and the red wire to digital pin 7. My code: void setup() { pinMode(7, OUTPUT); ...
4
votes
1answer
3k views

Arduino motor shield will only work in one direction

I have this Arduino motor shield which is hooked up with two DC motors. The board is the same as this one from Sparkfun. A PWM output controls the speed of the motor, and a digital out controls the ...
4
votes
1answer
2k views

Salvaged Stepper Motor Blues

So recently my company threw away some rather large and reasonably old laser printers. One was a LaserJet 9050dn the other was a Epson printer/scanner combination. Being a little industrial I thought ...
4
votes
1answer
20k views

Reverse turning of Stepper motor

I have a stepper motor connected to my Arduino like this using the ULN2003A Darlington Array: (Ignore the potentiometer) And I have programmed it with the following code: #include <Stepper.h> ...
4
votes
2answers
1k views

How can I connect the Tamiya double gearbox to Arduino Uno?

I'm working on building my first robot. this is my first foray into DIY electronics. I already have an Arduino Uno, and I have ordered the Tamiya double gearbox here. My goal is to control the gearbox ...
4
votes
1answer
596 views

Arduino - stepper motor wrong steps number

I just bought a new stepper motor (400 steps for revolution, 0.9°/step) and I would like make a turn of 180° by 200 steps, but it doesn't work as expected. It looks like the motor needs only 110 steps ...
3
votes
3answers
4k views

How to define a SoftwareSerial object inside a class?

I have a header file called Rhino.h with class Rhino. I want to pass RX and TX pin numbers to this object class, and with this, define a SoftwareSerial object to be used inside the Rhino class. The ...
3
votes
2answers
8k views

Proportional water flow control [closed]

I've been looking at water flow control with Arduino and I'm finding a huge difficulty in managing to do an 'analog' control on water flow. The mainstream solution seems to be the well known solenoid ...
3
votes
1answer
2k views

Two batteries sharing ground?

I need to power my arduino and 2 DC motors requiring 6V each, I want to power the DC motors with a 6V battery through the vM pin on an h-bridge and use a 9V battery to power the Arduino itself. On my ...
3
votes
3answers
9k views

Why is my Adafruit motor shield not spinning my motors?

I'm using the Adafruit Motor Shield v2.3. I'm powering the Arduino with a USB cable and I'm powering the motor shield with a 9 volt battery. I removed the vin pin, and I'm using this tutorial/code to ...
3
votes
3answers
2k views

Controlling a DC motor with an external power source

I'm trying to use an Arduino to release a single drop of water using a solenoid valve.  This article describes how to create this circuit with a Raspberry Pi using a DC powered solenoid that opens and ...
3
votes
2answers
945 views

Newbie Arduino DC motor problem

So I am new to Arduino and new to electronics in general. I've looked up a few tutorials and they all have a simple early tutorial that turns on a DC motor and turns it off again. Something like this: ...
3
votes
2answers
3k views

Why doesn't this motor turn?

When I upload the code, the DC motor makes a humming noise, but doesn't turn. //2-Way motor control int motorPin1 = 5; // One motor wire connected to digital pin 5 int motorPin2 = 6; // ...
3
votes
3answers
16k views

Use Arduino's PWM to control motor direction?

I'm looking for a way to allow Arduino to control a motor using PWM. So far what I have gathered is that using Arduino's PWM sets the digital value of 255 to 5v and 0 to 0v. However what I am ...
3
votes
4answers
2k views

Brushless motor + ESC with Arduino question

Sorry in advance as I'm still a rookie with Arduino projects. My goal is to use an Arduino Uno 3 to create an inexpensive drone/plane project. Here are my materials and my set up: A2212 1000kv ...
3
votes
1answer
12k views

How to make servo rotate for angle bigger than 180°

Connected servo motor (180°) to Arduino Uno R3. Currently I am using a servo motor which have rotation angle specified as 180°, but I have a requirement to rotate to certain angles greater that 180°. ...
3
votes
1answer
53 views

Shield Compatible third party motor driver

I recently purchased an Arduino UNO along with some other hardware. At the time of purchase, I didn't know about Arduino's motor shield and so I purchased a two channel stepper motor driver (2A per ...
3
votes
1answer
708 views

Pause between switching motor direction

I'm new both to this forum and to Arduino. My robot is comprised of Arduino Uno with Arduino Motor Shield, 12V DC gear motor, and two limit switches. The robot supposed to move endlessly on rails ...
3
votes
5answers
33k views

Control Speed of DC FAN Using Arduino PID Library

I want to make a circuit that control speed of DC fan Using Arduino PID Library to get thing at specific temperature. The circuit looks like this but can be changed, The dc fan motor connected to PWM ...
3
votes
2answers
5k views

How can I control 4 DC motors with an Arduino?

In a few months, I am planning to construct an Arduino robot with multiple sensors etc. I will use an arduino mega and a 4wd chassis like the one here: Chassis. The chassis uses 4 DC motors. I was ...
3
votes
2answers
211 views

Connecting a motor to Arduino UNO Play breadboard

I am new to Arduino and have a small query. I am building a simple system that switches on a motor and switches it off after some time and repeats this in a loop. The Arduino that I am using is a “...
3
votes
1answer
265 views

Weird stepper motor behaviour on RAMPS in arduino

Following this tutorial: http://www.instructables.com/id/Complete-newbie-step-by-step-3D-printer-with-all-p/?ALLSTEPS I connected DVD stepper motor to RAMPS 1.4 on arduino with Marlin software with ...
3
votes
5answers
10k views

Controlling Servo Motors with push button. Problem though

I have this setup where I have and Arduino Uno, a mini servo motor, and a pushbutton. I use a single pushbutton to control the servo motor to go to one position, then push it again to go back. It ...
3
votes
1answer
2k views

I2C or SPI to control 6 motors?

I am a hobbyist & know little about electronics. I am making a robot arm, like this one. For which I will need 2 stepper motors (for elbow & shoulder joint) & 4 simple DC motors. Which ...
3
votes
1answer
465 views

Arduino Uno + Jaguar Speed Controller + CIM Motor (12V DC)

I have connected a CIM motor to a Jaguar speed controller, powered by a 12V battery. The Jaguar is connected to an Arduino Uno via the signal and ground. Also, I have two switches connected to the ...
2
votes
4answers
6k views

How do I connect a vibration motor to Arduino?

I'm trying to figure out how to connect a vibration motor to my Arduino. I've come across this resource and it seems pretty straightforward though for a while my eye glazed over at how complicated ...
2
votes
4answers
9k views

How to read data from a rotary encoder with ATmega328

I'm using a home made "bare bones" Arduino, made with the ATmega328, and I need to read angle data from a geared DC drill motor, turning at speeds between 0 and 450 RPM. This is so I can use it as ...
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 ...
2
votes
3answers
730 views

Motor shield leaves no pins accessible

I just bought a motor shield for my UNO, in the pic below: Plugging it into the uno leaves no pins accessible on the board. I’d like to use it to build a robot car, but there’s nowhere to plug in the ...
2
votes
2answers
373 views

How is the diode here effective?

I'm working on project 9 of the arduino starter-kit - the motorized pinwheel. Here is the schematic: The diode in question (and the only one here) is toward the bottom right of the breadboard. It is ...
2
votes
3answers
16k views

Do I need the Motor Shield to drive servo motors?

I was perusing Arduino's list of official shields and noticed the Motor Shield that can be used to drive up to 2 servo motors. Being brand new to Arduino/robotics, I am wondering: do I really need ...