-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Universal AC MAINS Dimmer - MPDMv4.1 #82
Comments
What type of fan do you have and with what settings did you try to add it? Also important is what GPIO pin you connected it to. |
Hello, it's a 230V toilet fan and it's connected to the GPIO for PWM GPIO18. But unfortunately it does not work I think I made a mistake during installation, but I do not know 100%. |
PWM on the RPi 3 is only available on GPIO 12, 32 and 33, as can be seen on this website The different numbering systems can be a bit confusing, but using the GPIO numbering used in TerrariumPi is appears you're using the wrong GPIO pin. For testing you could use the same settings and pin as TheYosh as can be found here. |
I just realised something. Unless you have a special type of fan I doubt it will work, as I can't imagine a 230V bathroom fan is PWM dimmable. For that you usually need a fan with 3 wires. A set for the positive and negative leads as well as a signal wire. As you most likely use 12V somewhere else in your setup, it will be easier to find a PWM dimmable 12V computer case fan. I got a set of 120mm fans for less than €7.50 each. Cheap, powerfull and very silent as well. |
For PWM dimming, there are only GPIO 12, 32 and 33. So make sure you are using one of those. Further, it depends on the fan, if it will work with a dimmer. It will just get less power. So the Fan does not need to have support for PWM. You will have to have a dimmer module like: https://www.tindie.com/products/nEXT_EVO1/universal-ac-mains-dimmer-mpdmv41/ So the module will dimm the power from 0 to 250Volts. And if your fan can handle that, it should work. |
Hi theyosh I use exactly this board as you indicated in the link, I'll try it tomorrow with another pin |
Hi, so I've tried it now, unfortunately without success as you have this board installed (software and hardware) I have now connected like Theyosh. Many thanks for your help! |
Ok another way of solving this:
If this does not change anything, I do not know what it could be. |
Do I just have to install Pigpio and nothing else, right? |
just run the install.sh script. It will take care of it |
Hmm, this looks ok. As long as the small led on the board is lighting up, it should be connected ok. Are you still testing with the fan? Because it could be that the fan has a 12v transformer and that can't be dimmed. So I always test with a normal light bulb. So if you have checked that pigpiod is running, test it with a normal light bulb. Also make sure that you use physical pin 32: https://pinout.xyz/pinout/pin32_gpio12# Finally, you can use this piece of code to test it manually. The number 12 is correct here. Create a python file and run it. It will ask for some numbers which will change the dimming. `import pigpio pi = pigpio.pi() dm = 0 print("\nOut of range. Exiting...") Code will not indent...So use the original: http://www.esp8266-projects.com/2017/04/raspberry-pi-domoticz-ac-dimmer-part-1/ Else, you could try the creator: https://www.tindie.com/products/nEXT_EVO1/universal-ac-mains-dimmer-mpdmv41/ |
Ok, thank you, I'll test tomorrow, I'll let you know |
Any updates? I did notice that the TCP connection can be an issue in code. If so, there is a small fix for that. But please confirm first that the tests works. |
Hello, so somehow it will not work for me :-( |
Ok, then I am afraid that I cannot help further. As I am not the maker of the board, I also have to Google for answers. So a final option that I can think of, is to complete install a new clean Raspberry PI. Do NOT install my software or anything else. Just a clean Pi. Then try to get your dimmer working by the following his youtube movies. http://www.esp8266-projects.com/2017/04/raspberry-pi-domoticz-ac-dimmer-part-1/ Sorry that I cannot help you further with this. |
I hope I come to this week to test it. |
How do did you switch it off? Used the slider and set it to zero percentage ? And did you set the off dimmer value to 0% in the power switch settings? |
Hmmm, this is going to be tricky .. :) We have to find the right value for the variable The original code suggest that a value of 860 is enough to fully dim. My experience is that is needs a bit higher, so I use 880 in my code. So I am not sure what the right value is for every device. I do know that when it gets to high, your light is going to blink a lot. So then you hit the limit. If you are handy enough you could to the following. Try editing the file terrariumSwitch.py and change the value 880 on line 28 to 890 and restart the software. And see if that works better. I hope you understand what I mean. You have to find the right value around 880 that makes your light go completely off. |
Did you already found the right value? If higher does not work, you could even try to go as low as 800 to see what happens. |
Hi, thanks tomorrow morning I can tell you more :-) |
So the lamp glows a bit what should I do now? |
So 895 is the right value so that the lamp no longer glows |
Cool! Updated the code. This value seems to work for me also |
I am glad :-) |
Can someone help me with the installation, I do not bring it together that I can dimming a fan.
The text was updated successfully, but these errors were encountered: