Skip to main content
Share Your Experience: Take the 2024 Developer Survey
14 votes

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

The Raspberry Pi requires 5 Volts - if you've fed it 12 Volts you've killed it. Powering the Pi using the GPIO pins bypasses the fuses that might have saved the Pi if you had used the micro USB ...
CoderMike's user avatar
  • 6,997
7 votes

L298N Not working with 4 x AA Batteries

The problem was that there was no ground between the L298N and the Raspberry Pi. By wiring the Ground (-'ve) terminal on the L298N to a ground pin on the Raspberry (as well as the batteries) it then ...
John HaxSyn's user avatar
5 votes
Accepted

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

I would recommend that you use a Opto Coupler. An Opto coupler consist of a LED (Light Emitting Diode) and a Photo sensitive transistor. That will create a safety isolation between your motor that ...
Mats Karlsson's user avatar
4 votes
Accepted

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

A GPIO can only supply a little current, perhaps 60mA or so, whereas the 3V3 rail can supply up to 1 amp depending on the Pi model. It is probably not safe to draw more than say 20mA from a GPIO for ...
joan's user avatar
  • 71.1k
4 votes

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

I agree with the answer by CoderMike that you've probably fried your Pi. Based on the wiring diagram though, I differ in thinking that it might have been avoidable with this hardware if you had ...
Brick's user avatar
  • 1,367
4 votes

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

6V motors usually work fine with 5V (other than the fact that they run at 80%..85% of it max speed). However, powering a motor from the Pi is only possible for very small motors, which have stall ...
Dmitry Grigoryev's user avatar
4 votes
Accepted

Raspberry Pi Model B Current Overdraw from 3.3V Pin

The 50 mA limit is for the GPIO. The 3V3 pins are not GPIO. You can draw as much current from the 3V3 pins as is available from the power supply. If you attempt to draw more current than is available ...
joan's user avatar
  • 71.1k
3 votes

Where can I find the "PiMotor" library?

The library source code is linked to from the SB Components website, where there is a link: Get the library source code from GitHub This leads you to this GitHub repository, which contains PiMotor....
Aurora0001's user avatar
  • 6,328
3 votes

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

If you read the documentation, there are two mistakes in your code. First, just use import l293d. Second, use motor1 = l293d.DC(22, 18, 16) There isn't a motor attribute, but there is a DC attribute ...
NomadMaker's user avatar
  • 1,560
3 votes
Accepted

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

Question Stepper 28byj48 unipolar OK with uln2003 Slit the red wire so there are only two windings Measured ohms across coils. Pin 1 ic - 5v pos ... (OMG, 16 connection pairs!!!) Answer I did the ...
tlfong01's user avatar
  • 4,695
3 votes

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

In my estimation, there is a good chance that you will "break" your RPi. Connecting GPIO pins to DC motors is not a good idea; you shouldn't do it unless you're OK with breaking your Raspberry Pi.
Seamus's user avatar
  • 22.2k
3 votes

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

pigpio will let you control ESCs from the Pi. It uses hardware timed PWM. Python: use set_servo_pulsewidth C: use gpioServo Command line: use pigs s
joan's user avatar
  • 71.1k
3 votes

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

The most helpful link on that I found is this one: https://business.tutsplus.com/tutorials/controlling-dc-motors-using-python-with-a-raspberry-pi--cms-20051. The diagram below shows essentially how ...
Shreevathsa GP's user avatar
3 votes

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

There is more than one type of motor driver board using the L298N. The typical board has two voltage inputs and a common ground. One voltage input is to drive the motors. The other voltage input is ...
joan's user avatar
  • 71.1k
3 votes

Will my L298N circuit work and will it be safe?

As long as that diagram is an accurate reflection of the wiring on the L298N module and between the module and the Pi it looks okay. Of course only one motor will be controlled as no GPIO are shown ...
joan's user avatar
  • 71.1k
3 votes

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

Just trying to understand exactly what you're asking here: If you're querying if the pi can power the dc motor(s) you'll need some extra hardware usually with seperate power supply (like a motor HAT ...
Ben's user avatar
  • 91
3 votes
Accepted

5 Volt Relay not working as expected

This isn't how a relay works. The relay board is just a switch that can be turned on and off by a low power signal from a raspberry pi GPIO pin. You will need to provide a separate power source to ...
cguk70's user avatar
  • 146
3 votes
Accepted

control motor with raspberry pi and pi4j 2.0

Within the CrowPi example project, several examples are available for different types of motors, all using V2 of Pi4J. More info about the project on: https://pi4j.com/getting-started/crowpi/ Code ...
Frank's user avatar
  • 328
3 votes
Accepted

Using a Raspberry Pi 4 for motor control

The general consensus appears to be that because it is not a Real Time system, a Raspberry Pi is not a suitable device to use directly as a Flight Controller. While it is technically possible, an ...
Earl's user avatar
  • 156
2 votes
Accepted

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

The very first thing you should look at is the datasheet or the reference manual before starting hooking it up. In this case, the manual has a schematic, so you do know exactly what will happen when ...
frarugi87's user avatar
  • 136
2 votes

Motor running slow using PWM

You wrote that you're not using an external power supply for the motor? This motor probably requires a separate supply. I could not find the stall current for the motor, but under load the motor will ...
NomadMaker's user avatar
  • 1,560
2 votes
Accepted

Motor running slow using PWM

You have misunderstood how PWM is used to control DC motor speed. To control the speed you vary the duty cycle, not the frequency. The frequency should be fixed at a reasonable value for your motor ...
joan's user avatar
  • 71.1k
2 votes
Accepted

Raspberry Pi controlling motors?

Both the Pi and an Arduino should be able to handle the decision making. The Pi will be better once the decision making becomes more complicated. The Pi is just as good as an Arduino at controlling ...
joan's user avatar
  • 71.1k
2 votes

L298N Not working with 4 x AA Batteries

On another (related) note - I see from the spec sheet that the module's power supply (not the motor supply) should be 6.5-12v... and you're powering it with 4xAA batteries, which is fine when they are ...
WECole's user avatar
  • 86
2 votes

Simultaneous servo control on RPi 3?

Use GPIO Zero with pigpio as the back end: from gpiozero import Servo from gpiozero.pins.pigpio import PiGPIOFactory from gpiozero.tools import sin_values, cos_values from signal import pause pigpio ...
ben_nuttall's user avatar
  • 2,461
2 votes

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

Steppers are typically driven by stepper driver boards such as the TMC2208. Microcontrollers such as Arduino or Raspberry Pi send pulses to the stepper driver boards to turn the stepper motor. I ...
OyaMist's user avatar
  • 1,119
2 votes

Raspberry PI Relay power motor

Your design has some shortcommings There is no direct 5V output the 3v3 probaply isn't strong enaugh to drive a relay so you need a transistor too and a diode to protect the Pi 5v the accumulated ...
LotPings's user avatar
  • 366
2 votes

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

According to documentation page for the l293d Python library, you've used syntax that's incorrect. The docs suggest this may work: import l293d motor1 = l293d.DC(22, 18, 16) then the rest of ...
Seamus's user avatar
  • 22.2k
2 votes

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

"The only thing is that I connected the 3.3V of the L293D on a 5V pin, but I assumed it is not a big deal..." Translation AKA edited as is common on this forum **I am using common power source for ...
Jan Hus's user avatar
  • 641
2 votes

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

the spike caused by motors, drops the controller voltage. in this case (the pi), it will drop to 4.6 v for example, which is enough to cause to to reboot. either use an adapter for rpi, or give it ...
Allaw Hussein's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible