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

Right controller for NEMA 17 stepper motor (Creality 42-40)

I've got a couple ELEGOO 28BYJ-48 ULN2003 5V Stepper Motor + ULN2003 Driver Board kits and an old Creality stepper motor (42-40). I tried using the board with the (42-40) stepper motor and I felt the ...
J.Milliscone's user avatar
2 votes
2 answers
87 views

Cannot use global variable in pio function

I am working on a project in which I need to control a brushless motor with a microcontroller. I have chosen the Pico as I already have some on hand and there is a high chance of it being completely ...
lpinfinity's user avatar
0 votes
0 answers
35 views

I think I've shorted my Raspberry Pi using a Picoborg, but I'm not sure how? Help?

So I've been trying to work out how to control a Furby Boom (2013) from a Raspberry Pi Zero W and was working on connecting the Furby's DC motor to the Pi through a Picoborg. I then ran one of the ...
maemaimimi's user avatar
0 votes
1 answer
77 views

DC Motor + goBILDA Speed Controller + Raspberry Pi 3b+ : Moves clockwise but won't move counterclockwise

I appreciate any help in this puzzling situation - I'm at a loss here. As part of a Robotics project, I'm trying to control a motor with a Raspberry Pi. The exact components I'm using are: A ...
Diego Alves's user avatar
0 votes
1 answer
56 views

Which way would be best to build a coin sorter that can sort by diameter and thickness?

So lately i've been wanting to build a coin sorter using a raspberry pi or similar that can sort diameter and thicknesses ranging from 5 mm to 35 mm and 0.8 to 3 mm respectively and place the thickest ...
ColeH34's user avatar
-1 votes
1 answer
95 views

How to run a bidirectional ESC with pigpio library

I'm using a Raspberry Pi 4. I have managed to run a unidirectional ESC using the following code: import time import pigpio ESC=13 pi = pigpio.pi() if not pi.connected: exit() # step 1 to arm ...
Arif's user avatar
  • 11
0 votes
0 answers
36 views

Use dc motor with ultrasonic distance sensor HC-SR04

What I want to do is when the distance detector senses that I am less than x distance away, the DC motor (controlled by l293d chip) activates. My problem is that I have only worked with the ultrasonic ...
yesn't's user avatar
  • 11
1 vote
1 answer
115 views

How to run Brushless Motor with raspberry pi 4

I'm using raspberry pi 4 with the pigpio library. I can get the motor to turn on by entering the following commands into the terminal but how do I run the motor with python in visual studio code lets ...
Arif's user avatar
  • 11
1 vote
3 answers
70 views

DC Motor not responding to GPIO Motor

I want to control 4 DC Motors from a Raspberry Pi. I am just starting by making sure that 1 motor can be controlled. I am following this guide: https://projects.raspberrypi.org/en/projects/physical-...
network_learner's user avatar
2 votes
1 answer
28 views

Motor Controller Board Uncertainty for Raspberry Pi

I have a Raspberry Pi 4 Model B. I am trying to build a small car with 4 motors by using the GPIO pins to control the motors. I would like to be able to make the motor go forward, reverse, and ...
network_learner's user avatar
3 votes
1 answer
216 views

How to make stepper motor run faster [closed]

I'm using a raspberry pi 4 8GB with a DRV8825 driver to run the stepper motor, the stepper motor is a NEMA 17 rated at 1.7 A. The problem is that the stepper motor can't run at high RPM's. I have ...
Ramin Moradi's user avatar
5 votes
1 answer
69 views

Using a Raspberry Pi 4 for motor control

I am fairly new to electronics and am trying to build a drone from scratch as a hobby project. I want a setup where I can control all the motors individually through the software. Through some ...
ArjunSahlot's user avatar
-1 votes
1 answer
71 views

Motor control using an RPi zero

I want to control a small 5V servo motor (2 pin) with my RPi zero, but I don't know how to achieve this. I just need the motor to turn on for a set time e.g 30 seconds, and then turn off, so I figure ...
Jake's user avatar
  • 9
1 vote
0 answers
131 views

(New user) Pi pico with stepper motor

New to the community, i am a total noob, i have a pi pico project using 28byj stepper motor 5v, looking to control revolutions per day from 600-1200, in both directions, using a rotary encoder. also ...
Lewispipico's user avatar
2 votes
1 answer
770 views

Creating a servo PWM signal for BLDC ESC Controller using PICO

I am trying to use my RPi PICO to control a BLDC ESC. Using a servo tester it works perfectly, but I want to be able to use this with my PICO and with a trigger/spring potentiometer. Basically it will ...
vm1988's user avatar
  • 21
1 vote
1 answer
139 views

2 DC Motors with L293D + 7404

I am trying to build my first robot with a raspberry pi 3 B. I am starting with two motors to move the wheels. For that, I am using a L293D and a 7404 inversor, as the L293D requires an inverted input ...
Guinnesss's user avatar
2 votes
1 answer
226 views

Using a transistor as a switch for a higher amperage/voltage line

I am looking to turn a motor on and off at very fast speeds (relays won't work), which leads me to transistors. Consider this diagram of an NPN transistor: Will the 12V 20A line harm the pi since it'...
Gabe Morris's user avatar
-1 votes
1 answer
117 views

IBT-2 causing voltage drop on battery but 0 voltage on motor(s)

I want to start by saying I know it isn't a code problem as it was working before but after I hooked up another motor controller (from a different manufacturer) it caused my motors to briefly spin up ...
monkey's user avatar
  • 21
0 votes
0 answers
34 views

How to Properly Stop Electronic Speed Controller

I have a brushless electronic speed controller connected to my RaspberryPi. I have tuned it to 700 - 2000. It runs correctly, but whenever I set the speed to 700, it stops (this is supposed to happen) ...
Brendan R.'s user avatar
0 votes
1 answer
92 views

Sensing if DC motor is on

Im trying to sense if a 12V dc motor is switched on. A hi low reading for the voltage on the gpio would be fine. My thought was to use a voltage divider to get a low voltage of about 3 volt to the ...
markus902's user avatar
0 votes
0 answers
97 views

Voltage drop at 5V pin when drawing current with DC motor

I encounter a power behavior for my Raspberry Pi 4B that I struggle to explain. I try to power a (geared) DC motor using the 5V pin. DC motor is rated for 3-12V (preferred 6-8V) and is claimed to draw ...
adelille's user avatar
1 vote
3 answers
117 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 ...
XtrmJosh's user avatar
  • 111
-2 votes
1 answer
131 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.
Reza Gholipour's user avatar
1 vote
1 answer
199 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 ...
zapshe's user avatar
  • 111
1 vote
1 answer
218 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 ...
Diogo Ferreira's user avatar
0 votes
2 answers
211 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 ...
Mattia's user avatar
  • 101
1 vote
1 answer
157 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 ...
web3devwith0bitches's user avatar
2 votes
1 answer
490 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 ...
Rajat Sharma's user avatar
0 votes
1 answer
236 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 ...
Rick's user avatar
  • 11
0 votes
0 answers
97 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 ...
Justin Priede's user avatar
1 vote
1 answer
311 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 ...
Justin Priede's user avatar
1 vote
1 answer
43 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 ...
Phlip's user avatar
  • 308
1 vote
1 answer
236 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 ...
Ryan Loggerythm's user avatar
1 vote
0 answers
159 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 ...
HexadiemsnionalerAlp's user avatar
0 votes
2 answers
70 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, ...
Paarth Katiyar's user avatar
1 vote
1 answer
72 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?...
Alex Pawelko's user avatar
0 votes
1 answer
3k 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 ...
tango-1's user avatar
  • 109
1 vote
0 answers
113 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 ...
Yes's user avatar
  • 169
2 votes
1 answer
262 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 ...
Pak Ho Cheung's user avatar
1 vote
1 answer
50 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 ...
huehuehuehuehuehuehuehuehuehue's user avatar
2 votes
1 answer
153 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 ...
capitnakl's user avatar
1 vote
2 answers
652 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.
coder's user avatar
  • 17
-2 votes
1 answer
98 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. ...
coder's user avatar
  • 17
1 vote
2 answers
360 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 ...
Cairan Van Rooyen's user avatar
0 votes
0 answers
98 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/...
Naseeb Gill's user avatar
1 vote
2 answers
1k 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,...
Patrick Hession's user avatar
1 vote
1 answer
1k 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 ...
KetZoomer's user avatar
  • 119
1 vote
2 answers
253 views

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

Following this video, my motors should be constantly running as per the program and should stop running after the program is executed. When I first ran the script, the motors did run, as per the ...
Ishaan Dugar's user avatar
1 vote
1 answer
69 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. ...
RxGianYagami's user avatar
2 votes
3 answers
8k 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 ...
Adrián P.L.'s user avatar