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
2k views

Special PWM files are not found on Raspberry Pi 2

I just got my Raspberry Pi 2 B (V1.1) and wanted to fool around with the Sunfounder starter kit a bit. The "sunfounder kit" is a learning kit with a couple of electronic elements (bread-board, ...
exhuma's user avatar
  • 103
7 votes
1 answer
2k views

Raspberry Python Libraries

I am currently working with a Raspberry Pi (Model B+) and have some experience with Arduino (and it's derivates). Now, there are three Libs for GPIO access with Python for the Pi: WiringPi (...
RichyGuitar's user avatar
2 votes
1 answer
7k views

Creating a 0-10V voltage range for ballasts using Raspberry PI and amplifiers [closed]

I have been working on automating my house and i was looking to dim and brighten the lights (not only led) using ballasts which require input voltage of range 0 to 10v DC depending on which the light ...
Vignesh T.V.'s user avatar
2 votes
1 answer
1k views

Control DC Motor with Servo Controller

My goal is to control 2 DC motors independently with my Raspberry Pi. I already have the motors along with 2 ESCs (from old RC cars). As far as I know you can control the motor speed with a PWM signal ...
TomTom's user avatar
  • 163
2 votes
2 answers
3k views

Simple DC Solenoid Valve Circuit, How to size components?

I'm trying to build a circuit controlled by a 3.3V GPIO pin on a raspberry pi to open / close a 12VDC Solenoid Valve. Part of me feels I'm in over my head and I should back away slowly, but hopefully ...
Jeff Lambert's user avatar
1 vote
3 answers
569 views

I'm looking for a serial input type "polychromatic" LED as an output for my raspberry pi. Does such a device exist?

Forgive any potential neologisms, but I would like to acquire a light that can, say, display 64-256 different shades of color based off of a digital numerical input signal? It can be a usb light, but ...
boulder_ruby's user avatar
3 votes
1 answer
690 views

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 ...
Alucardidis's user avatar
2 votes
2 answers
2k views

Is it possible to expand the PWM signal?

I'm looking at the WS2812B LEDs and I've noticed that it is possible to control the LEDs by an external library (https://learn.adafruit.com/neopixels-on-raspberry-pi/software). But, this only drives a ...
derpityderp's user avatar
2 votes
3 answers
2k views

Default duty cycle of hardware PWM using wiring-pi

I spent quite some time, but I wasn't able to find the answer (and found other interesting sources like changing pwm frequency 1 and changing the frequency 2), and I lack the equipment to find out by ...
Boern's user avatar
  • 192
0 votes
1 answer
6k views

Controlling a brushed motor ESC from the Raspberry Pi

I've tried solutions from similar problems, but none of them gave me any usable results. I'm trying to control those http://www.ebay.com/itm/311177661450 electronic speed controls (ESCs) with ...
Alexander Troshchenko's user avatar
1 vote
2 answers
484 views

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 ...
user1117057's user avatar
1 vote
2 answers
2k views

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 ...
M-V's user avatar
  • 113
3 votes
0 answers
951 views

PWM-based controlling an LED-strip using transistors, circuitry problems [closed]

I know there are some similar questions out there, but I'm really new to electronics and unfortunately they didn't provide me help. I want to control a tricolor LED strip (being able to dim each of ...
user1841833's user avatar
1 vote
1 answer
2k views

How to get RPi to generate a triangle wave, then outputting a PWM signal

I want my Raspberry Pi B+ Model to generate a triangle wave and output a PWM signal from one of the GPIO pins, but I'm not sure how to go about doing this. All I want it to do is add some small length ...
ashlyk321's user avatar
1 vote
1 answer
6k views

Control dc motor using GPIO.PWM problem

I'm trying to make a small remote controlled car with the raspberry pi and attached two small dc motors to it, using the L239D chip. When testing without the remote control (which is a simple android ...
Javi's user avatar
  • 203
1 vote
1 answer
2k views

How to write to /dev/servoblaster from Python script?

I'm working on a RPI controlled quadcopter. The PWM is generated by ServoBlaster. I've written a Python script to control the motors' speed. Assume that I'm using GPIO4 to control the motor. If I want ...
Alex's user avatar
  • 95
6 votes
1 answer
5k views

RPIO does not work on Python 3, only in Python 2.7

I've installed RPIO library to my RPI following these instructions: $ sudo apt-get install python-setuptools $ sudo easy_install -U RPIO I'm trying to run this code (test.py): from RPIO import PWM ...
Alex's user avatar
  • 95
0 votes
0 answers
509 views

Is it possible to use GPIO's simultaneously?

I'm interested in using raspberry to control a number of brushless motors. PWM should be executed parallely to work in needed rate. As far as I've heard, RPi provides only consequent requests to GPIO'...
user3081123's user avatar
0 votes
0 answers
212 views

Electronics Newbies's Guide to Setup Adafruit PCA9685 16 Channel Servo Driver for Raspberry Pi

As a way into getting myself back into learning more about electronics I'm trying to figure out how not to screw up configuring an Adafruit 16-Channel 12-bit PWM/Servo Driver with my pi. It's been ...
tbddeveloper's user avatar
5 votes
1 answer
3k views

PWM Control on Raspberry PI

Alright so I understand this question is fairly saturated, but my use in pwm is for two differing pieces of hardware. (Sourced from: https://www.modmypi.com/blog/raspberry-pi-gpio-en-franais) From ...
Pariah's user avatar
  • 382
1 vote
1 answer
284 views

Quadrocopter Motor Movement

A friend and I are trying to build a raspberry pi-powered quadrocopter. We've ordered four ESCs, four motors, and the Pi, but we're having trouble getting a motor to actually move. The motor makes a ...
Jack's user avatar
  • 111
2 votes
1 answer
3k views

Can't PWM LED on pin 18

Using this code, I can't use PWM on the pi. It's modified off of a Linux user article. import time import RPi.GPIO as GPIO led = 18 GPIO.setmode(GPIO.BCM) GPIO.setup(led, GPIO.OUT) GPIO.output(led,...
Luke Moll's user avatar
  • 747
2 votes
1 answer
2k views

I2Cs for temperature senors and multiple PWM outs

EDIT: Rewrite, this is why you don't write questions after not sleeping for two days (wait what day is it?) I have a whole bunch of 12V 4 pin (pwr, grnd, tach, pwm) fans I'd like to manually control, ...
rolands's user avatar
  • 121
5 votes
2 answers
17k views

Can I control this ESC/Brushless Motor with a Raspberry Pi and/or Arduino

My friend and I have been reading up on articles talking about controlling ESC/Brushless Motors from a Arduino or Raspberry Pi. Articles i've read give caution on the idea that controlling such ...
Shane C. Yost's user avatar
2 votes
4 answers
2k views

Controlling a servo and playing sounds

I've got a serious problem about Pi. It is - I can play sound just fine with a python script either with: import pygame pygame.mixer.init() pygame.mixer.Sound("...").play() or: import os os.system("...
Michał's user avatar
  • 123
0 votes
3 answers
2k views

More Software PWM [duplicate]

I'm currently working on a project which requires more than one PWM signals for my LED drivers. I'm not looking for any additional hardware for this and so my focus is mainly on software PWM. Based ...
wengzhe's user avatar
  • 101
0 votes
0 answers
391 views

Raspbian crashing after servo.stop_servo()

I have a servo connected to my RPi and I try PWM.Servo's capabilities. The program below does what it should - but after execution it crashes system (it doesn't respond to any input, no animations, ...
Michał's user avatar
  • 123
3 votes
2 answers
3k views

How can I control the PWM via the sysfs

I want to set the PWM for some tests with a tricolored LED. I want to be able to set it up via the sysfs interfaces but I'm having a very hard time finding any information on how to do this. What is ...
Mike's user avatar
  • 131
1 vote
1 answer
6k views

Problem with PWM, running DC motor using L298 H bridge(using RPi.GPIO python module)

This picture shows the code i am using to run back and forth a dc motor for specified time and it works well, no problem with this.! Problem is here, as soon as i switch on my Pi and try to run the ...
Ruthvik Vaila's user avatar
1 vote
1 answer
9k views

Controlling Multiple analog RGB 12V led strips

I need to control several (5 to 10) analog RGB strips which have a separate power supply at 12V or 24V. Just like this one for example. I need to control the intensity of each colour channel for each ...
Riccardo Zorn's user avatar
1 vote
2 answers
2k views

How to generate a PWM signal with Visual Basic? [closed]

Please help me to get PWM signal (three LEDs) from raspberry pi by using Visual Basic. I have a problem to generate pulse signal from raspberry pi wirelessly. What I want to do is using a program to ...
serene's user avatar
  • 33
4 votes
4 answers
8k views

How to control a Traxxas XL-5 ESC directly from the GPIO?

I am trying to control the ESC (Electronic Speed Control) of my Traxxas RC car with my raspberry pi (rev.2). I have been looking through the internet and while I can find some projects that seem to ...
Fabien's user avatar
  • 136
2 votes
1 answer
171 views

1 motor spradically stops when going forward

I've based my software on the "Linux User & Developer" (issue 132) robot tutorial (my source code can be found here) and hardware connections according to Adafruits PWM tutorial. The problem is ...
Saran's user avatar
  • 293
1 vote
1 answer
1k views

PWM not found in Occidentalis v0.2

I'm trying to get my DC motor to work according to this tutorial from Adafruit: I'm running Occidentalis v0.2 (from day 1, which was some 4 months ago) and never had a similar issue. This is the ...
Saran's user avatar
  • 293
2 votes
2 answers
6k views

Controlling a servo with hardware PWM using wiringPi

I tried controlling the servo with softPwm using the wiringPi Library but this made the servo stutter. Therefore I want to use the hardware PWM pin on the Raspberry Pi (GPIO18) with the wiringPi ...
Mathias De Roover's user avatar
10 votes
9 answers
41k views

PWM input in Raspberry Pi

Is there a way to read a PWM signal from the pins on Raspberry Pi? I tried googling it, but I only found PWM output, and not input.
Caio Keto's user avatar
  • 355
4 votes
2 answers
2k views

What is the best way to increase digital I/O lines on Pi?

In one of my projects I need six PWM outputs, 12 digital I/O and around six analog inputs to be controlled by a Raspberry Pi. What are some of the best options available to increase the I/O capability ...
Punit Soni's user avatar
3 votes
1 answer
3k views

Servo jumps on raspberry pi boot

I have just started using a servo to drive the front steering of a remote control car frame which i cannibalised. The steering works fine if i start it up and tune it however when i shut down the ...
D Mason's user avatar
  • 135
0 votes
2 answers
2k views

Software PWM as kernelspace module?

Has anyone tried doing a software PWM on the GPIO pins via a custom written module in kernel space? Wouldn't want to reinvent the wheel, so if there where tries, please forward me to them. Will ...
TheMeaningfulEngineer's user avatar
2 votes
1 answer
1k views

How is the audio output controlled?

What hardware converts digital data to analog audio signal in Raspberry - past the codecs and the like, raw digital-to-analog conversion (be it using DAC, PWM, or any other means I'm not aware of)? Is ...
SF.'s user avatar
  • 920
3 votes
3 answers
4k views

Lighting a LED slowly with GPIO

What is a good way to make an LED turn on and off slowly using a Raspberry Pi? Im trying to hook up an led to become a Tardis lamp, but since the Pi doesnt have ADC/DAC, Im kind of stuck. What are ...
calccrypto's user avatar
2 votes
2 answers
4k views

controlling two motors with an L293D

Update: Can I possibly use the TLC5940 to control two motors? So there is a lot of talk about controlling two motors. My plan is two build a RPi robot and at minimum I need to have it control ...
gideon's user avatar
  • 201
0 votes
1 answer
2k views

Control servo with raspberry pi

I have the following servo I would like to make a small self balancing robot with it. I am having trouble with figuring out how to control it with PWM using pulses to decide what position to move it ...
Yamaha32088's user avatar
3 votes
2 answers
18k views

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 ...
Patoshi パトシ's user avatar
25 votes
3 answers
107k views

Control Hardware PWM frequency

I'm using the hardware PWM output with wiringpi. It provides the function pwmSetClock that should make it possible to change the frequency. (https://projects.drogon.net/raspberry-pi/wiringpi/functions/...
user1217949's user avatar
4 votes
2 answers
1k views

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 ...
user4067's user avatar
6 votes
5 answers
5k views

Interfacing with an RC receiver using PWM on the GPIOs

I've been struggling for a few days and haven't managed to turn up a lot on the internet. I'm looking to READ from the PWM output of an RC receiver through one of the GPIO's on the RPi. I've read ...
Wyatt's user avatar
  • 83
112 votes
5 answers
253k views

Can I use the GPIO for pulse width modulation (PWM)?

Can I use the GPIO as a pulse-width modulation output? If so, how would I go about doing it and how many concurrent, distinct PWM outputs can I have?
berry120's user avatar
  • 10.9k
29 votes
9 answers
25k views

How can I control an RC servo?

I'd like to control a small RC servo (5 V, 500 mA) from the GPIO pins via Python. Hardware What are the required electrical connections? Can I connect multiple servos to the Raspberry Pi?...
Alex L's user avatar
  • 7,605

1
3 4 5 6
7