Questions tagged [pwm]

PWM (Pulse-width modulation) is a technique for controlling power to electrical devices, made practical by modern electronic power switches.

468 questions
0
votes
1 answer

NuttX: How to add PWM support for STM32F7 boards? (stm32_pwm.h not found)

I'd like to add PWM support to my nuttx board config. I am using an STM32F765VGT6 MCU. I started implementing it like in the STM32F4Discovery config directory: add stm32_pwm_setup() in configs//src/.h add…
Hoeze
  • 636
  • 5
  • 20
0
votes
0 answers

Problems activating PWM output on PIC18F67K40 (MicroE clicker2 development board)

First time asking a question on here so please forgive any mistakes. If any other information is needed I'll happily provide I've been developing a project which requires using a PWM module, but I'm having no luck whatsoever getting an output from…
DM501
  • 1
  • 1
0
votes
1 answer

How do I configure the Beaglebone Black PWM correctly

I have tried to get PWM working and am not having any success. I am using the TI Processor SDK with a modified version of the am335x-boneblack.dts device tree (see below) The PWM driver (ehrpwm1) probes correctly and appears in…
user8908459
  • 537
  • 5
  • 24
0
votes
1 answer

Phase shifted fringe pattern

I have created a fringe pattern for a structured light test like this one (Binary pattern) using a code snippet for generating a pwm signal in python import numpy as np import cv2 amp=float(input('fringe amplitude:')) t=float(input('time…
0
votes
2 answers

ATTiny85 PWM for 4 LEDs

I need to control 4 individual LEDs via PWM on an ATTiny85. I have found lots of info on how to control 3 LEDs. But apparently to control 4 with PWM, you have to really twist the 85 into knots. Is there an easier way to handle 4 LEDs on the 85, or…
0
votes
0 answers

Wrong PWM pin output?

I am fairly new to programming, and as I have a fascination for music I thought to start with building a simple sequencer using codes from the web. Now I found a perfect code but somehow it does not behave as it needs to and I hope to get some…
0
votes
1 answer

Servo movement from side to side with PWM Arduino uploaded code

I'm using Arduino-Uno micro-controller with Adafruit servo shield. To move a quite fast 0.07 sec/60° mini digital servo motor with desired angle, for example from C# application: myport.WriteLine(val.ToString()); I using PWM library: pwm.setPWM(1,…
user8645307
0
votes
0 answers

How to implement duties using PWM?

I have a microcontroller from based on an Evaluation Kit of Texas Instruments. There is a vibration motor which is being activated with following code: handle = ClipPWM_open(PWMI_MOTOR, &pwm_params); PWM_start(handle); uint8_t intensity =…
user8893205
0
votes
1 answer

Creating positive and negative values from PWM

I have the following simple system: Where my triangle carrier is: (0,0) (0.0004,1) (0.0008,0). The sine wave is: Amplitude 0.5, Freq 10(rad/sec) and Phase 10 rad Then, I create a PWM inserting it into 2 transfer function and I obtain the following…
benb
  • 351
  • 1
  • 2
  • 7
0
votes
1 answer

How to calculate logarithmic values in python for PWM controlled LED fading?

This is my attempt to do LED fading with my RPI using software PWM: import time import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) # set up GPIO pin for output GPIOPin = 7 GPIO.setup(GPIOPin, GPIO.OUT) # initialize PWM…
user3142695
  • 15,844
  • 47
  • 176
  • 332
0
votes
0 answers

Achieve real 100% PWM DC by switching to I/O mode STM32F103

I am controlling DC motor with Infineon BTN (mosfet) and STM32F103 MCU, What I am doing is increasing PWM DC from 0 to 100 % in 10 secs, and after keep 100 % of DC. However 100 % DC is not 100% as you can see on scope there is a spike returning to 0…
0
votes
1 answer

PPM output is noisy when reading from sensors over i2c

Please excuse me for the lengthiness of the problem but its beyond my knowhow, I dont know where else to go. I am trying to send a PPM signal to a FlySkyi10 radio over the trainer cable. When using the PPM code below I am able to send the correct…
0
votes
0 answers

What is the highest frequency the python software RPi.GPIO.PWM of the raspberry pi 2 is able to achiev?

I use the pwm to drive a steppermotor with microstepping. So as i increase the stepcount, i need to increase the frequency to match the same speed. Am i right? Now my testcode looks like this: import time import RPi.GPIO as GPIO DIR = 20 #…
Tobi
  • 45
  • 1
  • 8
0
votes
0 answers

IRQ interrupt is not get triggered

My Driver Code : static irqreturn_t pwm_cnt_interrupt(int irq, void *data) { printk("==> %s\r\n", __func__); return IRQ_HANDLED; } static int ecap_cnt_probe(struct platform_device *pdev) { pc = devm_kzalloc(&pdev->dev, sizeof(*pc),…
0
votes
1 answer

STM32 Getting stable PWM Frequency and Duty Cycle

I have F401RB nucleo board Timer4 configured with these values The PWM output varies considerably , frequency between 40kHz and 41.67 kHz and the duty Cycle between 50% and 52%. Is there a way to achieve better stablity With due respect to Sealese…
TonyP
  • 5,655
  • 13
  • 60
  • 94