Esp8266 fan dimmer

esp8266 fan dimmer

Not a member? You should Sign Up. Already have an account? Log In. To make the experience fit your profile, pick a username and tell us what interests you.

We found and based on your interests. Choose more interests. I have received all components and have a working breadbord prototype. View all 12 components. Code and Fritzing schematic I've been working on are now available on GitHub. Both are for v and will need adjusted timings in code and 30k resistors to the bridge rectifier for v.

Next up will be trying to fit all components on my perfboard. I've ordered some 4A V pigtail fuses and am waiting to see if I can squeeze it on my board I will need to shift things around.

If not, I will use an inline fuse holder. Here is what its looking like with all components in place except fuse. Nothing is soldered yet. My initial code was running on NodeMCU firmware. View all 2 project logs.

esp8266 fan dimmer

Create an account to leave a comment. Hola amigo excelente trabajo, he intentado hacer este mismo proyecto pero tengo problemas de parpadeo en la bombilla. Are you sure? Where do you find the power supply it seems it has 4 output 3.

I could not find it online if you have a link please share.

ESP8266 Internet Controlled LED Dimmer

There is only one output. Depending on the model you get hey are supposed to mark the appropriate box mine had no boxes marked.We are a strong Community of developers, hackers, and visionaries. No, seriously, we are! Wifi controlled V AC dimmer. Wifi controlled V AC dimmer If you don't know how dangerous it can be, do NOT try to replicate this design.

MAINS can be letal This being said, here is how you can control any incandescent light or electrical fan with your favorite ESP over internet : schematics. You do not have the required permissions to view the files attached to this post. Re: Wifi controlled V AC dimmer Return to ESP Videos. Who is online. No one use those base on esp? They are super c[…].

Hello everyone, It's first time project with ESP8[…]. Exactly the same question has been previously po[…]. I've been reading up on this as well. From what I'[…]. Hello guys! This is a question about the LwIP variants that ar[…].

Light, Fan, and Dimmer Control With ESP8266 and Cayenne

Thanks for your quick response! Ok I rebuild ever[…]. Hello, I'm having the same problem.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. If nothing happens, download GitHub Desktop and try again. If nothing happens, download Xcode and try again.

Is the Shelly 1 better than the Sonoff Basic?

If nothing happens, download the GitHub extension for Visual Studio and try again. Skip to content. Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Sign up. Other Branch: master. Find file. Sign in Sign up. Go back. Launching Xcode If nothing happens, download Xcode and try again. Latest commit. Updated IR button actions.

Everything works as expected. But that would need some server to periodically respond to time requests from the Arduino. Latest commit 55e59c9 Jan 11, Using zero detection and firing the triac in version 1 was causing noise in the fan as the current increases from zero immediately.

On the input side, there are two relays - one for light and the other for fan. If Arduino is powered off, then the NC ports of the relays are connected and hence wall outlet switches will work normally. When the Arduinos is powered on, then these relays are active. From the light relay, the NO port is connected to a triac which can be trigged to switch on the light. The NO port of the fan relay is connected to three capacitors.

There are also four triacs, one connected directly to the output and other through the capacitors. Based on how many triacs are triggered, the fan of the speed varies. But if only the triac connected to the output directly is fired, then the fan rotates at max speed. The temperature is periodically checked and if it goes below the set temperature, the fan is switched off. You signed in with another tab or window. Reload to refresh your session.

You signed out in another tab or window. Dec 3, Jan 11, Couple it with logic level NMOS and a few more components can be skipped. Is there anything you could recommend to show up the flaws of the software PWM?

Main problem with software PWM is usually if you try to dim to a very low light level, such as fade to black. Chip used in the featured article is great since it has 16 PWM channels, so is easily expandable.

Depends on what frequency and resolution you want. I like having at least bits to get a good resolution in actual perceived brightness. Couple that with a high enough frequency and you will get the ESP to spend most of its time in interrupts. The module works in the network as an ArtNET node, so that it can be controlled by a host of software. I cannnot way for my brother in law, who works as an LJ, to come with his console :. Most of the code is not mine. Also, make sure you do not make the same mistake as I did: this code leaves ESP in dual mode, so it acts also as a WiFi access point with default credentials.

It is not only rather insecure, but then the additional WiFi shows up around the house. Unfortunately, my device is rather inaccessible now…. This site uses Akismet to reduce spam. Learn how your comment data is processed. By using our website and services, you expressly agree to the placement of our performance, functionality and advertising cookies.

Learn more. Report comment. Leave a Reply Cancel reply. Search Search for:. Hackaday Links: April 12, 14 Comments.Arduino Uses 8-Bit Resolution i. PWM range is So, in order to use PWM, we can call the analogWrite function simillar to the function also available with Arduino boards. Can be used to light a LED at varying brightnesses or drive a motor at various speeds.

After a call to analogWritethe pin will generate a steady square wave of the specified duty cycle until the next call to analogWrite or a call to digitalRead or digitalWrite on the same pin.

You do not need to call pinMode to set the pin as an output before calling analogWrite. The analogWrite function has nothing to do with the analog pins or the analogRead function. Digital control is used to create a square wave, a signal switched between on and off. This on-off pattern can simulate voltages in between full on 3. To get varying analog values, you change, or modulate, that pulse width.

If you repeat this on-off pattern fast enough with an LED for example, the result is as if the signal is a steady voltage between 0 and 3. In the graphic below, the green lines represent a regular time period. This duration or period is the inverse of the PWM frequency. What you are doing here is essentially mapping time across the space. To our eyes, the movement blurs each LED blink into a line.

As the LED fades in and out, those little lines will grow and shrink in length. Now you are seeing the pulse width. You must be logged in to post a comment. Before we start actual programming lets have a look at What is PWM? Leave a Reply Cancel reply You must be logged in to post a comment. Login with:.General considerations :.

There are several types of dimmers generally available.

esp8266 fan dimmer

These are used for resistive, and inductive loads, such as incandescent,cold cathode and low voltage inductive lamp sources. Note that not all electronic transformers used for low voltage lamps are suitable for dimming by Triac or Thyristors dimmers.

In case of Thyristors you need 2 of them as Thyristor is a Unidirectional device and because AC power flows in both directions!

Why using Thyristors? One of the reasons is that they are available in higher power ratings than Triacs and are more robust. A A to 1kA ratings is something common for Thyristors. Usually you will find this kind of Thyristors in Industrial applications, not exacty a hobbist part. BTAB is a good example. And this is because of the way the dimming process is going and depending on our own ZCD zero cross detection function.

In our case zero cross detection is done by the biphase optocoupler as in the schematic below. The number of cycles in one second is called the frequency. The value 50 or 60Hz is dependent on the countries power system.

The current alternates back and forth changing direction at the zero point. If we will to look at the waveform yellow with the Osciloscope it would appear as a sinusoidal shape. Drawing a line through the middle and this is what is called the zero crossing point. At this instant in time no current is flowing in either direction. By chopping the waveform at the zero-crossing point, smooth dimming can be achieved without the lamp flickering.

This turning on and off of the power device occurs every time the mains crossing point is reached half phaseor times per second 50 or 60Hz.

For very simple reasons. But this is not affecting at all the general view of the process. MPDMv3 Software. Define used GPIO pin :. As you have seen above on the Osciloscope, zero crossing is the moment when the sinusoide goes through zero. After each zero crossing there is one full half of the sinuswave available to send through the Triac to the Load.

So what the software needs to do is to detect the zerocrossing, and then wait for a set amount of time on that sinuswave to switch on the TRIAC. We have a 50Hz VAC that means is 50 waves per second. That means that after every zero crossing detection there is a 10ms period that we can regulate.

If we switch Triac directly at the beginning of that period, the load will receive full power If we do it at the end of that 10ms period the load will receive none and if we do it halfway, the load will receive half power.

Your email address will not be published. Deadly zone!! Triac Web Switch. Leave a Reply Cancel reply. What's on your mind? Related Posts. Zero Cross Detection output example. MPDMv3 — Schematic.I wonder if your codes work at all. Another known "bug" issue of Nodemcu: tmr. We can use it only every seconds, not mili- or microseconds. Thank you. But in consequency it is not working and stable. Hi Janusz, First of all I want to thank you for reading my Blog. I am very happy to see that people are sharing here their own experiences about ESP world.

Also a nice tool for early stage development. Did you tried also the latest NodeMCU release? Thanks fo reply. I generated own firmware from Nodemcu online builder.

esp8266 fan dimmer

So it is the latest version I hope. Your idea of coding is working. It was discussed in another forum. Because tmr. Please try to open your IP several times every second or even every a few seconds and it will crash frimaware later or sooner accidentally.

I did not copied your codes, but I written my own base your idea. I believe there is not mistake, because I write and test 2 parts separetly. Only light dimming - works ok.

Only web server - works ok.

Main ESP8266 fan controller features:

Uploaded connected - crash. I will try with your codes copied today. Did anyone ever get this to work reliably? I've tried using ESP Arduino code and have exactly the same problem. I did not. It's a horror. We cannot use two or more timers in ESP. For this moment I see only one solution: ESP as web serwer only, connected to arduino as pwm trigger dimming control.

Hi, I can't get the dimmer values from the range form to update the "status" variable.

Esp8266 fan dimmer