Skip to main content

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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
25 views

We have some CM3 and now CM4 mounted on custom boards. audio is enabled on both via config.txt with: dtparam=audio=on Audio is on pins 40 / 41 (I think, I have a schematic for a similar but different ...
Tommy's user avatar
  • 109
2 votes
0 answers
253 views

Earlier kernels or maybe prior updates the device tree was correct and PWM functioned correctly. So Pi5 PWM functioed previously. I recently wanted to verify something and tried using the PWM on my ...
Tom's user avatar
  • 59
0 votes
0 answers
233 views

I have a Raspberry Pi 5 2GB. I just flashed the newest Raspberry Pi OS 64bit. I added dtoverlay=pwm-2chan to my /boot/firmware/config.txt and rebooted. No further actions where done on this system. ...
Deepthought's user avatar
0 votes
2 answers
662 views

I have custom-made a compact push-type PWM signal generator that operates on 3.3V power and outputs a 50Hz PWM signal with a duty cycle ranging from 0% to 100%. I power it using the Raspberry Pi 5's 3....
hakunami's user avatar
  • 109
0 votes
0 answers
58 views

I'm using GPIO13 to generate sound with audremap and a Raspberry Pi Zero 2W. I'm using GPIO3 SDA and GPIO 5 SCL to display on a LCD I2C screen at the same time and GPIO18 to power on the back light ...
bbd 666's user avatar
  • 107
-1 votes
1 answer
276 views

I’m trying to control 12 servo motors using a PCA9685 16-channel PWM driver with my Raspberry Pi 4. The board shows up on I2C at address 0x70 (confirmed via i2cdetect), but I’m unable to get it ...
Japhet's user avatar
  • 9
0 votes
2 answers
220 views

I have a 6V 7200mah battery connected to 12 MG996R servos. I'm trying to control just 1 servo for now with the Raspberry PI 4 B+. The battery and RPI share a common ground. I've connected the SIG of ...
App Dev's user avatar
0 votes
2 answers
268 views

The present state of GPIO18 pin is (according to pinctrl get 18) : 18: op -- -- | lo // GPIO18 = output I want to set this pin to PWM. I use this script : import RPi.GPIO as GPIO import time GPIO....
bbd 666's user avatar
  • 107
-1 votes
1 answer
65 views

I'm using this script to control GPIO18 : import RPi.GPIO as GPIO from time import sleep ledpin = 18 GPIO.setmode(GPIO.BOARD) GPIO.setup(ledpin,...
bbd 666's user avatar
  • 107
-1 votes
1 answer
259 views

i am trying to add Basic Audio Output to a Raspberry Pi Zero 2W. I followed the same metod proposed in many tutorials using Device Tree Overlay : 1st step adding : dtoverlay=pwm-2chan,pin=18,func=2,...
bbd 666's user avatar
  • 107
0 votes
0 answers
60 views

I've got an RPi4 running a 40x120 led matrix divided to 2 20x120 segments on 2 pins for the 2 pwm channels but the FPS is not great (it's around 10-15). My theory is if I'd put the leds onto a RPi5 ...
dughagyma's user avatar
0 votes
1 answer
78 views

I am trying to use a WS2812E LED-Strip with the raspberry pi. I am using the HW131 Power Supply and a RaspberryPI 3B+. The LED strips GND is connected to both the HW131 and the RaspberryPI GND. The ...
Max's user avatar
  • 3
0 votes
1 answer
126 views

I'm following the instructions in this document in order to get hardware PWM working. I added this line to my /boot/firmware/config.txt dtoverlay=pwm,pin=18,func=2 According to the docs this should ...
Louis Somers's user avatar
-1 votes
1 answer
651 views

I'm working on a project where I want to control a 12V PWM fan with a 4-pin header using a Raspberry Pi. I am aware that a Raspberry Pi does not require a fan in day to day use cases but the reasoning ...
Abhinav Dhiman's user avatar
0 votes
2 answers
453 views

I’m using sysfs to control my rpi5’s pwm andI’m having an issue where only one of my pwm pins is outputting a value (The pin that is working is gpio 18/physical pin 12/pwm2). In the pinout.xyz page, ...
Matthew Moller's user avatar
0 votes
1 answer
487 views

