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

make white 3.3 Vforward led ON exactly when output pin is high; output pin goes through level shifter then motor driver op amp

COMPONENTS; raspberry pi; level shifter 3V in 5V out; motor driver (H bridge L293D chip = op amp with diodes to protect inductive kick on power off); solenoid valve; CIRCUIT; GPIO23 on raspi is an ...
William Garber's user avatar
0 votes
0 answers
39 views

Control Signal Raspbery Pi

I have a project to generate DCC signal so it needs to be used bts7960 to control the signal and connected to Raspberry Pi 3B. But, unfortunately the signal wave is not like digital signal perfectly. ...
Naufal Yanu Kusdianto's user avatar
1 vote
0 answers
81 views

Can't make DRV8833 work with Raspberry Pico

I'm building a toy car for my nephew. I want to drive a small DC motor with a Raspberry Pico with a DRV8833 motor controller. The controller is powered through the Pico. I seems fine, there is voltage ...
gphilip's user avatar
  • 111
0 votes
0 answers
59 views

Stepper motor runs at full speed, then abruptly slows

I'm working with a Nema 17 adafruit stepper motor, item #324, running on Raspberry Pi 4b (Bookworm OS) with an Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini Kit Product ID: 2348. I have ...
gwfami's user avatar
  • 1
0 votes
1 answer
21 views

Can I use my Raspberry Pi Zero's 5V to power a motor driver?

I have a L9110 motor driver board that I am using to power a motor from my Raspberry Pi. Can I use the Raspberry Pi's 5V output to power the motor driver?
Kovy Jacob's user avatar
0 votes
1 answer
171 views

Optical Encoder with GPIOZERO

I am trying to help some 8th graders build a robot. They learned about the Raspberry Pi and Python with GPIOZERO in an earlier class. They have wheels spinning using the Motor class from GPIOZERO and ...
Bob Brown's user avatar
  • 1,037
2 votes
2 answers
219 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
56 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
145 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
84 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
221 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
69 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
313 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
133 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
52 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
558 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
175 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
159 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
191 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
1k 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
189 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
391 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
155 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
105 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
129 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
326 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
201 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
247 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
229 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
306 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
209 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
663 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
312 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
100 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
365 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
47 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
  • 318
1 vote
1 answer
278 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
211 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
76 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
139 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
4k 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
124 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
315 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
51 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
171 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
909 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
129 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
570 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
113 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