Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWM control on any pin #20

Closed
phedders opened this issue Feb 3, 2017 · 6 comments
Closed

PWM control on any pin #20

phedders opened this issue Feb 3, 2017 · 6 comments
Labels
help needed Action - Asking for help from the community wont/can't fix Result - Requested that can't be fixed/added or it is outside scope

Comments

@phedders
Copy link

phedders commented Feb 3, 2017

I've been looking at GPIO_PWM* and I'm not sure that they can be used as general PWM control of an exernal device - I think they are just for the SONOFF LED?

(I want to dim 12v/30W LED fixtures via external MOSFETS using PWM)

Do you have code coming/ready that could do this? If not I'll have a go hacking something in tonight.

@arendst
Copy link
Owner

arendst commented Feb 3, 2017

No I won't support it. Too much deviations. Try ESP-Easy.

@arendst arendst added help needed Action - Asking for help from the community wont/can't fix Result - Requested that can't be fixed/added or it is outside scope labels Feb 3, 2017
@phedders
Copy link
Author

phedders commented Feb 3, 2017

Thanks - I'll do that or hack in my own. I love the rest of your firmware... which is why I want to do everything in it :)

@hoekbrwr
Copy link

Are you really making software for IoT? Then PWM is a must! Otherwise it is useless as IoT. I thought Sonoff is about Home Automation. You make RGB with WS2812 and not having something simple as PWM for LED lighting? Very strange! It perfectly fits into the Sonoff SV module. I think it is even possible to get it in the housing completely with PowerFETs(and take out relay for space if necessary). Maybe this is more a problem Itead should solve. They are now selling driver for sort of array of RGB LEDs and not for 1-color LEDs.

@phedders
Copy link
Author

+hoekbrwr I really do not think demanding like that is helpful. I do wish things were different and I think this is would be a great opportunity missed, and if provided with a great pull request Theo might be persuaded to change his mind... You aren't a paying customer with a mandate to complain. Theo also kindly pointed to an alternative that way well work for me (and you) but which I have not yet tested.

You and I also have the opportunity to maintain our own forks thanks to the nature of OS and Theos generosity.

@hoekbrwr
Copy link

I am not demanding anything! I am only stunned by the omission of the feature. Sorry, but I am not a user who can easily fit it in a fork of the code! So I just hope the solution will come from either Itead or Theo.
Btw I have tested the dimmerx commands on a SV configured as a LED unit. Unfortunately it does not work well. I got the 50% problem you mentioned too. Als random flashing when powered up or when reset by OTA updates, so no solution through the backdoor. So I have to use homemade units with separate ESP-12 and Pete Scargill's firmware, not with a Sonoff unit

@altelch
Copy link
Contributor

altelch commented Feb 15, 2017

ESP8266 has only software PWM. There are known issues with low and high duty cycles (flickering) especially when you have network traffic. I think there won't be a satisfying solution using software PWM if your device has still some other work to do. What I could think of is the use of hardware pwm with something like https://www.adafruit.com/product/815. I2C is impemented so we would "just" need a driver and maybe a board layout like my IRremote extension to fit into the sonoff. Currently I don't have any need for this feature so I won't look into this...but maybe someone else can write the code as that's how this project works.

Greetings,
Heiko.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help needed Action - Asking for help from the community wont/can't fix Result - Requested that can't be fixed/added or it is outside scope
Projects
None yet
Development

No branches or pull requests

4 participants