Pwm frequency

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Alan_37
Normal user
Posts: 18
Joined: 30 Apr 2017, 00:04

Pwm frequency

#1 Post by Alan_37 » 15 Jan 2018, 23:19

Hi ,

I am trying to build a high power LED dimmer using the ESP PWM but i have a problem PWM frequency is only 1khz this produces a buzzing sound since 1khz is audible tryed to add inductors but the problem still persists

Is there a way to increase the PWM frequency ?

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: Pwm frequency

#2 Post by toffel969 » 16 Jan 2018, 13:39

Alan_37 wrote: 15 Jan 2018, 23:19 Hi ,

I am trying to build a high power LED dimmer using the ESP PWM but i have a problem PWM frequency is only 1khz this produces a buzzing sound since 1khz is audible tryed to add inductors but the problem still persists

Is there a way to increase the PWM frequency ?
You will have to change it in the source code, but someone already made a pull request on git hub. So either wait or compile your own bin
https://github.com/letscontrolit/ESPEasy/issues/575
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

Alan_37
Normal user
Posts: 18
Joined: 30 Apr 2017, 00:04

Re: Pwm frequency

#3 Post by Alan_37 » 16 Jan 2018, 15:04

Thanks for your help toffel969

ahlermi
Normal user
Posts: 21
Joined: 19 Jan 2018, 16:04

Re: Pwm frequency

#4 Post by ahlermi » 19 Jan 2018, 16:11

Hello,

I have a Problem with hard coded frequency because of noices that a PWM controled fan does if you don't bring it into an area where you cant hear it.

In arduino you do it like

Code: Select all

void setup() {

TCCR1B = TCCR1B & 0b11111000 | 0x01; // Setzt Timer1 (Pin 9 und 10) auf 31300Hz
}
what have i to do in easyESP coding?

Best reguards

Michael

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: Pwm frequency

#5 Post by toffel969 » 19 Jan 2018, 18:23

Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

Post Reply

Who is online

Users browsing this forum: No registered users and 47 guests