Questions tagged [dc-motor]

DC motors are commonly used in robotics and vehicles. They come in brushed and brushless versions; the latter also includes stepper motors. Note they are distinct from servos, for which there is a separate tag.

Filter by
Sorted by
Tagged with
1 vote
3 answers
50 views

What options exist to manipulate voltage using a Raspberry Pi, above 5v?

I have a model train set which runs on 0-12v based on the position of a rotary encoder. I would like to have somewhat granular, digital control over the voltage on the track. So far, I'd implemented ...
user avatar
  • 111
-2 votes
1 answer
34 views

control motor with raspberry pi and pi4j 2.0

I want to control a motor and a servo motor using a Raspberry Pi. As I searched, all projects are for pi4j v1.0. I'll be grateful if you guide me. Thanks in advance.
user avatar
0 votes
1 answer
27 views

GPCLK vs PWM using micropython with Pico

I have a DC motor I can spin via ESC connected with a Raspberry Pi 4, but I want to use a Raspberry Pi Pico instead. Using GPIO4, that has the clock, I have this code that works for spinning the motor ...
user avatar
  • 101
1 vote
1 answer
158 views

Protecting PI when driving motors

I am planning on driving two 12V DC motors using the "L293D" motor driver. For that I'm using a 12V battery for the motor supply, and a RaspberryPi to generate a PWM wave to regulate the ...
user avatar
0 votes
2 answers
47 views

How to manage with raspberry pi two L298N H-bridge drivers

I connected to my Raspberry pi 3b+ two L298N H-bridge drivers and 4 motor (two for each driver) and i tried the code below: Assumption: I purposely used this script because I wanted to test the ...
user avatar
  • 101
0 votes
0 answers
31 views

Detect motor running physcially

I'm using the pigpio library to run my motor in my Raspberry Pi like below. ESC = 18 esc_pi = pigpio.pi() esc_pi.set_servo_pulsewidth(ESC, 2000) I'm wondering is there any way to detect the motor is ...
user avatar
1 vote
1 answer
68 views

5 Volt Relay not working as expected

I'm using a rasperi pi 4 and want to run a water pump with it. Connecting the water pump directly to the rasperi pi (ground and 5 V) is working. But I want to be able to control the pump via GPIO and ...
user avatar
1 vote
1 answer
87 views

Controlling stepper motor with Raspberry pi

I am building a sorting machine for a project where I want to sort the balls based on their color. For the actual sorting mechanism I am using a stepping motor (NEMA 17 with Driver DRV8825). I ...
user avatar
0 votes
1 answer
35 views

can I use a 12v car battery to connect to a L298N h-bridge to control two 12v dc motor [closed]

I am new to the raspberry pi world and electronic in general. so I am wondering if it is safe to hook up 20 AWG wires to a car battery and have those wires going into a L298N h-bridge to power 2 ...
user avatar
  • 1
0 votes
0 answers
80 views

Consistent Motor control - specifically 180 degrees

I am struggling to get my motors to perform the same on each run. The first time I run the program, they will perform the same movement about 8/10 times. The second time I start the program, the ...
user avatar
1 vote
1 answer
71 views

3 12V DC motors on raspberry pi with L298N

Completely new to this stuff. For context, I am trying to connect 3 DC motors that probably are 12v. I haven't bought them yet, they will definitely be more than 5v. I want to be able to control all ...
user avatar
1 vote
1 answer
32 views

how to get more juice thru the Adafruit DC and Stepper Motor HAT?

We have a hat https://www.adafruit.com/product/4280 to turn i2c signals into pwm signals, into raw power for a DC motor. Let's start with this sample code: import time from adafruit_motorkit import ...
user avatar
  • 618
1 vote
1 answer
77 views

Solid State Relay only turning on once