I searched the web on information about turning off the display and controlling its brightness from within the raspberry pi OS, what I gathered is that it works on some displays and not in others. I'm ...
Movianlost's user avatar
1 vote
1 answer
2k views

Recently, I've discovered that I can use the sysfs to control the pwm of my raspberry pi 5. (I don't know about any libraries that are supported buy the pi-5 and can control pwm hardware.) Upon trying ...
Matthew Moller's user avatar
1 vote
0 answers
387 views

I am a beginner learning how to operate the gpio of a Raspberry Pi 5. I’ve heard that the gpiod nor many other Pi-5 compatible libraries do not support pwm. This leaves me with not many options but to ...
Matthew Moller's user avatar
0 votes
1 answer
68 views

I'd like to learn more about the RP2040 PWM Audio AC coupling circuit found in figure 22 in this document & shown below. Even though I understand the general purpose of AC coupling, can someone ...
Erik's user avatar
  • 101
-1 votes
2 answers
653 views

I have built an electronic scoreboard consisting of 15 digits, each comprising of 7 segments of WS2812B LED strips. With a Raspberry Pi 4B and the rpi_ws281x library I can use up to 3 GPIO pins with ...
Colin Winton's user avatar
0 votes
1 answer
144 views

I am new to Raspberry Pis. I am using a Raspberry Pi 4. I am trying to control a BLDC motor from the BLHeli_32 ESC, using PWM signals output from GPIO pin 18. For this project, I need the motor to go ...
Tsz Kit Koon's user avatar
0 votes
0 answers
97 views

I want to write a custom PWM kernel module, I want to write a handler which is called when the PWM interrupt is triggered. What IRQ number do I use when attaching the handler?
FourierFlux's user avatar
-1 votes
2 answers
2k views

I’m trying to control 2 MG996R servos with my Pi 5. I’m using gpiozero and python. I’m using GPIO12 and GPIO13. I have a separate 5v power supply to power the servos. The servos both move but jitter ...
Bri's user avatar
  • 1
-1 votes
1 answer
388 views

I have a PWM fan connected to pin 18 What is the simplest way to make the fan turn on at 50 degrees and turn off when the temperature drops to 35 degrees.
JBC's user avatar
  • 1
-1 votes
1 answer
485 views

I’ve just recently bought my first Raspberry Pi and opted for a Pi 5 as it was the latest. I’ve had no luck getting gpiozero or gpiod working with Python and my MG996R servos yet. I don’t mind if it’s ...
Bri's user avatar
  • 1
1 vote
1 answer
1k views

Some internet resources mentioned that RP1 chip on RPi 5 has 4-channel PWM output. For example, this one. I was able to make 2 outputs working by adding dtoverlay=pwm-2chan to /boot/firmware/config....
Andrey's user avatar
  • 11
0 votes
2 answers
2k views

On RPi5, it seems we have to use gpiozero. In gpiozero, pwm output is available for various devices within a range 0 to 1. I want to use a piezo transducer with musical frequencies from say c = 130....
Trober's user avatar
  • 1
0 votes
1 answer
172 views

Using a Raspberry Pi 3B+ with Linux raspberrypi 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux I would like to drive an LED with pwm. There are two couples of GPIO pins which ...
BowPark's user avatar
  • 101
0 votes
0 answers
46 views

MaxxAir RV Exhaust fans are 12v DC motors with a 5 amp max draw. People have replaced the boards with these: https://www.amazon.com/gp/product/B08JG3CD8F/ref=ewc_pr_img_2?smid=A2RFU0Q5Y99ZUG&psc=1 ...
Matt Ralston's user avatar
6 votes
2 answers
12k views

I have a Raspberry Pi 5 with the official cooler/fan. The firmware enables it from 50°C and up in different steps. I'd like to control it manually, which is possible by writing the steps to /sys/class/...
Lion's user avatar
  • 247
0 votes
0 answers
411 views

I'm building a project where I would like to control multiple addressable RGB LED strips with Raspberry Pi Zero. Initially I've done everything using PWM0 (pins 12, 18) and PWM1 (13, 19), however now ...
Victor Buldakov's user avatar
0 votes
1 answer
3k views

All of the documentation I can find for the new JST headers on the Raspberry Pi 5 fails to mention which series of JST connectors it uses. If I want to make up my own 4-pin PWM fan, 3-pin UART or 2-...
Mark Booth's user avatar
  • 4,410
