DIY Zigbee rotary wall dimmer

Hi all,

I am working on a DIY Zigbee rotary wall dimmer since I couldn’t find a device that fits my needs so far.

I described the device here: https://github.com/dagroe/zigbee-rotary-dimmer-switch

But in short: It’s a rotary dimmer switch to be installed in the wall alongside other installation and fits in a standard 55mm system (like Gira System 55). It’s just a controller so it works with smart lights like hue (and deconz, ZHA, zigbee2mqtt) but doesn’t actually dim or switch a load. I have one prototype running via deconz.

I designed it to be powered by mains so it can act as a router to extend network range but also because I hate changing batteries :wink: But creating a battery-powered version shouldn’t be too hard.

Currently I am testing the new ESP C6 chip as a replacement for the TI chip hoping to make the device a bit smaller, cheaper, and simpler (probably mostly software wise).

I am also still looking for alternatives but there are very few and they either don’t fit inside the 55mm system (most dimmers from aliexpress) or are very expensive (this seems to be the closest solution: https://www.tlg.no/de/de/slc-smartone-zigbee-4in1-rotary-remote)

I’m looking forward to your feedback and if anyone else could use such a device or maybe would be interested in helping with further development :slight_smile:

4 Likes

Sounds great! So it could even support esphome in the future then!

Hi, have you also considered a dimmer design like this us version, where they have these buttons and led indicators.

Something that not even tuya makes for the eu/uk market. It’s usually just the knobs and touch buttons

Yes, that would be great. In any case I am trying to keep it as open as possible. Maybe even add a USB port for easy flashing of custom firmware like @Tropaion did here: DIY ZigBee DLMS SmartMeter Reader

1 Like

I haven’t. My main motivation was that I really like the rotary control. It allows to quickly change the brightness (or also color temperature in my case) but also precise control when desired. Works a lot better for me than the four-button hue dimmers I have all over my home.

That said, I’m open to collaborating on different designs as well :slight_smile: I had this things as somewhat modular in mind anyway.

How does the dimmer you describe work? Is that a rocker that can be pushed top/bottom and returns to the shown position when let go?

This is exactly what I have been looking for! I might be too much of a hobby engineer to be able to productively contribute, but a big thumbs up for your efforts.

Im also trying to get a diy zigbee enddevice up and running with the TI Code Composer Studio. But i have problems with the setup. Do you share your code?

I’m a bit hesitant with sharing the full code since I read that you have to be careful because of TI’s license.

If you have a specific question feel free to post it here or send me a message.

Hi everyone,

I have managed to build a prototype for a new dimmer based on the ESP32-C6 chip. I am looking for feedback on the hardware design before having a few prototypes manufactured. Help is much appreciated.

Here are the details that I also posted to the ESPHome discord.

I am trying to design a custom Zigbee dimmer switch based on the ESP32-C6-Mini. I am more of a software guy and still learning a lot on electronics, so I hope some people here can give me valuable feedback on my first design. Here it is:

The gist is: I want to build a dimmer switch with an rotary encoder and switch that fits in my 55mm Gira System 55. As I have Hue bulbs everywhere, I want the dimmer switch to just be a remote (so not actually dimming any load), but still 230V powered.

I attached the schematics of my main board and the very simple power supply board that will supply 5V to the main board from 230V input.

I chose 5V so the board can be powered by the 230V board, via USB for development, or possibly in the future 6V from a coin cell. I also chose 5V to power the WS2812B_5050 LED.

My main question is if there something obviously wrong with my design. I already switched the MCP1700T-5002E/MB and MCP1700T-3302E/MB LDOs I initially used because I read that the provided 250mA might not be enough for the C6. Not sure if the parts I chose are a good choice, I read that the battery can be easily drained in sleep mode with the wrong LDO.

I tried to fit most components on the back of the main board (the encoder needs to be on the back for space reasons/the button being on the front) so I can have it printed and assembled by JLCPCB and only solder a few buttons/LEDs on the front.

The JST connectors are to connect additional external switches.

Looking forward to your comments :slightly_smiling_face:




Schematics are here: zigbee-rotary-dimmer-switch/hardware/schematics at esp-version · dagroe/zigbee-rotary-dimmer-switch · GitHub

2 Likes

Hi @dagroe !

Nice to see that I’m not the only one with this need.
However, for a single-channel solution, I found a commercial device that fits the bill:
Schneider Exxact WDE002961

It only seems to be available in the nordics and baltics for some reason, but you should be able to source it from any online retailer who has it in stock.
I use it already, together with HA, and it works like a charm!
It has a drawback though, and that is that it only has one control channel, or to put it differently; it can only control one zigbee light. I have a constrained space, and need to control up to four different lights. So I came up with this design, which is already proven in 3D-print + laser cut acrylic.




The idea is that the transparent ring under the knob will pass on light from a semi-circle of leds that indicate the intensity of the currently selected light source.
Switching between sources is done via the four buttons that make up the 55mm bezel around the knob.

It may seem like a mechanically complicated structure, but I have already made a proof-of-concept using a standard rotary encoder, two 3D-printed parts (the knob is one part, of course, and the bezel is actually also only a single part) and a laser-cut ring from 5mm acrylic. I also ordered a water-jet cut steel sheet for the mounting frame, and that was probably the most expensive part, but still within reason using JLC’s fabrication services.
The only missing part were the electronics, but thanks to your GitHub project, now I have a decent starting point.

You may wonder why would anyone go through all of this hassle, when there is a HA involved already? Well, I live in a rental flat, and if the day comes that I move out, I’d prefer if the various light-controllers kept working in stand-alone mode, should I decide to not leave my HA behind :slight_smile:

2 Likes

Apart from the LEDs under the dimmer, how is this any different than the Philips Hue Tap Dial?

First, and most importantly, It differs by me not being aware of the Philips solution :sweat_smile:
Secondly, and perhaps equally important; the Philips Tap Dial is battery powered and I’m of the same opinion as Daniel, that I prefer my controllers to be mains powered. This may not be an issue to some, but it is an issue for me.

As I wrote above, this has to be a 100% stand-alone, tech-support-free implementation with a user-friendliness and reliability on par with a classic A/C light rocker switch. Quite the challenge, right? :slight_smile:

Edit:
Actually, I found another “disadvantage” with the Philips Tap Dial: It’s too big to fit into a European 55 frame.
https://www.reddit.com/r/Hue/comments/xc8wld/whats_the_size_of_the_baseplate_of_the_hue_tap/

1 Like

Hey @Eriond

sorry for the late reply, somehow the HA community forum never sends me an e-mail about replies :frowning:

Thanks for sharing!

The Schneider device looks interesting. Does it also work when there is no load connected? And yes, I have encountered several people that found some suitable hardware but then were frustrated that it doesn’t do the right thing, i.e. send the right commands. Also like you, Ideaaly I want the controller to send sommands directly to the bound light(s) so it still works when HA fails.

Really glad to see you are working on some custom hardware as well :slight_smile: Also: pretty smart idea with the four buttons. Makes me think if I should ditch my efforts in making it work with the standard Gira hardware (dimmer cover). How are you satisfied with the look and feel of the 3D printed knob? I’m still a bit sceptical if I can produce something that fits well with the standard Gira stuff (which is glossy smooth injection molded stuff).

If you need anything, let me know. I tend to not always update the hard and software on the github repo (maybe I should do it more often :wink: )

Hi there.
First, to answer your question; yes, I have bound the Schneider Wiser dimmer to my IKEA Stoftmoln ceiling lamp, (using the bind feature in ZHA) and they work fine together. The dimmer has no load connected to it.

Secondly, I had some thoughts about re-using the original Schneider knobs for the same reason you mention; they are high-quality and will of course fit into the existing style without any effort. But… then I would have ditch my idea of having a LED indicator ring showing the level of the currently selected device (in my case, one of four since I have four selector buttons).
Sure, this is a “nice, not need” feature, but I like nice, so I will keep it :slight_smile:

So far I have just printed the knobs in standard white PLA plastic, and when the day comes that I’d like to make “production” devices, I’ll just use some polyester body filler, sand it using a fine grit paper, and then spray paint + top gloss. It’s maybe an hours work or so (excluding the time for the paint layers to dry), but a reasonable trade-off comparing to making an injection mold for the small quantities I need (<5)

Here are some pictures of my progress this far.
I’m currently on my second iteration of the face plate. The first one (on the left) was a bit too rigid in how the plastic was divided between the buttons, so the current design is more flexible and instead relies on the tactile buttons beneath to provide the correct feel and rigidity.

This is how it looks from above:



I have also made a proper mounting plate to hold things together. :

Here is the Schneider Wiser dimmer for comparison. This is the level of surface finish that I’m aiming for.

1 Like

Very nice!

I had some parts 3D printed at JLCPCB and the quality is quite nice. It’s just not glossy and the white doesn’t match. But it’s quite cheap.


For the light I just let it shine through the cover. I am thinking about using it as a night light which will work great. For your use case it might be a bit too weak. Its only a single LED (set to 50 brightness, I guess max is 255) so far so one could put 3 more.


Does the Schneider also use a 6mm encoder shaft? One of the biggest problems I faced is that my Gira cover is made for a 4mm shaft so it doesn’t work on the standard 6mm encoders. If I could get a good looking cover with 6mm that would be awesome :slight_smile:

1 Like

Hi Dagroe, thanks for sharing this project!

I have a similar (I think?) need.

I have smart bulbs everywhere, and dumb switches/dimmers. Right now, if someone turns a light off, it has to stay off until it is physically turned back on again. And if it has been turned off by HA, it has to be physically turned off and then on again to come back on. Lastly, the bulbs are all colour temp adjustable and dimmable, but in many places I have rocker switches only.

  • provide tactile feeling like classic rotary dimmers - has to be intuitive for the general public
  • integrate with existing switch and socket design lines - I don’t really mind what it looks like but I actually prefer the smaller knobs
  • offer an optional 230V (or 110V) power supply, no more changing batteries + acts as Zigbee router - yes please; if the smart lights are always “on” (even when not giving off light) I think having the device in series should work OK?
  • control existing smart lights (e.g. Philips Hue), not making classic bulbs smart (i.e. switching/dimming classic bulbs) - yes - although an emergency override for in case HA is down would be nice, I don’t think it’s feasible. Switching power off can’t be part of “normal usage” because the smart lights to need to stay always on.
  • allow for a second rotary input by rotating the knob while pushing it (e.g. to change color temperature or scenes) - YES
  • feature an integrated 230V (or 110V) mechanical switch to switch power of the connected lamp socket (e.g. for emergencies or to reset the lamp when replacing classic wall switches) - WOOHOO!
  • be affordable - YES - I need at least 12 of these things! I couldn’t find @Eriond’s Schnieder Exxact switches but if they are anything like what else I have seen, we’re looking at >50 GBP each.

What I’m a bit confused by is that this doesnt seem like an unusual use case but the dearth of commercial products for this suggests otherwise. So I’m wondering if I am just missing something obvious - like battery remote switches that I could jerry rig to be powered by mains?

I’m also a software dev rather than hardware but I have had a little experience with hw too. I would be very pleased if there was some way I could make a contribution. Where are you at with this project, and what are the issues you’re facing? I would like to try to replicate your current design, which could at least generate some feedback. Would you be willing to share your BOM / schematic files / 3D models for manufacture and printing at JLCPCB?

Hi @yoges,

glad to hear there are more people interested in this project :slight_smile:

I was also a bit confused why there is nothing out there but I guess the combination is a bit niche. You can buy the Hue Tap Dial if you can live with battery and don’t care if it fits within the standard 55mm frames. Then you just remove your standard switches or cover them so the bulb always has power.

My current solution looks like that but the old dimmer instead of the Tap Dial (like here: https://hueblog.de/2020/01/13/samotech-sm22-doppelrahmen-mit-zwei-dimmschaltern-ueberdecken/)

I really need to update the github repo with the current design files and firmware. I am just super busy right now and hope to get to that in early March.

I have one working prototype but am still fine-tuning the design of the enclosure and need to finish the firmware. Currently it is sending too many zigbee commands when being turned, so I need to implement some kind of buffer and I was also working on putting additional endpoints in the firmware so one can hook up external simple switches and one additional rotary encoder.

If you are interested in contributing, please try to join the discord I setup: Zigbee DIY

@dagroe: I thought replacing the rotary encoder with one that has a 4mm Ø shaft should be as picking a different sized resistor, but to my surprise its impossible to find anything else but 6mm Ø shafts! :astonished: (and as a hardware engineer, I have quite a few places that I source my components from)

@yoges: I’m sure you can find the Schneider dimmer if you google for the term “EAN 3606481040459”. Although, that dimmer won’t fit your bill of wishes very well :slight_smile:
In the nordics, the prices begin at about €65. There seems to be at least one reseller in the UK; Icecat, but for the rest of the world… :man_shrugging: I guess the 55mm frame system isn’t adopted that widely.

@dagroe we have been in contact in the past, and only recently I had some time to spend on this project.

It is indeed very difficult to source single rotary encoders with 4mm shaft, I haven’t found them so far (and I spent quite some time on it). I also looked into hollow shaft encoders, but they don’t have the click/switch function. So basically there are three options, make an adapter shaft, machine down the 6mm shaft to 4mm or buy/adjust a knob to fit 6mm shaft.

@dagroe I had a look at your schematics, looks good! I am only wondering if you need U6? Is it required to further stabilize the 5VDC? Also I am not sure if it should be connected to the VBUS since the dimmer will get the voltage from the computer. Now there is always 5V on the USB connector. Also I would recommend the 2W IRM power supply, Espressif states in the datasheet the supply should be 500mA at 3.3V.

I had the feeling a trimmed down design would fit my needs better (just a zigbee dimmer) and therefore I made a proof of concept with single PCB fitting all the components on either side:

The mechanical stuff needs to be sorted out further. I think my first approach would be the adapter shaft, but that consumes a bit more depth in the wall box. Alternatively the rotary encoder can be replaced with a longer one, but that would require adjustments on the knob (or trim down the shaft to 4mm). Not sure which route is better. I have a 3D printer so I can work out different approaches.

Any feedback is welcome!

@Eriond Yes, finding an encoder with 4mm shaft is impossible. I actually 3D printed a custom shaft and replaced the shaft on a Bourns encoder. It works but I am not sure I want to do this on a larger scale.

That’s why I went with a shaftless encoder and placed it on the backside of the PCB. The frontside then features a hole in the center and a button on the front, so one has rotation and push button. It works well but requires a bit more fine tuning to get a satisfying click feeling and make the push and rotate mode working.

@PcFer Looks awesome. Would be great to have a compact design but I guess this depends on if we can make the encoder work as a regular SMD encoder with 4mm shaft. The one you used looks like the Boruns PEC11S I used but for that swapping the shaft seemed a bit more difficult, also I think it doesn’t have a bushing.

U6 is actually because I wanted to be able to power the board also by batteries. So the idea was a second power board using two coin cells at ~6V instead of the 230V board.

I think we should start a feature matrix of some kind so we can identify how many different designs we are aiming for :smiley: