Need help to find a rotary encoder

Hi, I’m trying to get a (simple) light dimmer for wall mounting based on a ESP8266 and a rotary encoder, so very straightforward and basic circuit.

My PoC used a typical rotary encoder we find everywhere:

My problem is that in order to properly embed that with a nice enclosure from Feller (the well-known brand used virtually everywhere in Switzerland when it comes to wall buttons and sockets), I would need a slimmer diameter shaft. All those I find are 6mm, I need 4mm.

I tried to cut the length and 3D print an adapter (6mm => 4mm) but 1. I need to cut a lot of the metal shaft and 2. the 3D printed adapter is quite fragile, so the whole is not usable on a day-by-day basis.

I cannot see how to find such a rotary encoder, but I’m sure there’s a way. So here the requirements if someone can help me:

  • Either ready-to-use module with enclosing electronic for the direct connection to my ESP8266, or clear instructions on which base plate to use
  • 4 mm diameter shaft, full cylindrical, no need for a “cut cylinder” like on the photo
  • `>= 12 mm shaft length (I can always cut a bit if longer) on top of the mounting screw
  • mounting screw like on the image above (to screw it on the support plate)
  • Click/Push support (so that in addition to the rotary encoding I can detect a push for basic on/off)

I don’t need the pins from the picture, I can solder, I just would like to limit soldering to the connection and not the encoding electronic associated to the raw rotary encoder.

If it helps to better understand, the goal is to replace the dimmer part and only order enclosure from https://online-katalog.feller.ch/kat_details.php?fnr=40095.DALI.D2.FMI.61. Unfortunately they have analog dimmer and DALI-compatible dimmers but nothing like Zigbee or alike…

How about going the complete other direction and use a blank plate with:
https://www.aliexpress.com/item/1005008424118832.html

Yes, that could be a solution, the problem is that the design is not the same as all my other wall buttons, and I’m ticky about design and having everything uniform :slight_smile:

When it’s a single button, that can be discussed (it would need to be white at least), but chances are high mounting it on the wall won’t be straightforward nor clean (had the case with an in-wall USB transformer recently), but the second point is that Feller allows to create any combination of single button, double button, socket, … combined the way you want and I have such dimmer combined with a socket for instance. Having any kind of button that is not Feller will just make everything either not combinable or totally ugly :confused:

How about a Feller 3 button unit?

Button 1 increase
Button 2 decrease
Button 3 On/Off

On/off leaves it at the level it last was…

Having a solution like that is “pragmatic” but I really prefer the dial to act as a dimmer rather than +/- robotic solution ^^

Why you use encoder for dimming? Just replace it with 4mm potentiometer.

Yes, that’s indeed a way to do it. Didn’t try to find a 4mm potentiometer. I liked the “rotate indefinitely” instead of having start/stop positions with a potentiometer but that could be a solution. However I’m unsure I can find a potentiometer having the push function as well. But possibly that’s a solution I could investigate.

Do you have experience with that?

Edit: the actual problem I face is not really the rotary encoder vs potentiometer, but getting a 4 mm shaft…

4mm pots are not hard to find, even 3mm are readily available. Push switch makes it rare. But if it’s connected to your esp, you don’t really need it, just program the last few degrees to be off.

I drilled a 2.5 mm hole through the entire length of the shaft, which I then shortened. I then used an M3 drill bit to insert and screw in a threaded rod, which I glued in place, and then added a 4 mm hollow brass tube, which I also glued in place.

That should hopefully do the job :slight_smile:

This works! End-to-end project: GitHub - xperseguers/esphome-feller-dimmer: Feller-compatible dimmer with ESPHome and Home Assistant · GitHub

You enjoy drilling… :wink: