Questions tagged [pwm]

Pulse-Width Modulation (PWM) is a technique used for controlling the power given to electrical devices. The average power supplied is controlled by rapidly turning the supply on and off. Questions here concern driving PWM outputs from the Raspberry Pi.

347 questions
5
votes
4 answers

Control a 12V dc fan via PWM and a level shifter

I wish to control a 4 pin 12V dc pc fan (https://www.arctic.ac/en/F9-PWM/AFACO-090P2-GBA01) with my raspberry pie. After reading several threads I came up with the following: First problem is that the PWM signal must be 5V but the GPIOs only give…
Kai
  • 103
  • 1
  • 5
4
votes
2 answers

How to program pwm an arbitrary waveform to generate infrared stream

I've use a pic to create IR patterns to modulate frequencies (37kHz or 58kHz) to control different devices. I'd like to move as much as possible to a RPi. I will use a pic to generate the 37kHz or 58kHz, but would ike to be able to have the RPi…
user4067
  • 41
  • 2
3
votes
1 answer

Calibrating ESC with PCA9685

I'm currently working on a RPi project to control an RC car via my phone, and I am having difficulty setting up my ESC. Based on research I have done online, I need to first calibrate the ESC by sending a series of high and low signals, and I'm…
AlecR
  • 31
  • 1
3
votes
2 answers

Where is the PWM pin located exactly on the board?

Can someone point me to exactly where the PWM pin is on the board and how I can hook this thing up visually as I'm totally lost as to what I would need to make this run. Also what is the snippet of code needed to make it pulse every 2 seconds.
Patoshi パトシ
  • 551
  • 3
  • 9
  • 16
3
votes
1 answer

How is it possible to make hardware pwm more precise?

I started building a drone (quad) and i was wondering if i will have any problems with the accuracy of the signal i am going to send to the esc's. according to mr booth in Can I use the GPIO for pulse width modulation (PWM)? under "What if I need…
3
votes
1 answer

What is the relationship between angle and servo motor duty cycle? How do I implement this?

I am unsure of the relationship between duty cycle and angle. I see lots of tutorials online with many different equations to calculate duty cycle for a given angle. I have a 50Hz servo motor that ranges between a 2%-12% duty cycle for 0-180…
user114449
  • 39
  • 1
  • 2
2
votes
2 answers

L293D to send data to a NeoPixel LED strip?

Does a L293D return the same signal on the output as it gets on the input? Or does it change a pwm signal to a rather constant voltage?
FritzB
  • 23
  • 2
2
votes
0 answers

Controlling LED results in flicking

Using the amazing Pi-Blaster daemon I managed to control a connected RGB strip (to be exact: this particular one http://www.ledstripkoning.nl/led-strips-rgb/losse-ledstrips-rgb/5-meter-150-leds-rgb-led-strip/ and here in more detail). The LED is…
2
votes
3 answers

PWM on 5V GPIO pin

I have a 12V Noctua industrial fan (it's for a project, the amount of airflow is needed). The fan doesn't turn on by itself (with only 12V and GND connected), but it does turn on when I connect GPIO pin in HIGH state from Raspberry into PWM…
Astra3
  • 39
  • 1
  • 4
1
vote
1 answer

What is the pin number for PWM outputs on RPI3 model B?

What is the pin number for PWM on RPI 3 model B? On the RPI2 i used to 18 pin, I used to set it up like "gpio -g mode 18 pwm" However, is it same on the RPI 3? Where can I found the doc, usually gpio pin 18 used to PWM on RPI? I've got the pin…
laoseu348
  • 11
  • 1
  • 2
1
vote
2 answers

PWM with a MOSFET won't power on LEDs

I'm trying to control a 12V power supply with a MOSFET using PWM on the Raspberry Pi. The intention is to fade the 12V power which will be connected to a 12V LED strip (the LEDs will fade on and off). I have my design configured as shown: This is…
Edward88
  • 19
  • 1
1
vote
0 answers

Synchronize two PWM signals on two Raspberry PI

I wanted to know if it's possible to synchronize two PWM signals on two different Raspberry Pi? If yes, what's the suitable module (Bluetooth, WIFI,...) the two Raspberries will be in 10m maximum from each other.
Awishak
  • 11
  • 1
1
vote
0 answers

Raspberry Pi ESC speed control

I've done ESC calibration using PWM from RPIO and set it's value to 2000 at first then 1000, after the long BIP it was set to go and when I set random value like 1300 or 1500 it would spin but only for a 5 seconds then slowly stops. How do I control…
1
vote
2 answers

Can pins 18 and 21 be used to power two DC motors with one L293D

I see that adafruit has a tutorial running one dc motor on pin 18 with L293D and I have done this sucessfully. My goal is to run two DC motors without adding additional hardware, I see pin 21 is also capable of PWM. Am I able to run two motors…
1
vote
2 answers

What register do I use to control the PWM clock on the BCM2835 used in the Raspberry Pi?

What is the register used for setting a divisor on the PWM clock on the BCM2835? I looked at the data sheet (Raspberry-Pi-BCM2835-ARM-Peripherals) - but couldn't find this information. But this information must be available somewhere, because going…
M-V
  • 113
  • 5
1
2 3