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

rPi2 model B v1.1 smoke comes out near power port

I am trying to control 2 motors using the E-gizmo Motor driver shield but suddenly smoke comes out near the power port of the raspberry pi 2 so I immediately unplugged the power supply. After that, I ...
4
votes
2answers
667 views

Controlling a High Power 13V DC Motor with in-built Hall Effect sensor

I am a beginner with electronics and RPi. I have a Brushed DC Motor that runs at a constant 13V and draws about 4-5 A while running and about 18-20 A at stall. It also has a single Hall effect sensor ...
3
votes
2answers
1k views

L298N Not working with 4 x AA Batteries

I have a 6V motor attached to a HiLetgo Module L298N Dual H Bridge and controlled via two Raspberry Pi 3B GPIO pins (current just using HIGH & LOW). If I use a 5V power supply from my Raspberry ...
3
votes
3answers
2k views

Motor running slow using PWM

I'm new to PWM. This is my motor and controller. When I have the jumper in (ENA pins: I assume this gives the PWM pin the full 5V, as that is what the controller board runs on). My 6V 47 RPM motor ...
3
votes
1answer
980 views

How to control unipolar/bipolar stepper/stepping motors such as 28BYJ48 using motor drivers such as L293D

So I'm having issues with controlling the motor with this ic. I have got it to work when it was unipolar with the uln2003. I slit the red wire so there are only 4,two windings. Measured ohms across ...
3
votes
0answers
71 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). ...
2
votes
2answers
184 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 ? ...
2
votes
2answers
552 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 ...
2
votes
2answers
573 views

Why can I drive a motor from the 3.3V pin but not a GPIO?

I have a peristaltic pump which is rated 6V, 30mA that, when plugged into the 3.3V GPIO (& ground of course), runs smoothly. When I code a GPIO to drive the same motor it doesn't move. I measure ...
2
votes
2answers
328 views

Driving 2 12v - 30A brushed DC motors with Raspberry Pi 3

For a robotic project we are building a security robot. As a base we bought one of those electric cars for 2 kids, where they can drive in themselves without a remote. We took it apart, and we now ...
2
votes
1answer
50 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 ...
2
votes
2answers
2k 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 ...
2
votes
1answer
265 views

Rpi python GPIO PWM control L298 and PCA9685 motor HAT

I need to find out which GPIO pin on the raspberry pi will be connected to which module when I fit the Adeept Motor Hat v2.0 on the 40 GPIO pins. I am attaching the image and the schematic of the ...
2
votes
1answer
388 views

L298N not working anymore

