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.

learn more… | top users | synonyms

0
votes
2answers
40 views

Is there a limited number calling the PWM function from RPi.GPIO and does it interfere with video recording?

I am using a Raspberry Pi 3 to control a servo motor (via PWM with RPi.GPIO) and a Pi Camera. What I want to do is, I want to move the servo motor several hundred times to a specific position. In ...
3
votes
1answer
58 views

PWM Servo - Check availability

I'm writing a program which requires Servo's basic movement. Here's the code: import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.OUT) pwm = GPIO.PWM(18, 100) pwm.start(5) ...
3
votes
0answers
91 views

Using PWM on raspberry pi 3 vs pi 2 with bcm2835 library

In one application we are using the raspberry p to control motor speed via PWM. We were able to get a valid working code on the raspberry pi 2, but when we transferred this code and drivers over to ...
0
votes
1answer
26 views

How to turn off / let float a servo attached to GPIO

I'm driving servos attached to GPIO, powered from external PSU and using PIGPIO Library through node.js - everything works just fine but I don't know how to completely "shut down" the servos - once ...
1
vote
0answers
38 views

Controlling a Motor with a Raspberry and a Joystick

I'm realizing a little embedded system with a Raspberry Pi 2 for controlling a dc motor using an analog joystick. In particular i'm using a PCF8591 as adc to read the joystick and a L298N to drive ...
0
votes
1answer
34 views

Pi4J ESC brushless motor is not running stable

I would like to control a brushless motor with a Java program running on a Raspberry Pi model b+. This is the code that I am using: package de.ye.boat_eng; import com.pi4j.wiringpi.Gpio; import com....
0
votes
1answer
33 views

Answers to PWM and ESC

i connected my Rasp. to an ESC. I want to control it with this code: import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD) GPIO.setup(37, GPIO.OUT) servo = GPIO.PWM(37,60) servo.start(10) ...
1
vote
1answer
29 views

Using hardware PWM and audio at the same time

While using PWM0 and PWM1, sound (buzz) is played through the audiojack. Is it possible to route audio not through PWM so it could be used at the same time as PWM?
0
votes
1answer
30 views

How can I set 100 kHz on Raspberry 2 SCLK pin?

I need to interface with a micro SD card in SPI mode, and the datasheet says that the serial clock speed should be between 100 and 400 kHz. So I connected it to the 23rd pin but I can not find any ...
0
votes
0answers
42 views

RPIO.PWM causes I2C to stop working [solved]

EDIT: Problem solved. I had configured the PPM output to GPIO 3, which is also the I2C clock line. Yyeah… :) My sincere apologies. I'll be sure to check the pin reference first in the future. I'm ...
0
votes
1answer
59 views

pigpio: PWM range for quadcopter ESC(electronic speed controller) command

Good day, I am currently working on a quadcopter project and am currently using the pigpio library for the PWM used to command the ESC's of the quadcopter motors. Will increasing the range of the ...
1
vote
1answer
114 views

PWM - What does pwmSetClock() and pwmSetRange() mean?

I have looked at the WiringPi site and have found: pwmSetRange (unsigned int range) ; This sets the range register in the PWM generator. The default is 1024. pwmSetClock (int divisor) ; This sets ...
0
votes
1answer
76 views

HC-SR04 ultrasonic sensor reading becomes highly unusable when PWM is active

Good day I am trying to sample distance using a sonar/ultrasonic sensor for altitude measurement. When the PWM is not active, the sensor gives accurate measurements in centimeters, however with the ...
0
votes
0answers
51 views

How do I control the PWM output at GPIO 18 using the wiringPi library?

I want to control an actuator that is connected to the PWM output of the Raspberry Pi. The actuator has to be controlled at a frequency of 1000000 Hz (1 MHz). Is this possible with the Raspberry Pi ...
0
votes
0answers
14 views

Motor not moving as input given by PI [duplicate]

I have connected motor to RasPi on Pin0(Actual PIN 11) to control motor as command given to motor using Raspi using WiringPi but when I give input from 0 to 5 it doesnr move BUT When I give input 5 it ...
1
vote
1answer
86 views

Servo motor using wiring Pi problems

