more G-Labs products

Author Topic: Custom MySensors node's with captive touch switch control  (Read 2915 times)

July 04, 2016, 06:35:11 AM
Read 2915 times

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
My latest project.

After years using X10 and Z-Wave I hit the limit with these devices where they simply do not conform to my evolving home control requirements.

Having played with Arduino's and MySensors quite a bit I decided to create my own devices based on MySensors and MQTT.

I designed a custom (2 part) PCB for a custom node holding a Arduino Nano, the 2.4Hz RF module, a universal PSU and all required connections for up to 6 switches, 4 relays, DHT and Motion sensor.

I had the PCB printed by PCBWay (www.pcbway.com) in China. Their price for small batch prototype boards was great. Their service and speed of delivery was excellent. The quality of the PCB's I received is very high.

After cutting the PCB's in two, as I had two designs on each board, I ended with a PCB perfectly sized for a standard USA wall switch.

I'm using wall switch blank plates, with two captive touch sensors installed and a small hole drilled for the reset switch. The populated and completed PCB is than glued on the the back side of the blank plate. I used some good old fashioned wire wrapping technique to connect the touch switch wires to the PCB.

The now ready switch unit fits perfectly, with one relay module, in a single wall switch box, pr with up to 4 relay modules in a dual wall switch box.

I have 3 of these modules installed now, and in progress of completing another 5.

The touch switches work really well. They will activate if you come within 5mm from the wall switch unit. The two switches in each unit do not interfere with each other, so no accidental switch activation. 

I will share more as this project is moving along.



« Last Edit: July 05, 2016, 03:01:38 AM by enterprised »
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

July 04, 2016, 11:55:50 AM
Reply #1

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
How do the capacative sensors work (not literally) have you got them behind the plate?

I want to do something very similar (but i'm using esp8266's  but struggling to find suitable switches)

 
I have this size to get behind in the uk..
http://www.ukew.co.uk/image/cache/data/A001/Screen%20Shot%202015-06-25%20at%2013.51.58-700x700.png


I'd like something that looked like the lightwave modules:

http://images.maplinmedia.co.uk/lightwaverf-lw450wh-single-gang-dimmer-250w-light-switch-white-slave-switch.jpg?w=283&h=283&r=4&o=ja3H87Uxz8tH19R5rfE2xeHt1BUj&V=1YwZ

What psu are you using?

Following with interest :)
« Last Edit: July 04, 2016, 12:21:48 PM by [email protected] »

July 04, 2016, 12:05:27 PM
Reply #2

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
ignore the psu question.. looked at the pic!

July 04, 2016, 12:20:29 PM
Reply #3

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
also just ordered some sensors of ebay to have a play with after reading that they will read through plastic :)

Learn something new every day!!

lets see if they will read through:

http://sparkydirect.s3.amazonaws.com/K/K3827WHI.jpg
« Last Edit: July 04, 2016, 12:23:19 PM by [email protected] »

July 04, 2016, 04:19:12 PM
Reply #4

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
I use these sensors from AliExpres ( http://www.aliexpress.com/item/10-pcs-Free-Shipping-TTP223-Module-Capacitive-Touch-Switch-Button-Self-Lock-Module-2-5-5/32404743107.html ) they are relative cheap and work very well. They work through the plastic and you don't even have to touch the plastic to activate them.

These sensors need to be modified/configured for momentary switch option by opening bridge T and closing bridge A. Just a simple bit of soldering action.

I've soldered the 2 ground pins (center pins) together and cut the outside pins to half the size, this gives the perfect spacing between the sensors. I used epoxy to glue them to the wall plate.
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

July 04, 2016, 07:43:26 PM
Reply #5

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
A couple of better pictures showing the node and the touch switches.

4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

July 05, 2016, 12:42:50 AM
Reply #6

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
That's great to know as the ones I ordered from ebay are the same model just a different colour pcb.

My main problem is in the UK you sometimes don't put a neutral into the switch box....  More annoyingly none of my lights do and I wired the house when I renovated it.  Might resort to putting esp8266 to sleep and using batteries until I alter each room if this Works!

Will let you know how I get on :)

July 05, 2016, 07:00:37 AM
Reply #7

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
That looks great! Is your PCB design available for download?

Which MySensor solution did you end up using for HomeGenie?

I'm (hopefully) moving into my new house in a few months and would love to implement something like this there.

July 05, 2016, 05:26:09 PM
Reply #8

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
mvdarend; I'm using a slightly modified version of your MQTT script in HomeGenie, still a work in progress.

I can make the PCB design available, but it is sized to fit a USA in-wall power box. Remembering from my past, the Dutch and other European in-wall power boxes have very different dimensions, don't think it will fit.
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

July 06, 2016, 06:50:46 AM
Reply #9

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
OK thanks, I didn't realise the boxes were bigger in the US.

Those sensors are cheap, it keeps amazing me how cheap this stuff is getting. Ordered a lot of 10 to play with.

July 10, 2016, 06:05:42 PM
Reply #10

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
As time moves on.

I've now created the sensor plate which can be used with the MySensors Node I developed.

I started with a dual keystone insert plate, the type used for network or cable tv connections. Using some router bits in my bench drill I machined the keystone slots to fit a DHT22 and a motion sensor module.

Bu pure coincidence the DHT22 has the exact same dimensions as the keystone slot at the back of the plate, all it required was machining away some of the height of the slot so the DHT22 sits flush.

More to come.
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

July 11, 2016, 01:30:49 AM
Reply #11

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
Assembling and wiring the master switch unit. next step is to add the 4 relay units, connect all wires to the node and add the safety cover/joiner to prevent accidental interaction with the 110VAC.

The unit shown will have:

4 x touch switch activated relay
2 x touch toggle switch (what ever I want them to do in HomeGenie)
motion sensor
temperature & humidity


More to come.
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

July 12, 2016, 04:40:42 PM
Reply #12

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
Looks good, china post need to hurry up with my switches now I have some new found enthusiasm!

September 06, 2016, 03:40:14 AM
Reply #13

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
Finally, after some months of extreme travel and work related activity I had some time again to continue with my project.

Below are some pictures of the switch and sensor modules with standardised connection header so I can switch them out and organise them any way I like in my wall switch module/frame.

4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

September 07, 2016, 03:13:31 PM
Reply #14

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
Looks good, I got some capacitive switches too and I'm impressed with them, I need to now fix my home PC as it appears the disk has died so I can carry on with finalising the code :)