-1 votes
1 answer
281 views

I have a 4-wire PWM FAN. The PWM pin it seems to be pulled-up to 12V with a 47k ohm resistor. Now, with this pin floating, it has almost 12V on it. And this pin must be connected to the Raspi PWM ...
Marus Gradinaru's user avatar
1 vote
1 answer
4k views

I need a PWM signal of 25KHz and duty cicle 0-100%. It must be "hardware" becase I don't want to bother the CPU with that. The ony way I found to do that in Python is by using ppigpio ...
Marus Gradinaru's user avatar
0 votes
0 answers
259 views

Introduction and Goal Disclaimer: I do not have profound but basic knowledge in electronics and hardware and my python is a bit rusty. For tl;dr, jump to the problem section below. Hello, I'm trying ...
ArmoredGoat's user avatar
0 votes
1 answer
220 views

I am trying to create an accurate PWM output using a raspberry pi, model 4b, and hope you can help. At this stage I am wanting to; change the Duty cycle and frequency, run the code, and see these ...
Ben's user avatar
  • 9
-1 votes
1 answer
234 views

I have a circuit with a Schmitt trigger connected to GPIO 23 (on a Raspberry Pi Zero W). It should give a high (3.3V) signal when there is an AC current on the other side of the circuit. If there is ...
tolazytosignup's user avatar
0 votes
0 answers
49 views

Don't know anymore what todo, it seems like my hardware PWM frequency is off completely, I have set it to 10Hz (tried different values) and measure with the oscilloscope a frequency of about 5us, the ...
Lukas K's user avatar
1 vote
2 answers
4k views

I need a fairly deterministic PWM duty cycle. I don't believe it's rocket science to use hardware PWM. Numerous sources tell us that we can modify /boot/config.txt by adding dtoverlay=pwm-2chan which ...
KDM's user avatar
  • 718
0 votes
1 answer
5k views

I have tried the dtoverlay=pwm but couldn't seem to get PWM working. It puts the pin/s in PWM mode and creates /sys/class/pwm/pwmchip0 but no signal. The dtoverlay description states 4) Currently the ...
Milliways's user avatar
  • 63k
1 vote
0 answers
38 views

I had a remote developer do code for 3 servos to control a mechanism. He made sure to aquire similar hardware. Rpi4 and 16channel pwm driver. He used 3 sg90 servos. I have 1 sg90 and 2 smaller servos....
Bob's user avatar
  • 11
-1 votes
3 answers
813 views

I am trying to translate some raspberry pi gpio pwm commands to use the linux sysfs interface to control the pins instead in order to get the same pwm output. The goal of this is to provide pwm output ...
turtlemcnuggets's user avatar
0 votes
0 answers
56 views

I am having an issue with my raspberry pi and making it spin a motor with python. I am currently using a battery connected to a PCA9685 16-Channel 12-bit PWM driver which connects my motor on channel ...
TheCrazyCreeper's user avatar
0 votes
1 answer
1k views

I have to connect 4 different analog inputs to the raspberry pi pico. However there are only 3 pins available for usage. Is it possible to use the PWM pins for additional analog inputs? or should i ...
Anamika's user avatar
0 votes
1 answer
136 views

I got a Raspberry Pi 4B, a 12V power supply, a 12V air pump controlled by a MOSFET, a ds18b20 for feedback and a 47 Ohms, 8W resistor that we should somehow heat. Everything up to actually heating the ...
Mito's user avatar
  • 129
-1 votes
1 answer
464 views

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
1 vote
1 answer
634 views

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

I am using an esc and a bldc and im trying to slowly spin my bldc I can get my motor to spin with gpioServo() but when I use gpioPWM() It just continues to beep when i use gpioServo() it spins way ...
thomedy's user avatar
  • 21
1 vote
1 answer
2k views

Okay, kinda a noob here. I've been looking around, trying to find an answer to playing audio via the PWM pins. I tried rerouting the audio to no avail. I've tried making a script that uses PWM to play ...
Foxy6670's user avatar
1 vote
0 answers
44 views

i am currently using the NCP5623 (I2C LED Driver) to light up my 5V 1A (as written on the box) RGB LED strip. i followed the sample connection as shown on the datasheet of the NCP5623 and when i ran ...
seonghwife's user avatar

1
2 3 4 5
8