0
\$\begingroup\$

I was looking at the Wemo dimmer and thought to make one at home myself because the price of it is very high if I buy (including import duty). I searched for the knowledge which helps me create a capacitive touch slider switch and I found this video:

1] https://www.youtube.com/watch?v=_r_8z0pAQ-o

I have also watched this video:

2] https://www.youtube.com/watch?v=lqg_Ze_OiiY&t=723s

and this one:

3] https://www.youtube.com/watch?v=mWR9Q_pTagw

which shows how can I create a capacitive touch switch using anything or Arduino Nano. I am thinking to use the ATMEGA328 microcontroller to create this capacitive touch circuit and will insert the code of the first video in the ATMEGA328 to run the capacitive slider touch switch.

My main problem is that I am not able to find a light dimmer circuit without the potentiometer. I need some guidance and help regarding how can I create one without a potentiometer and how can I join this dimmer circuit with the capacitive slider switch.

I am still researching this.

\$\endgroup\$
14
  • \$\begingroup\$ Note: Be careful with mains power. I won't say that you can't, but if I had this decision, I wouldn't build my own light dimmer. If the dimmer was too expensive I would choose to not have a dimmer. Maybe I would make a dimmer for a low voltage LED light. It's your choice, though. \$\endgroup\$
    – user253751
    Dec 23, 2019 at 13:53
  • \$\begingroup\$ @user253751 Thank you so much for your concern but if I don't make one now I wouldn't be able to learn to implement bigger things. As you said I am first going to test it on a 5V LED then I will try to implement it on Bulbs, lamps, etc. But first I need to find a perfect dimmer circuit without a potentiometer. \$\endgroup\$
    – Lucifer
    Dec 23, 2019 at 13:59
  • \$\begingroup\$ The light dimmer circuit works by turning the light on at a certain time within the mains frequency cycle, right? Why not use the microcontroller to tell it when to turn on? (ignoring, for now, the safety problems with having a microcontroller connected to a touch switch and the mains power - there are ways to solve those problem, like opto-isolation) \$\endgroup\$
    – user253751
    Dec 23, 2019 at 14:14
  • 4
    \$\begingroup\$ Totally different. "House lights like LED bulbs" are actually complex products with onboard electronics. They do not dim like 5V LEDs, Their internal electronics will actively fight your attempts to dim it like a 5V LED. Mains voltage is not simply low voltage less low, it's a completely different animal. It's easier to teach a violinist to play the bongoes than the other way 'round, so I suggest converting the lighting to low voltage so you have maximum flexibility to apply known techniques. \$\endgroup\$ Dec 24, 2019 at 17:31
  • 1
    \$\begingroup\$ @user253751 correct, they analyze the triac waveshape to figure out what it's trying to do, then command that level of dimming via PWM or current control. So the LED doesn't even need to shimmer at 120Hz like an incandescent does at dim levels! AC+dimming is a black art. \$\endgroup\$ Dec 25, 2019 at 22:45

1 Answer 1

0
\$\begingroup\$

Answering this question as I myself was searching for an answer like this a long time ago.

One possible way is to have:

  1. Zero crossing circuit - I prefer this one: https://www.avrfreaks.net/forum/zero-crossing-detector-using-4n35-optocoupler
  2. Triac driver optocoupler without zero-crossing detection. MOC3021M is an example of one
  3. Other stuff like triac itself with correct snubbing, power supplies, etc

However, It should be noted, though this project is pretty simple and straightforward - it involves mains AND touch sensor at same time. While it is easy to isolate everything with only two optocouplers, It is also true for an opposite. If there is not enough precaution in mains isolation - a strong shock would be the least awful outcome. I would not recommend doing it unless you know what are you doing for sure.

Just buy one - it will be an easier, safer option. And no one will die. Probably

\$\endgroup\$
1
  • \$\begingroup\$ I am just going to create a PoC and I know what I am doing and I will do it with great care. I have created a simple Wi-Fi controlled switch using ESP12, Hilink 230V AC-3V DC and a DC 3V relay(before this a solid-state relay 3V) and created a webserver inside esp12 to turn on and off the device. Therefore just I need to add these above functionalities in it. So according to the second option, I should create a dimmer circuit using the MOC3021M and Your Third option went right over my head. \$\endgroup\$
    – Lucifer
    Dec 23, 2019 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.