I am looking for solution for something wrong happen in my programme i have configuration for control RC motor over RasPi using Wiring Pi here is code #include<stdio.h> #include<netinet/in.h&...
0
votes
1answer
74 views

Controlling multiple Digital LED light strip through Servo hat/driver

After gathering some requirements in my project, I thought that it should be possible for us to control multiple LED Light strip through a servo hat (Considering that we are able to provide enough ...
0
votes
3answers
29 views

Difference between Servo hat and driver?

I am very new to Raspberry pi, especially electrical components. And when I am working with hooking up a digital LED light strips, I am planning to plug it into a 16 channel PWM/Servo hat. But I ...
1
vote
0answers
37 views

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

Can I use a GpioPin as a PWM pin safely on my Raspberry Pi 2?

Windows 10 IoT doesn't support use of the PWM functionality of Raspberry Pi 2. So, as a workaround, I'm planning on using a GPIO pin and just toggling it from High to Low REALLY FAST to achieve the ...
3
votes
3answers
84 views

What components are required for connecting servo motor to PI?

I'm planning to integrate a servo motor with a raspberry PI to press a switch button and found this post very helpful : PWM Control on Raspberry PI I'm considering this motor VicTsing Mini SG90 9g ...
0
votes
2answers
109 views

Two servos connected causes shaking

I have two servos which I want to control from my RPi. My problem is that the servos start shaking if I use them both. Both servos are connected to the +5V pin and to the ground of the Pi. So I have ...
0
votes
1answer
38 views

Why a resistance between signal and GPIO - External power source

I'm trying to power my servo from an external power source and control it with my Pi and I've found following circuit: http://razzpisampler.oreilly.com/images/rpck_1001.png Why is there a resistance ...
3
votes
2answers
73 views

Project needs multiple PWM

I'm working on a project that needs three (or more) PWM pins to work. But unlike Arduino, the Raspberry PI B+ has just one PWM pin. I've searched for solutions and I found that I can use the WiringPi ...
1
vote
0answers
133 views

Can't open pwm pin

I know there are many questions about using pwm pins in RPi, but nothing helpfull for me. Here is my code with described error: #include "pch.h" #include "MainPage.xaml.h" using namespace ...
1
vote
1answer
282 views

Raspberry Pi 2 B GPIO pwm and interrupt pins

Good day! I would like to use pwm and interrupt on raspberry GPIO pins but i don't know which GPIO pins are actually dedicated for pwm output and which is for hardware interrupts, is there a way for ...
4
votes
1answer
419 views

PWM control of motors with PHP front end

I have a dual H bridge connected to my Pi for controlling 2 brushed DC motors with. I intend to have a web interface to control the speed of the motors. I'm thinking of a HTML page submitting AJAX ...
1
vote
1answer
98 views

pigpio - set_PWM_dutycycle vs hardware_PWM

What is the difference between the set_PWM_dutycycle function and the hardware_PWM function in the pigpio python library when assuming the same frequency is set for both the functions. Will I get a ...
1
vote
1answer
153 views

Low-level PWM driver that works with the Raspberry Pi 2

Is there any low-level hardware PWM driver (such as RPIO.PWM or ServoBlaster) that is written in Python or C++ or Java (Python or Java preferred) and is compatible with the Raspberry Pi 2 model B?
3
votes
1answer
80 views

Output Accurate, Detailed PWM signal

I'm building a quadcopter using the RPI 2 Model B. I'm currently using the Pi4J library (Java library that wraps the WiringPi library) for my project. All is going well except my ESC (Electronic Speed ...
1
vote
1answer
67 views

pigpio PWM and ALSA

My Qt ( C++ ) application successfully dims the screen using the pigpio library on my Raspberry Pi compute module. It works great and is very stable using the code below. The problem, is that my ...
1
vote
2answers
292 views

ALSA - piezo buzzer directly on PWM pin?

Pre-empting the fact that the Raspberry Pi Zero has no analogue headphone jack - has anybody managed to setup the audio such that a Piezo Speaker directly attached to a GPIO PWM pin would make a sound?...
1
vote
2answers
349 views

Dimmer - How synchronize PWM with 230V power supply?

I need your's help with dimmer which is controlled by Raspberry PWM. My problem is lack of synchronization PWM with power supply. Unfortunately , I don't have oscilloscope waveforms to show my problem,...
0
votes
1answer
71 views

WiringPi - GPIO Output Vs PWM

So in the GPIO utility from WiringPi there is a command to change the mode of the GPIO pins. There is input mode, output mode and PWM mode. What is the difference between output mode and PWM mode? Is ...
0
votes
1answer
88 views

How can I send the same PWM output to multiple connections?

For a update to a small robot I am doing, I am controlling a robot using the Pi. This works very well but I would like to add more precise control, using PWM on the H bridge that controls the motors, ...
4
votes
3answers
1k views

3.5 mm jack starts to “hiss” after sound is played

I'm having the following issues with my amp on the Raspberry Pi 2, Model B. Boot up the Pi, everything sounds great. Play a sound byte through the Pi (using ALSA) Speakers hiss regardless of PCM ...
2
votes
1answer
159 views

Counting Pulse Length Using PiGPIO

Background I am trying to get a particle sensor to work with the Raspberry Pi (model B+). I am using the Shinyei PPD42N6 (datasheet here). The sensor outputs a digital signal with pulses ranging ...
1
vote
1answer
230 views

Count Pulses Width on RPi-GPIO

I have a Coin Acceptor, that sends a 30ms pulse when the coin was dropped. So I tried to use many codes, but I search in the net and I think the way is use PWM to read the pulse. But this doesnt work: ...
1
vote
3answers
194 views

PWM Fan causes clicking sound

I am using PWM to control the speed of the fan on my RPi 2. The problem is, when I am PWMing it, a clicking sound can be heard from the fan. I am using a 6v power supply for a 5v fan to compensate ...
1
vote
0answers
97 views

Run brushless motor with esc

I have looked all over the internet on how to run a brushless motor with an esc through RPi.GPIO and have no results. I have tried simply wiring the esc as it is supposed to be and programming it ...
2
votes
0answers
87 views

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-...
0
votes
3answers
134 views

pwm fan on pin 18 help!

Can someone help me? I'm trying to control a fan using PWM and I cannot work out how to do it. This worked for a short amount of time and then stopped working. According to the docs, GPIO pin 18 ...
1
vote
2answers
304 views

Python - GPIO PWM control backlight LCD display

I want to manage an LCD HD44780 display connected trought my Raspberry Pi B+. The backlight pin (on Hd44780 display) need a resistor and I have 2 different display version, so the resistor value are ...
0
votes
0answers
37 views

how many external expander chips can the 5v output of the raspberry pi power?

I'm currently using PCA9685 gpio PWM and DO chip expander which can be powered by 5V . I'm currently powering it by using the 5V output on the raspberry pi . I would like to know how many of these ...
4
votes
3answers
2k views

PWM on Raspberry Pi 2 and Windows 10 Core IoT RTM

Now that windows 10 Core IoT - final RTM version is available. Are there any ways to program a Windows Universal App to use PWM hardware connected to the GPIO? I need this for controlling the color ...
2
votes
1answer
73 views

dc motors not responding to gpio's

I have a question. I've attached dc motors to gpio's and after running python program it won't turn. Attaching LED's would make them light very low. Attaching both of them to pin 1 or pin 2 would make ...
0
votes
1answer
114 views

How to hide PWM.add_channel_pulse(dma_channel, gpio, start, width) output?

I use RPIO.PWM to control servos. All the time, the PWM.add_channel_pulse(dma_channel, gpio, start, width) method is called, text about the change is displayed (see image). I know there is a way (&...
1
vote
0answers
167 views

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 ...
0
votes
1answer
210 views

GPIO HW PWM @ 143Hz and 20-80% duty cycle, with WiringPi's gpio utility

I've tried to find the solution from other threads but they all seem to miss the point to a certain degree, usually going into kHz and MHz, or into the SW GPIO territory that I don't need. I have a ...
1
vote
1answer
126 views

RPIO.GPIO on RPie vers 1 B versus RPi.GPIO on Rpie vers 2B

With the "old" Pi v1 B, Python 2.7 (or Python 3.x.) I run a smal program for testing a servo motor. The motor opens/closes a lid on a smal fan. It worked fine, the servo not jittering. I was happy. ...