My 12v DC motor is only turning on once then off forever. It should turn on and off in the loop indefinitely. What am I doing wrong? I have a simple circuit... Parts: Raspberry Pi 4 (fully updated ...
user avatar
1 vote
0 answers
61 views

Brushless Motor not spinning when controlling with PWM and ESC

I'm currently working on a drone which is controlled by a Raspberry Pi. I try to controll the motors by using PWM on the connected ESCs, which is described in many guides and forums. For that I use ...
user avatar
0 votes
2 answers
56 views

Can Raspberry Pi 4 learn to fly an model aircraft and is it the correct board?

So I have not yet bought a Raspberry Pi, but I just want to know if I have chosen the correct development board that will help to make a model airplane that flies by itself. I know this is too much, ...
user avatar
1 vote
1 answer
54 views

Power supply for stepper motor driver board

I'm doing a project where I wish to use 5 stepper motors simultaneously. I've ordered these (with driver board included) https://www.amazon.ca/gp/product/B015RQ97W8/ref=ppx_yo_dt_b_asin_title_o01_s00?...
user avatar
0 votes
1 answer
927 views

L298n driver with 3.3V Voltage

I am using L298N motor driver for DC motor. First, I tested the motor with Arduino, by giving PWM signals to the enable pin of the L298N pin. I have two questions: Arduino can supply average 5V ...
user avatar
  • 109
1 vote
0 answers
68 views

Pins of GPIO expander 'MCP23017' randomly turning on when connected to multiple motor drivers powering 3V dc motors

I have a MCP23017 GPIO expander connected to four DRV8833 dual channel Motor drivers. This setup is later meant to drive eight motors concurrently. I tried testing a few patterns and noticed that ...
user avatar
  • 151
2 votes
1 answer
106 views

raspberry pi prevent overload current from turning on a high current motor

I am trying to use only 1 power supply instead of 2 to power Raspberry Pi and motor, but when I turn on the high current (>10A) motor, it will lead to the Raspberry Pi restarting. I guess it is ...
user avatar
1 vote
1 answer
47 views

concurrently powering ten micro dc motors in a circuit [closed]

I have built a sort of small raspi controlled remote car with 12 tires using regular drone motors such as these ones and am using a raspberry pi and six drv8833 motor drivers to control them. The ...
user avatar
2 votes
1 answer
80 views

Misreadings from hall sensor after using a motor controller

I am measuring a hall sensor included in a motor. A Raspberry Pi 3b+ controls a Sabertooth 2x32 motor controller through radio Signal (ppm) and the Sabertooth output is connected to the motor. I get ...
user avatar
1 vote
2 answers
272 views

Will my L298N circuit work and will it be safe?

I have a diagram below using two DC motors and L298N motor driver, and I just want to make sure whether everything will work perfectly fine.
user avatar
  • 17
-2 votes
1 answer
60 views

how can you safely assemble and control 4 motors to a rapsberry pi

i am not an electronics expert, before i tried connecting 4 motors to a single motor driver and i think i fried my pi. Could you guys pls suggest a safe way to connect and control 4 motors to the rpi. ...
user avatar
  • 17
0 votes
1 answer
150 views

Speed control for a generic 12v fan using Pi Zero

I am trying to speed control a generic 12V 2 pin computer case fan (80mm x 80mm x 15mm). I have purchased an Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board and a Raspberry Pi Zero W. I ...
user avatar
0 votes
0 answers
46 views

UART communication between Rhino DC servo motor and RPi4 B

I want to communicate with this Rhino DC servo motor with RPi4 B. I enable uart3 in RPi4 by modifying the /boot/config.txt file. In this file, I add dtoverlay=uart3 in the last. When I used ls /dev/...
user avatar
1 vote
2 answers
505 views

Rpi python DRV8833 motor driver setting up and troubleshooting DC motor driving problem

So what I am trying to do is to get the motor to spin but I want to raspberry pi between the motor so I can spin it clockwise for 5 seconds and then spin it anti-clockwise for 5 seconds. But initially,...
user avatar
1 vote
1 answer
299 views

Using Motor Encoders with Raspberry Pi

I am trying to read a quadrature motor encoder with the Raspberry Pi. After attempting to write the code in Python, I came to the conclusion that Python was too slow (which was expected). I tried to ...
user avatar
  • 119
1 vote
2 answers
118 views

L298N motor driver either keeps running or slows down the motor with RPi3

So, according to this video which I had followed, my motors should be constantly running as per the program and should stop running after the program is executed. Instead, when I first ran the script, ...
user avatar
1 vote
1 answer
51 views

How to supply multiple servo motor and dc motor while using gsm module?

I've started rc plane but with internet connection instead of regular radio. My plan is using Ai-thinker A6 gsm module so I can use it as live stream camera and control servo together with blynk. ...
user avatar
1 vote
2 answers
3k views

How can Rpi3B+ use the A4988 stepper motor driver to control a NEMA17 motor?

I am very new to the world of raspberrypi and I am probably making some beginner mistakes. I am trying to move a NEMA17 motor (stepper motor) using a Raspberry Pi 3B+ and a4988 driver. First I set the ...
user avatar
0 votes
1 answer
58 views

brushless dc motor connection

i am connecting 2 brushless dc motors to a raspberry pi B and need help on connecting the correct pins . I saw a video on how to connect one motor but don’t know which ones to use to connect the ...
user avatar
-1 votes
1 answer
108 views

Is it possible to move a stepper motor to a specific angle?

For Example: move.stepper(90°) #stepper now points to the east time.sleep(1) move.stepper(180°) #stepper now points to the south time.sleep(1) move.stepper(263°) #stepper now pointing to 263° I ...
user avatar
  • 1
1 vote
3 answers
41 views

Avoiding voltage drops when simultaneously using multiple DRV8833 motor drivers

I am using three DRV8833 motor drivers. The power supply is currently a usb cable with the ground and power connected to a breadboard with the three motor drivers attached to them. When powering all ...
user avatar
  • 21
0 votes
2 answers
836 views

5V Relay only works if VCC is 3.3V

I am very new to all of this, so please excuse if this is a very basic question. I am trying to power a tiny water pump with my raspberry pi. For that I need the 3.3V or 5V output, because the GPIO ...
user avatar
  • 21
0 votes
1 answer
78 views

Raspberry Pi Model B Current Overdraw from 3.3V Pin

I am using RPi3 ModelB V1.2 for a motor control project. I am connecting Pin1 (3.3V) for power to a micro dc motor. The current drawn by the motor is approx ~70 mA whereas the RPi sources mention that ...
user avatar
0 votes
0 answers
22 views

Motor controller for Raspberry Pi 3 has no effect on attached motors. (Drok XY-160D Board) [duplicate]

I believe this code is correct. I am working connected to the Pi through SSH and tried running it through the Mu shell. Motor controller is hooked up to a 12V power supply. If it helps, I noticed the ...
user avatar
0 votes
1 answer
329 views

Raspberry Pi connected to Motor Controller- Getting error in code

*Hi, I am getting this code error: *blink.py:25: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.* GPIO.setup(ENA1,GPIO.OUT) ...
user avatar
3 votes
0 answers
85 views

Mechanics required for a stepper motor [closed]

I am making an elevator controlled by a raspberry pi zero and driven by a stepper motor. I have managed to get the engine working using a python script and an MPC28017 pin expander (i2c protocol). ...
user avatar
  • 155
1 vote
0 answers
72 views

making a DC motor spin both ways

I week ago, I got my raspberry pi, connected it to a DC motor, and made the DC motor spin using python. now, I'm trying to get the motor spinning both ways. I have tried but failed. What is the best ...
user avatar
  • 109
1 vote
0 answers
88 views

regulating the speed of a motor connected to a TB-6612 FNG motor driver using the pwm output generated by the pca9685 multichannel servodriver

I understand that this type of usage is not typical for the pca9685. I am trying to use one of the pwm pins of the pca9685 to regulate the speed of a motor. As for now the motor works regularly if ...
user avatar
  • 21
0 votes
0 answers
153 views

Connect 5V DC fans to a Raspberry Pi 4

I wish to connect four 5V DC fans (each one current is ~0.1-0.15A) to a Raspberry Pi 4. As I can not add another power supply (PSU) beside the one of the raspberry Pi 4, I was thinking to connect them ...
user avatar
0 votes
1 answer
99 views

RPi drives motors on L298n for a few seconds and then stops

I am trying to make a Robotic Car using 4 motors and L298n for a motor driver. The motor specifications as listed on the purchase site are given below: Operating Voltage: 3V~6V DC Gear Ratio 1:48 No-...
user avatar
2 votes
2 answers
294 views

How to detect an electric current in a secondary circuit (12v)?

I want to detect if there is an electric current in the wire where I wrote "here > > > > > >" (on the image) The secondary circuit is a 12v circuit. How can I do this ? ...
user avatar
  • 123
2 votes
0 answers
40 views

How do i properly daisy chain two motor drivers that both provide power to the Pi zero-w? [closed]

I am using two waveshare dual motor drivers to drive a total of 3 motors with room for another one. The HATs can be placed on top of each other as they have adjustable i2c addresses. I am planning on ...
user avatar
2 votes
2 answers
781 views

Is it ok to power L298N 5V from Raspberry Pi 4 5V GPIO? (or use 6V for L298N power supply?)

Disclaimer: I am a very beginner in electronics and experiencing it's first steps into Raspberry Pi and its functionalities. So, please forgive me any rookie mistakes and correct me if I have any ...
user avatar
0 votes
1 answer
227 views

Delay/Lag when controlling motors with arduino from raspberry pi

I'm making a car-type-thingy where I control motors connected to an arduino with a raspberry pi via serial communication. I'm using the adafruit motor shield to control the motors. I want to control ...
user avatar
2 votes
2 answers
3k views

How can I connect Raspberry Pi to L293D motor driver shield?

I am new to Raspberry Pi and I'm trying to connect my Raspberry Pi 4 to an L293D motor driver shield. I have scourged the internet for circuit diagrams but I have only found either L293D IC or L298N ...
user avatar
1 vote
1 answer
75 views

Using a motor driver such as the L298N with only one GPIO pin

I am currently working on a project that requires many different motors to be powered by a raspberrypi. Common drivers like the L298N use two gpio pins to drive a single motor in a direction, the ...
user avatar
  • 151
-1 votes
1 answer
473 views

Raspberry Pi & Motor Control [closed]

I am looking to use raspberry pi to control a motor that has multiple speeds but want all speed and timing to be controlled on the pi. Would the proper setup be a breadboard with a servo motor ...
user avatar
0 votes
0 answers
48 views

Raspberry Pi3 - Controlling 4 DC motors

I need to feed 4 DC motors of 5V on my Raspberry Pi 3 Model B using PWM (Pulse Width Modulation). Currently, I have the next components: 2 NPM transistors, 1 L293D integrated circuit, resistors (220 ...
user avatar