This is an image of how I had it routed up, it was working just fine until I attempted to add a rocker switch. I used the 2 pin on/off rocker switch that came with my smart car kit (https://www.ebay....
2
votes
0answers
32 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 ...
2
votes
0answers
38 views

Can powering a DC motor through the USB ports of my Raspberry Pi Damage the Pi?

I'm working on a project that contains two DC motors and a Raspberry Pi, I do not have other components like Relay, Motor Drivers, transistors etc. I am aware that powering a motor directly from an ...
1
vote
2answers
227 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.
1
vote
2answers
538 views

Raspberry Pi Error: AttributeError: module 'l293d.driver' has no attribute to 'motor'

So, I am trying to use my RPi model 2B to control a DC motor with an l293d controller. I have moved onto the python3 script and imported the 'l293d' module. Here is my code... import l293d.driver ...
1
vote
3answers
218 views

Can I reliably control four ESC with a servo driver board?

Im currently looking into building a quadcopter from scratch. The Raspberry Pi only has two PWM pins though, which isn't enough. And software PWM isn't great either, because you can't control a motor ...
1
vote
2answers
649 views

Why does my raspberry pi zero w crashes when controlling a DC motor with an L9232D and a 9g Servo motor?

I use this simple circuit to control a DC motor with an L293D, and a 9g servo motor with a Raspberry PI Zero W: I use the simple following code to test the circuit: from time import sleep import RPi....
1
vote
1answer
368 views

Is it safe to use 3V3 on raspberry pi 3B+ to control a 3V DC motor?

I want to connect power to a 3V DC motor straight from 3v3 GPIO. Is it safe or will I brick my Pi 3B+ ?
1
vote
2answers
169 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,...
1
vote
3answers
30 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 ...
1
vote
3answers
204 views

How can I prevent motor drivers back powering my Raspberry Pi

I have a Raspberry Pi 4B controlling an L298N module. I also have 2 cell batteries powering both. The cell batteries power the Pi through the 40 pin connector. The motor driver is powered by the cell ...
1
vote
1answer
91 views

Robot arm using "Solenoid"

I'm looking to create some kind of "pianoplaying" Pi robot. I started to look into ways to create some kind of "arm" that can make a lateral movement and came across solenoids.I'm looking to create ...
1
vote
3answers
213 views

How Can A L298N DC Motor Controller Module Fry My Rpi?

I have a fried Pie :( I used a 12 V power supply to this setup. Can you tell me what I did wrong. Here is my sample code in python: IN1- gpio18 / IN2 - gpio27 / EN - gpio5 GPIO.setmode(GPIO.BCM) ...
1
vote
1answer
1k views

Rpi GPIO Interface L298N DC Motor Driver Troubleshooting Problem

I have used the raspberry pi for almost 5 months now, so I could say I am new. Everything was fine at the start but when I built a car my motors will not spin. I am using DC motors (approximately 9V)...
1
vote
1answer
120 views

Raspberry Pi controlling motors?

Disclaimer: Im still new to the Pi and world of electronics, and google is giving me mixed results Im going to be attempting to build a robot with the raspberry pi. The question is how is the pi at ...
1
vote
2answers
178 views

Turning motor on and off from webserver

I have Apache server running on my pi. I send a httprequest from my Java app to the server to turn the motor on and off by executing a pyhton script. PHP code on the server: <?php if(isset($_POST[...
1
vote
1answer
3k views

Motor shield vs Motor driver

I'm building a simple robot and have a L298N motor drive board to sit between the Pi's 3.3v GPIO, the 5v battery pack and the motors. However I frequently see "motor shields" popping up. What is the ...
1
vote
1answer
40 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 ...
1
vote
1answer
117 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 ...
1
vote
1answer
45 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. ...
1
vote
1answer
53 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 ...
1
vote
1answer
198 views

Running pump & servo - Relay needed?

simulate this circuit – Schematic created using CircuitLab So I am working on a project that will require both a servo motor plus a small water pump. Both run on 3.7 -6v and I am going to use ...
1
vote
1answer
63 views

Robot Buggy Not Moving Once Set On Surface

I am using the standard tools and setup to make a Raspberry Pi robot buggy: 2 Miniature Brushless DC Motor 3 to 6V 2 Wheels Raspberry Pi L298N Motor Driver( with its battery pack connected) I have ...
1
vote
1answer
52 views

How to calculate the battery usage of raspberry pi with 2 motor drives

We have a raspberry pi 4 with 2 12v motor drive L298, 5 ultrasonic sensors, and raspberry pi camera but we need to know how to calculate the battery usage of all these chips, could anyone help with ...
1
vote
1answer
183 views

What is the frequency and cycle length of the pigpio library?

I've got a raspi 3b with an esc and a brushless motor attached. I can run the motor using pigpio the following commands: # First start the pigpio daemon sudo pigpiod # calibrate the esc pigs s 12 ...
1
vote
2answers
322 views

Raspberrypi unable to read 2000 PPR encoder

I am using a DC motor attached with a 2000 PPR incremental encoder. I am using RPI to count the number of ticks, my code works fine but I am not able to calculate all the 2000 ticks. Any help would be ...
1
vote
2answers
741 views

Raspberry Pi DC Motor Not Working

So, I am attempting to control a DC motor using a RPi Model 2B. I am using a l293d motor driver to try to control the motor and a 4 AA battery holder. The diagram is supposed to look like this ...
1
vote
1answer
731 views

Updated info/software/advice on using Raspberry Pi to control stepper motor drivers

It's been almost a year since the last posting in here covering this topic - are there any newer examples or libraries that you (Joan or anyone) know of that do the acceleration ramp, constant run-...
1
vote
1answer
83 views

digital pot motor control

I a using a MOT-B24400 motor which has a built in controller and only needs an external 5k pot to control the speed, plus power of course. I have this wired to a relay with a button to send a signal ...
1
vote
2answers
1k views

Simultaneous servo control on RPi 3?

I am building a project wherein I'll be controlling four servos using the Raspberry Pi 3. I wanted to control each pair of servos simultaneously (as in, when one servo is moving to a specified angle, ...
1
vote
1answer
903 views

Raspberry Pi_SaberTooth 2X12 and simple serial

I'm trying to control a SaberTooth 2x12 connected to my Pi3. Based my Google research it seemed the best method was Simple Serial. I configured the Pi for Serial in raspi-config. Set the dip switches ...
1
vote
1answer
1k views

Stepper motor troubles

I've been trying to setup my stepper motor with my RPI according to this guide: http://www.raspberrypi-spy.co.uk/2012/07/stepper-motor-control-in-python/ However, nothing seems to be happening, have ...
1
vote
1answer
50 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, ...
1
vote
2answers
715 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 ...
1
vote
0answers
60 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 ...
1
vote
0answers
57 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 ...
1
vote
0answers
76 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 ...