Announcement

Collapse
No announcement yet.

Touch sensor ino - need to know

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Touch sensor ino - need to know

    I have spent a bit of time on a 8266 configuration for Homeseer. Of course, a piece of cake to build the sketch and download it to the 8266. This config has only 2 pins defined, both input pins. I wanted to use touch sensors instead of mechanical switches for control. My choice was the TTP223 modules.

    http://www.ebay.com/itm/10x-TTP223-2...kAAOSw4dxZcd8N

    So I hooked up 2 of the sensors and attached them to my 2 input pins defined in the sketch. To my surprise, the 8266 would not connect to homeseer anymore. I could disconnect the connections to the input pins and the 8266 would connect. And even more baffling was that I could connect the usb power connector which connected the 8266 and then plug in the 2 wires to the input pins and everything would work as it should. Homeseer displayed the correct status when the touch pads were touched. After much head scratching, I finally figured out the problem. The touch sensors provide a default low when not activated. Having either of the 2 input pins connected to this low would keep the 8266 from connecting during bootup. There is a jumper on the ttp223 which will change the default level to a high. This fixed the problem. I am guessing that any active device with a low active state will cause this problem.

    BTW, the touch pads are great. They are extremely small and require only 3 microamps to operate. They also work behind a plastic panel. My 2 are super glued to the back of a blank switch plate and they work perfectly. And, as another plus, these things are $.50 each, less than the cost of a mechanical switch and very definitely cooler.

  • #2
    Other source for the ttp223

    If you want to save some money and are willing to wait up to 30 days for delivery...

    10 pieces
    https://www.aliexpress.com/item/10Pc...AbTest=ae803_2

    50 pieces
    https://www.aliexpress.com/item/5PCS...AbTest=ae803_2

    Comment


    • #3
      Some ESP8266 need to be held in a certain state in order to boot and not go into a programming or flash mode. If you are using one of the little ESP-1 boards you may be limited to one input pin using those switches. If you are using a larger dev board move the switches onto other inputs.


      ~Bill

      Comment


      • #4
        @jimbell

        Never saw those before. Thanks for mentioning them.

        Tell me more about your application. You say they are behind a blank switch plate. That's cool. So I guess there is an arduino behind the plate also. How are you powering it? What type of devices are you controlling with this switch? Why two of them? Any additional info would be appreciated.

        Comment


        • #5
          More info on my touch modules.

          Originally posted by logbuilder View Post
          @jimbell

          Never saw those before. Thanks for mentioning them.

          Tell me more about your application. You say they are behind a blank switch plate. That's cool. So I guess there is an arduino behind the plate also. How are you powering it? What type of devices are you controlling with this switch? Why two of them? Any additional info would be appreciated.
          The container containing the components is a plastic single gang shallow box that I purchased at Home Depot. It contains 2 of the touch modules and a 8266 module. The power is a small usb power supply connected through a cable slot that I cut in the bottom of the box.

          I have 2 touch modules, 1 for "on" and 1 for "off". When I touch each one, it sets a virtual device in Homeseer to either "on" or "off". I use this virtual device in several events in the system including some that turn lights on and off.

          After some more thought, I now realize that I could just use 1 module to toggle the virtual device on or off. I would add a led on the front to tell me when it was on or off. This way, with just one switch, I could tell which state the virtual device was in.

          The front is just a cheap blank switch plate. The touch modules have no problem working through the plastic. I have 2 circles drawn on the front that match the locations of the 2 touch panels on the back.

          I am planning to redo this installation with just the 1 touch module and the led. I think that would make it a tiny bit more usable.

          Comment


          • #6
            More information touch modules

            Originally posted by logbuilder View Post
            @jimbell

            Never saw those before. Thanks for mentioning them.

            Tell me more about your application. You say they are behind a blank switch plate. That's cool. So I guess there is an arduino behind the plate also. How are you powering it? What type of devices are you controlling with this switch? Why two of them? Any additional info would be appreciated.
            A couple of points that I did not mention in the original post.

            Even though the device is a "touch" sensor, it should probably be named "near proximity" sensor. The device will turn on if a finger is placed within 1/4" of the surface. This makes them ideal for placing behind a non conductive panel.

            The sensor has 2 modes. The default is touch to turn on, remove touch to turn off. Just like a momentary contact switch. The other mode is a "latching" mode. Touch to turn on, touch again to turn off. Just like a toggle switch. The "latching" mode can be selected by bridging across pads "B" on the circuit board.

            Comment


            • #7
              I'm definitely going to remember these. Don't really have an application at this time but it sure shows potential.

              Comment


              • #8
                Combining these touch sensors and a Sonoff might be interesting inside a wall outlet. Sonoffs are really neat. They have 8266s inside them and a relay for switching mains. They get their 5v for the 8266 from the mains. Supposedly we can load our own sketches. However, you need to use a FTDI adapter since there is no on-board USB port. I've got a FTDI but never used it. Lots of youtube videos on hacking the Sonoff.

                Info on Sonoff:
                https://www.itead.cc/sonoff-wifi-wireless-switch.html

                Comment


                • #9
                  Originally posted by logbuilder View Post
                  Combining these touch sensors and a Sonoff might be interesting inside a wall outlet. Sonoffs are really neat. They have 8266s inside them and a relay for switching mains. They get their 5v for the 8266 from the mains. Supposedly we can load our own sketches. However, you need to use a FTDI adapter since there is no on-board USB port. I've got a FTDI but never used it. Lots of youtube videos on hacking the Sonoff.

                  Info on Sonoff:
                  https://www.itead.cc/sonoff-wifi-wireless-switch.html
                  I am pretty sure that the touch sensors would work very well in the Sonoff. I, too, am interested in hacking the Sonoff switches. I have 3 of them on the way. According to several videos on youtube, they can OTA'd after the original load of the sketch. My "goto" for this mod is https://www.youtube.com/watch?v=6fWFnxh0EiQ. Andreas is pretty much the best source for 8266 mods, in my opinion.
                  One last thing. The FTDI needs to be the 5v/3.3v type. Some of the older ones are 5v only.

                  Comment


                  • #10
                    Originally posted by jimbell View Post
                    The container containing the components is a plastic single gang shallow box that I purchased at Home Depot. It contains 2 of the touch modules and a 8266 module. The power is a small usb power supply connected through a cable slot that I cut in the bottom of the box.

                    I have 2 touch modules, 1 for "on" and 1 for "off". When I touch each one, it sets a virtual device in Homeseer to either "on" or "off". I use this virtual device in several events in the system including some that turn lights on and off.

                    After some more thought, I now realize that I could just use 1 module to toggle the virtual device on or off. I would add a led on the front to tell me when it was on or off. This way, with just one switch, I could tell which state the virtual device was in.

                    The front is just a cheap blank switch plate. The touch modules have no problem working through the plastic. I have 2 circles drawn on the front that match the locations of the 2 touch panels on the back.

                    I am planning to redo this installation with just the 1 touch module and the led. I think that would make it a tiny bit more usable.
                    I did re-do the touch switch project. The new version is just using 1 touchpad and it toggles a virtual device on and off. It could, of course, toggle an actual switch on and off.
                    There is a small LED mounted in the plate that provides me with an indication of the status. Led is on when the virtual device is on and vice versa. I am very happy with the project. It was very easy to implement with just one input and one output in the API skill.

                    Comment


                    • #11
                      Originally posted by jimbell View Post
                      I am pretty sure that the touch sensors would work very well in the Sonoff. I, too, am interested in hacking the Sonoff switches. I have 3 of them on the way. According to several videos on youtube, they can OTA'd after the original load of the sketch. My "goto" for this mod is https://www.youtube.com/watch?v=6fWFnxh0EiQ. Andreas is pretty much the best source for 8266 mods, in my opinion.
                      One last thing. The FTDI needs to be the 5v/3.3v type. Some of the older ones are 5v only.
                      Update. Apparently there are problems using the touch sensors with the Sonoff. See...

                      https://www.letscontrolit.com/forum/...pic.php?t=2867

                      Comment


                      • #12
                        @jimbell

                        I have two of the basic sonoffs. Just received them. Both still with the factory flash. First mod was to solder a header on the 5 pins for each of them. One will get a DHT11 so that it can control a free standing AC (10A). I did try to flash one of them and it didn't take. I assume it is my FTDI board, the wiring between (yea, I crossed TX/RX), or some process step I am missing. I guess I am spoiled from the 8266s. So easy to flash.

                        When you get your sonoffs, lets connect again and see if we can make it work. I'm assuming/hoping that you use the arduino IDE.

                        What direction are you heading with them? I was kind of interested in looking into Blynk (for another scaled down location without HS3).

                        Comment

                        Working...
                        X