US decora style wall switch



  • So I am trying to design a wall switch that will work similar to the older 4 (8) button X10 XPT switches that I have in some places in my house. For those that don't know what these switches are like, here is a pic.
    alt textalt text
    I have also seen other switches out there that have an LED next to to each button such as in the second pic. Much like the XPT switches, the buttons on these will just transmit back to the MySensors gateway or possibly directly to another relay or dimmer node.

    Design:
    So here are my thoughts on how the design of the switch would be. The faceplate would be made from a decora style blank such as one of these:alt text
    The design would be something like this:
    alt text
    I am thinking that this could be laser engraved onto the decora blank. The switches would be laid out like this on the top pcb so as to have a switch under each engraved tab:
    alt text
    I tested a couple switches on a protoboard and when the board sits on the back of the blank plate, the caps of the buttons gently rest on the back of the wall plate. The laser engraved areas on the front should flex just enough to hit the buttons underneath. The LEDs next to each row will just be a simple on/off status LED.

    Wiring:
    The wiring should fit for all of the components if my calculation is correct. Six data lines are needed for the switches (4 rows and 2 columns), and 4 lines for the status LEDs. After wiring the radio to the node there are data lines 3 through 8, and analog lines A0 through A3. The analog lines would be used for the LEDs as there are 4 of them. The 6 digital lines would be used for the push buttons. The wiring for the switch board would look something like this:
    alt text
    The LEDs would be 1.8mm LEDs like these:
    1.8mm LEDs

    Connecting the controller:
    What has been shown so far has just been the switch board. The idea is that the switch board would stack on to the controller board with one or two header connectors. The controller board would use a PCB the same size as the switch board. There is plenty of room on the second board to put the nano and the nRF radio along with the 3.3v regulator.

    Power
    My next hurdle in this is figuring out power. I am thinking of using another board stacked on to the assembly and using one of these AC/DC converter.

    Design advantages
    Here are some key advantages to this design.

    • The 3 board design makes it modular. You basically have your power supply board, your processor board, and your switch board. This makes switching parts that may fail easier.
    • With the front switch panel being a plug in module, other switch configurations can be created to change the functionality. This does not have to be only for switches, as you could build other sensors or indicators that could fit a standard decora style wall plate.
    • If status LEDs are not used that would open up 4 more lines for more switches or other sensors.

    Conclusion
    So far these are all just ideas. I am open to comments and criticisms on any thoughts or ideas that I have noted. Any ideas on where I can get some of the parts done at like the laser cutting and possibly a good PCB manufacturer, that would all help too. I haven't looked yet, but I am assuming that there is a matrix switch assembly sketch out there somewhere that I could use as an example.

    I will post more as this project moves on.


  • Mod

    This looks great.

    I like the tactile feedback from switches but you could get an even cleaner look with the capacitive sensors presented in https://forum.mysensors.org/topic/4243/custom-node-for-usa-wall-switch-module



  • @mfalkvidd I saw that project. That one is using 2 buttons, most likely on and off. My proposed design has 8 switches. I don't know how well that would work with capacitive touch sensors that close together. Not to mention he uses just the flat surface which even if you could get the capacitive sensors to work you would have a hard time distinguishing what button you were pressing. At least with the laser cut groves, it would give a little bit of tactile feel so you could tell a little bit what button you were pressing. Maybe not as much as the raised buttons on the XPT and other switches, but at least there would be some feel to it.

    Don't get me wrong, a 2 button capacitive touch sensor board could easily be fitted to this setup though as a different kind of switch shield. As I mentioned, this could be a modular type of design allowing for many types of switches and sensors to be fitted.



  • There are various captive touch sensors available on the market, so more and some less sensitive. Sensitivity is related to the capacitor value the touch contact is attached to.

    The commercial available touch sensors can all be configured to either work as toggle or as on/off switch. The more expensive ones also have time delay feature.

    You can get little touch sensor boards like this 4 way Touch Sensor. These sensors are very small, less than half the size as shown on the pictue. With these you must create toutch plates on the outside of the decora wall plate and solder these to the touch pads on the sensor. I've done this as one of my experimental designs and it works well. I ended up going for a completely slick look Dual Touch Sensor + Custom Node.


  • Hardware Contributor

    That looks fantastic! I looked at the capacitive solutions and while they're neat, I don't like them from a user interface perspective. I want tactile feedback in a switch - a rocker would be even better but this is a close second. It would be nice if you could take those of us who use RFM69's into account if that isn't too difficult.

    You might want to look at the SwitchMote for packaging and board ideas. Another thought: Just my opinion but I think it would look nicer if it was symmetrical. Could the LED's be moved into the center between the switches?


  • Hardware Contributor

    If getting the laser cut blank doesn't work out, another option you could consider is using pre-cut keystone plates. It's probably possible to modify a blank keystone jack by cutting the mounting tabs off and have it sit flush or a little proud of the plate and use that to press a switch on the pcb behind it.


    alt text



  • I like this one too. I am playing with a Low Power Labs Switchmote at the moment. This switch plate is a lot more elegant. Are the arrows for dimming?



  • @TD22057 I like the thought of having the LEDs in the center giving it a more symetrical look. I happened to be at the hardware store today and saw a switch made by leviton that had a series of LEDs on the side much like my design that were used to indicate brightness level. Like I mentioned, the possibilities for the switch/sensor board are limited by your imagination.

    You mention using the RFM69's for your radios, that would simply be a matter of designing a different processor board that you could switch on to the setup. I can look into designing the board to take either type of radio, but I will have to see if there is space enough and enough data lines. My setup uses all nRF24L01 modules, so I am not familiar with the wiring of the RFM69s.

    The keystone style faceplates like you showed are something that I use at work a lot, and originally thought of using those until I came up with the laser engraved faceplate idea.



  • @nagelc The arrows would be for dimming, bu they could easily be changed to on/off buttons like the others. The idea behind the design is to be modular and flexible. How it operates is all in the sketch that you write to handle the devices on the faceplate, be it switches, lights or sensors.



  • The switch design I have shown in the original post is based off of the 3 button on/off + dimming XPT switch from X10:
    XPT 3 buttom plus dimming
    I have a few of these in my house already. The dimming buttons operate dimming functions for the last on/off button pressed. So if you turn button 2 on and then use the dimming buttons, it will dim whatever device that corresponds to switch 2. You then turn on button 1. Dimming will then operate the device on button 1.



  • So I did some checking on getting the blank wall plates laser cut, but not having much luck. One local company said they couldn't do it, the other says that the plastic is polycarbonate and their equipment will not cut poly. One other thing I found when researching this is:
    "Polycarbonate sheet can be cut with industrial cutting lasers however, edges may become amber or brown when laser cut and a clean edge is difficult to obtain. In fact, some laser cutters are not able to cut it because it ruins the lens and requires frequent stopping and cleaning. Please contact your equipment’s manufacture to see if your laser is able to cut polycarbonate and for recommendations on the process."

    So I am now looking into having these possibly CNC cut. I'll post my findings on that.



  • @dbemowsk try searching for watercutting, you get very nice edges without burnt colouring, and cost wise its generally cheaper.



  • So I decided to work more on this old project I started a while back, and I finally have a prototype of the switch/LED board finished. It is far from pretty, but it is functional as far as I can tell with the tests I have done with my volt meter.

    This is a picture of the switch board assembly opened up:
    0_1484289186008_upload-c0cfa2b3-008a-4db7-b8a6-2150c3bebc2a

    And here is 3 views of the switch board fully assembled:
    0_1484289345130_upload-ea4958cf-8200-4ac2-a6db-2c20c807dc06

    The idea I am working on is to layer the boards using the header connectors, making it modular. The next board would be the computer/MySensors board. It would be the same size as the switch board and stack with a set of female headers. This switch board would pretty much max out the pins on a pro mini. The switches would take 6 pins ( D3 - D8), and the LEDs would take 4 (A0 - A3). There would then be a third board stacked yet on top if these two which would be the power supply board. The power supply board would contain the HLK 5 volt power converter and a 3.3 volt regulator.

    My issue now is to see if I can get everything to fit in the small amount of space with header connectors to stack the boards. I may have to get creative with the arduino/radio board and mount one on each side of the board. Wiring it will also be a challenge. Then I will have to see if it will fit in a standard wall box or if I will need a deep box

    In the end, if I can get everything figured out, I could make a number of these and attach different switch boards for different configurations. I may even design a PCB for this, but if I do, that would be in the distant future.



  • So here is my latest update. I now have the controller board made that the switch board will stack on to. It currently uses all analog and digital pins of the pro mini except pins A4, A5, A6 and A7 which are not in the standard header rows. This is the board as it is right now.
    0_1484724472906_upload-0f59998c-25dc-47e2-b3ca-7213ae13c44d

    And this is the controller board stacked with the switch board.
    0_1484724556313_upload-284b133f-0a5a-4c24-bdc9-f4c133784b1f

    I wrote a simple sketch to test the keypad which is just a 2x4 matrix. One thing that I realized that I forgot which I will fix in the next couple days is the current limiting resistors for the 4 LEDs.

    For testing until I figure out the design of the power supply board, I am just powering this using the supply from my UNO as it has both the 3.3 and 5 volt outputs.

    My plan for now is to use each row as an OFF and an ON button with a corresponding status LED, but the possibilities for this are much greater. This could be used as a controller for 8 individual scenes, bright/dim controls, or whatever you can think of. This could be used to talk directly to other nodes for lighting control or any number of things. You could build other switch boards for this that would maybe contain more switches (eliminating the LEDs of course), or any number of combinations of switches and sensors.

    The final setup is going to be quite bulky and will need a deep US wall box to fit everything, and even that might be tight. For now this is a proof of concept design to test the feasibility of this as a controller. Eventually if things work out, I may seek help from the forum to create a dedicated PCB for this which could be stacked into a smaller package.

    I welcome any thoughts, comments and feedback on this design.



  • @dbemowsk

    I'm currently working on the following PCB design for US Decora Wall Plate.

    It's designed to have some components/ connections on the back, but most of the components on the front of the PCB.
    It has provisions for connecting:
    4 x Switch (A0, A1, A2, A3)
    4 x LED (A4, A5, A6, A7)
    4 x Relay/SSR (D5, D6, D7, D8 connected to NPN transistor)
    2 x sensor (pin D3 and D4)

    Designed for using an Arduino Pro Mini 5V with A4 to A7

    I can share the gerbers once completed

    alt text

    PSU: https://www.aliexpress.com/item/220V-to-5V-2W-ac-dc-power-supply-width-voltage-input-85-264V-Smart-Home-AC/2036637836.html?spm=2114.13010608.0.0.TDfk9B

    I'm also working on a Dual Decora style wall plate switch containing 4 x 8Amp SSR
    alt text


  • Hardware Contributor

    Very interesting designs @enterprised and @dbemowsk. I've also been working on my own version of decora switch and relay system. It's designed to use empty keystone switch plates with 1, 2, or 3 switches and uses keystone jack fillers as the switch covers so they look almost commercial. It's a 3 PCB system. The front PCB has the switches, LED's, reset button, CPU, and an RFM69 or NRF radio. The middle PCB has a MeanWell IRM-02 or HLK AC->DC converter (with fuse, thermal fuse, and varistor), a replaceable fused 10A AC relay with opto-coupler isolation, 5V and 3.3V rails and a 2 wire temperature probe to measure the temp of the PSU module. The back PCB is just a cover to insure no sharp solder points are in an electrical box. I decided that since this will be in my walls, I would only use name brand parts (from digikey and mouser) on the high voltage side which increases costs but should reduce the risk of fire (or at least make me feel better).

    I've designed the PCB and checked them over but we're in the middle of buying a house and moving so I haven't ordered any yet. Here's the 3D rendering of the PSU and CPU boards together and a one of the PSU board.

    0_1484794975291_combined.png
    0_1484794989118_psu.png



  • @enterprised For my design, I am hoping to use an HLK-PM01 power supply. Comparing to the one you have listed it has a few advantages:

    • Enclosed components vs exposed components on yours
    • Continuous output current of 600mA vs 200mA on yours
    • 50mV or less of ripple on the output vs 100mA on yours

    Having the components sealed will protect more against short circuits on the high voltage side. As for the current, I probably wouldn't need 600mA, but using a supply that is rated a bit higher I figure will be less stress on the components and cut down on heat. Plus I have to do 3.3 volt regulation for the radio, so I figure I am covered for that too. And last, the better the ripple on the output, the less filtering that will be needed for a more stable radio.

    The other thing that I like about my design is that it is modular. You would be able to have a number of different switches, sensors or LEDs as the faceplate while having one arduino/radio board and one power supply board. As mentioned in one of my previous posts, the current design is a bit bulky, but with a better PCB design, I think I can compress the layers quite a bit more. Looking at your pics, yours looks like a nice design too.



  • @TD22057 Excellent design. I like the fact that you used the Recom PSU. I have used the Recom ones and they are very well built, but they are slightly larger than the HLK-PM01s. The price is a bit higher too, but I figured for what mine would be doing, the HLK-PM01 will be sufficient. I plan to also use a thermal fuse with an MOV and fuse for good protection. Mine at this point is a bit bulky to fit relays in right now, but it would work well for a nice scene controller node or a direct control for another node.



  • @dbemowsk

    Oops, attached the wrong link.

    I'm using the 400ma version of this PSU. The design uses 200ma max with 4 switches/LED's/SSR's, so plenty of overhead. I actually stepped away from the HLK-PM01 due to the very poor reliability of these modules, too many that failed within a few months.

    I use an LE33 in TO92 package to create and regulate the 3.3v for the radio

    The ripple is a non issue as I have 7 module of the previous design installed and working around the house.

    I'm enclosing the entire module with a hot vacuum formed custom enclosure, so the entire circuit is fully protected. Amazing what you can do with a sheet of plastic, some wood, vacuum cleaner and a oven.

    My design is also using multiple PCB's. There is a second PCB sitting on top containing 2 SSR's and related components

    This was my previous design using relays not SSR but all other components are the same.
    alt text
    alt text



  • So for my latest update on this, I have finished the power supply board. One thing I learned in making this that I didn't even think of at first was that when I soldered on the thermal relay, the heat from the soldering was enough to blow the relay. Thus, my initial test did not work. I was finally able to get a fuse installed and working. I would have preferred it to be more centered on the side of the Hi-Link module, but I am thinking that it should still be effective.
    0_1485103640004_upload-1ea7b909-45be-45d6-8a6d-73c512594442

    On the bottom side of the board you can see the LM1117 3.3v regulator. For the high voltage side, I have hot glue over all traces for safety in testing.
    0_1485103278566_upload-fb75fd43-a5c5-4650-a9e1-91cbf7168f51

    I used a 22uf cap on the 5 volt output and a 10uf cap on the 3.3 volt output. I have also added hot glue to the incoming hot and neutral leads to provide some strain relief on the wire as it attaches to the board.
    0_1485103583785_upload-304f96de-a193-4f3b-944b-edc2ba5fbda3
    0_1485103854338_upload-3791a57f-89c6-44a8-bc1c-6c372c718b8b

    The last thing I want to do is fabricate a plastic cover to put over everything that will fit into the wall box. I think I am going to need a deep wall box to house the connections and the module.

    I did connect this and have it paired with my Vera. Each row is OFF, ON and status LED to indicate the ON state. I have debated on having the LED on when the switch is off to give better visibility to the switch when it is dark. In Vera, I can tie the switches to devices using scenes.

    Overall, this proof of concept design is working well.


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.