PWM (Pulse-width modulation) is a technique for controlling power to electrical devices, made practical by modern electronic power switches.
Questions tagged [pwm]
468 questions
0
votes
1 answer
How is generating PWM related to GPIO speed?
During GPIO configuration and initialization we, for example, may set the pin speed to 50MHz, 100 MHz, but we also may set it to 2MHz. As far as I know less speed = less power consumption. How is generating PWM related to pin speed? When I want to…

Torcek
- 13
- 2
0
votes
0 answers
How to reverse a motor controller by a ESC
So i am building a RC car that i can control with a atmel atmega32A.
I have a brushless motor + ESC, but instead of a remote i am controlling the ESC with the microcontroller. I just found out that controlling the ESC is as easy as controlling a…

Vinka
- 11
- 4
0
votes
1 answer
PWM Current calculation and dependency on frequency
I am using a PIC16F877a to drive a solid state realy connected to a 300W starter motor (R=50. millohms, L=50mH);
I tried varying The frequency and duty cycle to reduce the inrush current. it worked my current reduced to almost half.
I know that the…

CjZ
- 1
- 2
0
votes
2 answers
How to use a DAC on a PWM input generated by timer interrupts?
I'm using a 12-bit Linear LTC2631 DAC, and wish to convert my PWM signal to an analog one via I2C. I am currently not able to come up with an algorithm, and how would the the DAC need to programmed to take in the PWM input and then generate an…

shaabhishek
- 63
- 6
0
votes
3 answers
What is the exact frequency of PWM signals produced from Arduino pins
In http://arduino.cc/en/Reference/analogWrite it says,
" The frequency of the PWM signal on most pins is approximately 490 Hz. On the Uno and similar boards, pins 5 and 6 have a frequency of approximately 980 Hz. Pins 3 and 11 on the Leonardo also…

Armia Wagdy
- 567
- 6
- 22
0
votes
1 answer
How to achive higher PWM frequency?
I am using the libraries provided by C18 compiler to open and set the duty cycle for PWM usage. I noticed that the max PWM frequency I can get with 100% duty-cycle is about 13.5 KHz. The lower the duty-cycle the higher the PWM frequency. How can I…

Ammar
- 1,203
- 5
- 27
- 64
0
votes
1 answer
50hz Sine lookup table using PWM
Can someone please guide me how to generate lookup table for generating 50 hz sine wave using PWM in Atmega32.
This is what i have done so far but confused of what to do.
50 Hz sine wave so 20 ms time period
256 samples (No. of divisions)
step i…

Atmega32
- 1
- 2
- 4
0
votes
2 answers
How do you stop Arduino Esplora's tone function interfering with RGB LED
On the Arduino Esplora, which is based on the Leonardo board, the PWM support of pin 5 which drives the Red component of the RGB LED looks like it shares a timer with the tone function. This has the unintended consequence of rendering the Red…

Mark A. Donohoe
- 28,442
- 25
- 137
- 286
0
votes
1 answer
wxPython PWM using slider
I have basic wxPython knowledge.
I am trying to obtain the slider value and set this as the value for the Pulse width modulation of an LED.
This is the code I have so far:
Slider
slider = wx.Slider (panel, 100, 25, 1, 100, pos=(200,70),…
0
votes
1 answer
what is the reason for unequal voltages in different ports in pwm?
I have a piece of code for getting same analog pwm output voltage from PB4 and PB5 using fast pwm in output compare mode. However the voltage from them is different. What could possibly be the reason for this ? Also the voltage from neither of the…

avr_rookie
- 57
- 3
- 10
0
votes
1 answer
pwm value not changing
I have written a pwm code for Atmega128. I am using fast pwm mode with non-inverting pulse on compare match and I need to change the OCR0 value at certain times. Yet it doesn't change. Anyone knows what is the problem here ??
#include…

avr_rookie
- 57
- 3
- 10
0
votes
2 answers
Generating square wave using Matlab embeded function
I intend to generate a square wave which is applied on a DSP.
I have written these codes and put them in an embeded Matlab function.
function y = fcn(u)
%#eml
t=0:0.001:1
h = sign(sin(125600*t+u));
y= (h+1)/2
where, u is a constant value of…

user3217738
- 1
- 2
0
votes
1 answer
STM 32 How to multiply PWM inputs
I'm going to make few parts of plane cockpit.
I need to use about 20 encoders, about 10 character LCDs and a lot of switches/triggers/buttons.
I think it's not a problem with LCDs and buttons, because I can use shift-registers, but I don't know…

Aleksandr K.
- 1,338
- 14
- 21
0
votes
2 answers
Is it possible to use more than one timer on an Arduino Uno?
I know that the Arduino has three timers (timer0, timer1, timer2) and one is 16bit and the other is 8 bit but i am not sure how to use them and if possible can i use all three in the same project with each one having different time intervals that…

blu
- 353
- 1
- 5
- 17
0
votes
1 answer
DC motor speed is too low while interfacing with L293D morot Driver and Atmega8
I am trying to drive a 6v dc motor with L293D driver and Atmega8 without PWM. The problem is i am getting very low speed while connecting the motor with L293D driver. But, it rotates well when i provide direct 6V dc supply to the motor. I am using…

Nafees
- 13
- 1
- 1
- 6