Wemos D1 mini and flickering PWM

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
xl15
New user
Posts: 1
Joined: 28 Sep 2017, 08:13

Wemos D1 mini and flickering PWM

#1 Post by xl15 » 02 Jan 2018, 14:46

I run ESP Easy 2 on a Wemos D1 mini. It controls a 12 V LED spotlight via a mosfet and it works fine.
But when I added a light sensor that sends its value via MQTT once a minute, I get a flicker once a minute.
It's like the pwm output gets high when the Wemos sends data. A very short while, but it looks like an annoying flash.

TD-er
Core team member
Posts: 8772
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wemos D1 mini and flickering PWM

#2 Post by TD-er » 02 Jan 2018, 21:29

Just a notice, I added this topic to the following issue on Github: https://github.com/letscontrolit/ESPEasy/issues/672

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Wemos D1 mini and flickering PWM

#3 Post by Shardan » 03 Jan 2018, 14:57

The ESP8266 is single threaded - the cpu can only do one job at a given time.
So if the cpu is occupied working on the rules the PWM stops for a moment as it is software controlled.

I've noticed that with controlling fan speed in a dust sensor with a lot of rules.
Fan stops every second, same as flickering with your LED.

For LEDs the solution is atm to use a PCA9685 PWM chip.
Possibly you might have to change the plugin a bit for driving a MOSFet as it is set for driving a small LED directly.
The setting can't be changed vie the WEB GUI at this time.

This is described in the github issue #651 https://github.com/letscontrolit/ESPEasy/issues/651

Regards
Shardan
Regards
Shardan

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests