Are you not supposed to cut the unused leg of the encoder?
I cut all 5 legs on that side and connected the required 4 to the ESP8266.
However, I’m having issues with the manual control. WIFI control works great!
Encoder Position 1 results in speed 1, D1: L, D5: H, D6: L, D7: L. It should be off.
Encoder Position 2 results in speed 2, D1: L, D5: L, D6: H, D7: L. It should be speed 1.
Encoder Position 3 results in speed 2, D1: L, D5: L, D6: H, D7: L. Correct
Encoder Position 4 results in speed 3, D1: L, D5: L, D6: L, D7: H. Correct
Great project!
I just wanted to add this for posterity since it stumped me for a while: I used a MP2315 step down converter (using it to step down to 3.3V) and a Wemos D1 Mini, and I couldn’t flash the D1 Mini after soldering all the wires. I just got this error: A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header
I was able to flash the firmware when i plugged in the 24V power supply of the fan. Don’t know why this happens but it does! So try plugging in the power supply if you are experiencing problems with the initial flashing.
Did anyone of you use a 5V <-> 3.3V level shifter, as Wemos use 3.3V GPIO and Förnuftig is at 5V.
I don’t want to fry my Wemo and was wondering about that.
Somewhat of a stupid question but how did you wire up the fan following the guide in Making the stupid dumb. Vindriktning and Förnuftig - Qball's Weblog? Having never wired up a PWM fan before I really don’t want to let out the magic smoke and it’s really hard to see from the pictures in that guide.
I used thick silicone double-sided tape and it’s holding firmly. I put 3.3V regulator because that’s what I had lying around.
I tried to replace D0 with D8, but that didn’t work for some reason.
Also, if compiling with A0 as sensor, it must be soldered as well, otherwise WiFi won’t work properly and ESP will boot loop.
Why is it necessary to cut the rotary switch legs if the original board is only used to hold it in place? Or does it interfere with the ESP and provide unreliable readings?
The rotary switch does short one of the outputs to ground, depending on the setting. The original board scans all the inputs (from highest setting to off) and controls the motor accordingly. So if you don0t cut the logs, the switch will fight the ESP when setting the speed. Disconnecting the legs gives full control to the ESP.
Ah sorry, it was a reply to the PWM method which doesn’t power on the original board anymore. I measured the legs and at least for the PWM method it should work without cutting them anymore.
I’m trying the PWM method with a Wemos D1 Mini right now, but for some reason using your code and connecting the D1 pin to the fan pin (and leaving the tacho pin disconnected) won’t make the fan spin at all.
Is there anything I’m missing? The fan itself works, if I touch the bare PWM pin cable it spins up (probably due to induced frequency).
EDIT: Nevermind the fan pin needs a common ground to work properly which I didn’t have in my testing. Works now!
I tried this but unfortunately it doesn’t always switch back on from home assistant after I switch it off. Will have to change the dial to get it back up and running
i also get an error when setting to frequency to 0hz:
Frequency 0.000000 can’t be achieved with any bit depth
I am using an ESP32 and am using the ledc output for PWM
Hi, I just hacked my Fornuftig thanks to your instructions. But I have a question. Can you turn it off by turning the knob if it was previously turned on with ESP?
first of all thanks for all your effort into hacking the ikea fan! Just awesome!
I tried to reproduce it but i cannot get the esp to power up… i connected a 5v regulator (with capacitors) to the 24v and gnd pins, i then measured the voltage and it is 4.99V which is fine. i then connected the D1 to the regulator, the led shortly blinks and thats it, when i know measure the volate while the D1 is connected it is around 1.1V…
By now i tried 6 different ESP8266 and a bunch of different regulators, circuit boards, etc… no matter what i am unable to power the esp through the fans power source…
any idea why this is? or at least an idea how i could figure out what exactly would be the problem.
just to mention: of course i did check for shorted circuits and disconnected everything except the power i event went so far to connect my regulator directly to the 24v cable connector and disconnected the pcb completely… no luck…
Thank you very much @tht for the tutorial also, works like a charm! Has anyone got the PWM fan setting figured out with this same wiring configuration without bypassing the manual knob? Looks like @Nierit you bypassed the knob and how has your’s been holding up?
Great tutorial, but now I am stuck. I can get speed 2 and 3 working, but the lowest speed seems impossible. In the ESP home log, it sswitches correctly, but both the knob and digital selection of speed 1 will stop the fan.
At first I thought I had fried my Wemos, but I have tried two other ones and am having the same problem for them all. Anyone knows how I can troubleshoot this?