#143

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 เม.ย. 2019
  • How to implement a reliable touch switch on the Arduino or ESP8266 (or any µController)
    LCSC Electronics - Shop Online: lcsc.com
    More information (including all links, sketches & PDFs in my GitHub):
    github.com/RalphBacon/Touch-S...
    I've implemented a capacitive touch sensor three times in my Arduino-based projects, and they work flawlessly. And, considering you only need one wire and have no switch bounce, they are infinitely preferable to standard, mechanical, push-button switches, IMHO.
    So it seemed a no-brainer to do the same for my Home Alone project. If only life were that easy! Watch the video to find out why I couldn't do this on my Wemos D1 Mini project, and see a demo of the Arduino-based touch switch that I've used before.
    LINKS LINKS LINKS LINKS LINKS LINKS
    10 x Touch Switch modules:
    www.banggood.com/10Pcs-2_5-5_...
    Datasheet for TTP223 (copy also on my GitHub):
    datasheet.lcsc.com/szlcsc/TTP...
    LCSC SMD chip selection for your own PCB:
    lcsc.com/search?q=ttp223
    Arduino Playground information on the Capacitive Sensor library (also on my GitHub):
    playground.arduino.cc/Main/Ca...
    Newer version 5.x of Capacitive Sensor library by Paul Stoffregen for support for different µControllers:
    playground.arduino.cc/Main/Ca...
    Wemos D1 Mini OLED screen as shown in my demo, under $6 from all warehouses (UK, CN, USA) + free shipping:
    www.banggood.com/Wemos-OLED-S...
    If you like this video please give it a thumbs up, share it and if you're not already subscribed please consider doing so and joining me on my Arduinite journey
    My channel and blog are here:
    ------------------------------------------------------------------
    / ralphbacon
    ralphbacon.blog
    ------------------------------------------------------------------
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 113

  • @pileofstuff
    @pileofstuff 5 ปีที่แล้ว +3

    I wasn't previously aware of the touch library. Thanks for that.
    I used a bunch of the TTP modules for a control panel a while back. I found that they were a bit too sensitive out of the box, often false triggering.
    One of the pairs of pads on the back of the module (nearest the pin 3/4 end of the chip) is intended to solder a capacitor across to de-sensitize the sensor and make them much more predictable.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +2

      Glad you found the capacitance library interesting. And would you Adam & Eve it? I just replied to Drex, above, about using a small (33pF - 100pF) capacitor on those pads as he wants it for a game. I didn't want to decrease the sensitivity in my project so that part of the video got left behind on the cutting room floor. I'll have to mention it (and the use of the A/B pads) in a future video.

    • @pileofstuff
      @pileofstuff 5 ปีที่แล้ว +1

      People would be shocked how much footage hits the edit room floor when these videos are made.
      Though, in my case much of it is aimless rambling on.

  • @LauwersFreddy
    @LauwersFreddy 5 ปีที่แล้ว +2

    Hi Ralph great video... again! Love how you have found relevant sponsors to support your channel. I have not used this myself, but I remember the esp32 has 10 inputs that can be used for capacitive touch. For example to make a slider. The esp32 can also deep sleep until touched or trigger interrupts. Thanks again for making these videos!

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      Oh yes, the ESP32 is a different beast altogether, Freddy, and has those capacitive, trigger pins. But, you may have noticed I didn't mention the ESP32 for this very reason, and for the Arduino family, the capacitive touch library (if you have TWO spare pins) works amazingly well. But the ESP8266 is a different (awkward) beast with all that RFI flying about, hence the TTP223 which saved my bacon. Oh.. well, you know what I mean. Thanks for posting, great to hear from you.

  • @philowen2755
    @philowen2755 5 ปีที่แล้ว +1

    Always interesting videos from you Ralph. Many thanks.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Thanks for that, Phil Owen, nice to hear from you.

  • @sortofsmarter
    @sortofsmarter 5 ปีที่แล้ว

    I really love your explanations and it gets me excited to try experiments I would never try. you are so calm and real world with your examples and so easy to understand. And I dont mind the sponsor spots either. very well though out and I believe you when you talk about them...I look forward to more..thanks

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      I've rejected several sponsorships because I did not, and could not, believe in them. The ones that appear on my channel I would use anyway so I can talk honestly about them, hopefully from personal experience. so it's good you don't mind them; I was a bit worried about interrupting my video for what is, in reality, a plug for them! But they help me buy stuff for the channel so it's all good. Thanks for posting.

  • @DocMicha
    @DocMicha 5 ปีที่แล้ว +2

    Nice video, I like the calm explanation!

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      Calmness is brought about by Benny, my video-star rescue cat, who is the softest, most loving cat in the entire world. He positively exudes calmness and that has obviously rubbed off onto me when doing the videos! Thanks for posting, DocM, nice to hear from you.

  • @OsoPolarClone
    @OsoPolarClone 5 ปีที่แล้ว

    Another awesome video. It reminded me that capacitive touch as a switch is available and I need to re-evaluate a couple of my projects to see if it would be easier/better to use this rather than a switch.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      Even on the Arduino the TTP223 can make sense, Bruce, as only 1 pin is required. You can put those analog ports A0 - A5 to good use, as digital GPIO touch pins!

  • @andrewtoogood1429
    @andrewtoogood1429 5 ปีที่แล้ว

    Great work, had seen these before but couldn't think how they would be useful as they would be terrible on the outside of an enclosure. Now thay I realise that they can read it through the plastic I have all sorts of ideas for my weather proof IP6 type projects. Thanks again.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Excellent, Andrew! Just read the comments I put to others about the judicious use of a tiny capacitor to reduce sensitivity, if required (making it a 'touch' switch, not a 'hover' switch)!

  • @avejst
    @avejst 5 ปีที่แล้ว +1

    Fantastic
    Thanks for the walkthrou, didn't know of the touch-lib.
    Thanks for sharing :-)

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      You are most welcome Asger Vestbjerg, I'm glad you like the video. Nice to hear from you again.

  • @jamhough22
    @jamhough22 5 ปีที่แล้ว

    This could be a perfect addition to my current project, a heating thermostat with oled display and wifi capability using a D32
    Now soon to be with touch buttons with no ugly buttons to figure out where to fit and make good, very smart indeed!
    Thanks for the video, perfectly explained.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Another pragmatic use of these switches, James! Just read the comments I put to others about the judicious use of a tiny capacitor to reduce sensitivity, if required (making it a 'touch' switch, not a 'hover' switch)!

    • @jamhough22
      @jamhough22 5 ปีที่แล้ว

      Ralph S Bacon i shall do some experimenting with them to find the most suitable for my project. Thanks again!

  • @timmydeee
    @timmydeee 5 ปีที่แล้ว +1

    Nice work Ralph, I've not played with the Arduino cap pins, but looks decent and easy to work with. With 223, I found that you can hook up an extended touch 'antenna' to the pad attached to the thru hole on the board. Could be mesh, foil, or even some results with antistatic bag material! Like you say, it just self-calibrates, and is quite reliable :)

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      Yes, it's been 100% reliable for me, Tim, over the last week, running 24x7. What I like is the clean on/off it gives, none of this switch bounce nonsense! And I even tried the Antistatic Bag trick too!

  • @mrmilan2012
    @mrmilan2012 3 ปีที่แล้ว

    Thanks a lot sir.. Love u...i always use ttp223..and there r lot of problems with high sensitivity of ttp223. Use of capacitive header file now I m satisfied..
    Thanks sir.
    Thanks sir.
    Love u 👌👌💐💐

  • @Steve_Coates
    @Steve_Coates 5 ปีที่แล้ว +2

    I've found the TTP223 incredibly useful, no debouncing, configurable for high or low output and momentary/latching options all for less than the cost of a decent mechanical switch. If you need more than a 1 or 2 switches for a project take a look at the MPR121, I2C based and supports up to 12 switches, the breakout boards support 4 addresses so you can have 48 switches at a cost of 2 gpios.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      I'll most certainly have a look at the MPR121, that sounds very interesting. Thanks for the heads up, Steve, nice to hear from you.
      Edit: OMG have you seen the breakout board on Banggood for this item, I will have to go get one immediately! bit.ly/2VzySwu

    • @Steve_Coates
      @Steve_Coates 5 ปีที่แล้ว +1

      @@RalphBacon Bit of a ripoff, I bought a couple for 85p each, a quick look on AliExpress and I found some at 90p delivered. bit.ly/mpr121module
      ps 12 bananas and an oscillator kept my friends kids amused for hours!

  • @jungleb
    @jungleb ปีที่แล้ว

    Another awesome video

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      Glad you enjoyed it!

  • @CrazyCoupleDIY
    @CrazyCoupleDIY 5 ปีที่แล้ว

    Good one again, thanks :)

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      You are most welcome Crazy Couple, I'm glad you like the video. Nice to hear from you.

  • @pintokitkat
    @pintokitkat 5 ปีที่แล้ว

    I stick a wire onto a spare arduino analogue pin and monitor the reading when I touch it. Then code that reading into the arduino as the switch point. It's been a reliable solution for years and doesn't require any libraries or components expect for a bit of wire. The coding is simply if the analogue read is greater than x do something, else don't. No calibration required.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      As they say across the pond, Andy, YMMV. I tried this with my ESP8266 and it just wasn't reliable enough. Close but no cigar! On the Arduino, though, I prefer the capacitive touch switch (and library) - like you, it's worked very well. The only downside I see in your approach (the bit of wire) is that it can be susceptible to RFI and other components near by - but if it works for you then that's great!

  • @danljohnston
    @danljohnston 5 ปีที่แล้ว

    Thanks Benny!

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Benny says "You're Welcome, Danny". He also said "Thanks for posting". Sounds like you got a new friend.

  • @DrexProjects
    @DrexProjects 5 ปีที่แล้ว

    I have 30 0r 40 of those TTP223s. I am going to change my mechanical switches in my Breadboard Buddy / arduino Simon Game to them. Guess I'll make a video on that also. Thanks for the Vid Ralph.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      Drex, if you want to use this to replace actual pushbutton switches then consider soldering a very small value capacitor to the larger solder pads under the switch (NOT the ones marked A or B). Example:
      I found that 100pF made it act like a proper switch - you actually have to touch, ever so gently, the sensor pad itself for it to register.
      A 33pF desensitised it a bit but you could still hover a small distance away from the pad and it would register unless that acrylic coaster I used in the demo was in-between. This was good because the sensor could still be hidden behind the coaster (or other plastic container) but still act as a TOUCH switch (as opposed to hover switch!
      A bit of experimentation is probably required!

    • @DrexProjects
      @DrexProjects 5 ปีที่แล้ว

      @@RalphBacon I made the video of it with regular switches. Will exchange them 1 day. Did you make a video on the camera switcher? I can't find it. I think you used ttp's in that also. Thanks.

  • @danljohnston
    @danljohnston 5 ปีที่แล้ว

    Hi Ralph, a little off subject, but I noticed Benny has a DHT 22 near his door. I'm looking at using one outdoors, and wondered about your experience with it. Does it actually get wet? How long has it been in service there? Thanks for any reply, and as usual, thanks for the videos.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      This device replaced a DHT11 about 2 years ago, Danny, that I belatedly discovered did not measure below zero! How bizarre is that? Anyway, this DHT22 does *not* get wet, it's under cover. I use this as I want both humidity and temperature.
      If you are just after temperature then a waterproof version of the DS18B20 would be more suitable (they look like silver torpedos, work very nicely, can even drop them into an aquarium).
      If you are set on the DHT22 then you will have to protect it from the elements.

  • @Ed19601
    @Ed19601 5 ปีที่แล้ว

    Great video. I know I asked before but at my age I can't always remember if I got a reply, but is there some more info on what your home alone project entails?

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      Well, I gave you some teasers in this video, Ed, but as soon as the "other" PCBs arrive I intend to do a video on the whole thing, so stay tuned!

  • @MrEdwardhartmann
    @MrEdwardhartmann 5 ปีที่แล้ว

    Great video - I am going to get some of those TTP223s to play with. Have you ever done a video on how you make your videos? I love the green screen "head only" overlay but have not found anyone explaining how it's done. To be fair, I have not looked very hard.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Glad you liked it, Edward, they're really good to play about with. And cheap!
      Regarding my "talking head", it took me an awful lot of work to discover how to do Green Screen, get the correct type of screen and so forth, so I'm afraid that's going to remain my trade secret (for now, stop laughing at the back), although if you _do_ look a little further you will discover how to do it! Right here on TH-cam! But you won't be able to wear that green hat and top!!! 😂

    • @MrEdwardhartmann
      @MrEdwardhartmann 5 ปีที่แล้ว

      No problem - no desire to steal trade secrets. Are you willing to share what audio and video equipment you use or is that part of the trade secret package?

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Funnily enough, Edward, I'm keeping that close to my chest too. I'll tell you why. I've seen TH-camrs with *many times* the subscribers that I have, who create videos at which I sometimes cringe (at the quality, not the content). Once again, I studied long and hard how to create "nicer" videos (and I'm still learning). You will see I got better equipment at around video #20 and things improved from then on. So whilst I don't have the following of the big guys at least my videos look OK! And I'm not telling no-one how I do it! But anyone willing to put in the hours would find out what I discovered and could practice and then theirs would look as nice (or probably better) than mine. Sorry to be so cagey but it was a lot of work getting this far and I just feel a bit protective!

    • @MrEdwardhartmann
      @MrEdwardhartmann 5 ปีที่แล้ว

      @@RalphBacon No problem - just keep making these great videos and I will keep watching. I have a very small youtube channel (13 subscribers - mostly family) where a friend and I are rebuilding old pinball machines and replacing all the relay logic with microprocessors and the lamps with LEDs. My friend talked me into recording the work sessions and posting them just in case anyone else was interested. But my video capability is almost non-existent. I just use a cell phone for recording and some AVS software for video editing. I was thinking about upgrading my capability but just have not decided which direction to go.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Don't knock the simple approach, Edward. As I mentioned there is a very well known ex-Arduino TH-camr who has mega subscribers and that is what he does! Worked for him, could work for you.

  • @isytexen7924
    @isytexen7924 2 ปีที่แล้ว

    Hi Ralph, in your Video at 16:14 your TTP223 output is High for more then 20 seconds, but if I touched my TTP223 he auto calibrate after 6 seconds.
    Do you know a way to disable the auto calibration?
    Nice Video, thank you.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      I think the whole point of this device that it will auto-calibrate!
      The spec sheet (www.sishine.com/uploadfile/cfile/2012512132524876.pdf ) says you should not touch the pad for 0.5 seconds after power up and "When key detected touch and released touch, the auto re-calibration will be redoing after about 16sec from releasing key".
      Worth reading that spec sheet in some detail, I reckon. 😉

  • @andymouse
    @andymouse 4 ปีที่แล้ว

    Hi Ralph, just came here for a "Benny" fix !...not really, came to say i've implemented some TTP223 chips and they are working great, capacitive touch sensitivity can be adjusted with 0pF for max sense and uptp 50pF for min sense, i find 47pF just right if you want actual contact (I did) great little chips...cheers.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Glad it worked out, Andy. You can also change whether they are "on" or "off" on a press. The one I use in my mum's Home Alone project is behind a big steel badge (a nice dog collar name tag) but still works great as the TTP223 device self calibrates on switch on. Cool stuff.

  • @shaseeb692
    @shaseeb692 4 ปีที่แล้ว

    Hi ralph,
    Hope you're good.
    Can you make tutorial for ttp229 operate 8 or 16 relays

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      There are some videos already out there that do this, Syed, it's not something that I'd feel very excited about doing, to be honest!

  • @iRicardoTM
    @iRicardoTM 10 หลายเดือนก่อน

    Hey Ralph, good day. I'm working on a basic project (my very first one) and it includes the TTP223 you are using here, a ESP8266 based Led controller (called SP511E), and an address able LED strip, but I have a problem. Maybe you could point me in the right direction. I'll try to be brief.
    I'm using a 12V power supply since the LED strip is 12v, the SP511E is connected to the power supply and the LED strip to the SP511E, no problem there.
    I added the TTP223 to bypass the tactile button that the SP511E has to power on/off the led strip.
    I did it by using the SP511E's 3.3v pin to power the TTP223, ground to ground and the signal to the pin of the button and it works, but...
    The actual problem is that sometimes it goes crazy and starts false detecting, it goes on/off erratically and I don't really understand why. I also tried powering the button from an external 5v source but the problem persists, I believe whatever is happening is at the signal end.
    My circuit doesn't have the resistor you used here, I may try that, do you have any other recommendations?
    Thank you in advance and I hope you're having a great day. Greetings from México.

    • @RalphBacon
      @RalphBacon  10 หลายเดือนก่อน

      I can't remember what resistor I used when you say your circuit "doesn't have the resistor you used here". Perhaps you are missing a pulldown (or pullup) resistor so that the input pin doesn't "float" in the absence of a signal from the TTP223?
      If the TTP223 is not putting out a definitive HIGH or LOW then the GPIO on your microcontroller will "float", randomly getting HIGHs or LOWs. I can't remember if the TTP223 does both values, or just the one when you touch it; try it and see.

    • @iRicardoTM
      @iRicardoTM 10 หลายเดือนก่อน +1

      @@RalphBacon Hey Ralph, thank you for answering.
      I believe you were using a 10k resistor, I mean the resistor you were using in your breadboard test between the signal and the transistor, which I guess I should add between the signal and the SP511E. I don't have any so this week I'll go shopping to do some testing, I may buy a kit of multiple resistors from AliExpress. I don't have any resistor between the ttp223 and the sp511e, so yeah, that may be the issue. I noticed it starts happening after I play around with the addressable effects for a little while, which may induce noise on the signal.
      The TTP223 can be configured both ways, it can act as a momentary or maintained button by shorting B pad, and normally closed or normally open by shorting A pad. I have it configured as a momentary-normally closed button, I believe that's active low.
      Anyway, thank you.

    • @iRicardoTM
      @iRicardoTM 10 หลายเดือนก่อน

      @@RalphBacon By the way, I uploaded 2 videos to my google drive for you to see the connections and the problem.
      drive.google.com/drive/folders/1xYu68SpnWfqh6UfCg-5GgHNEPqtITt_c?usp=drive_link

    • @RalphBacon
      @RalphBacon  10 หลายเดือนก่อน +1

      Can you give me access to see the videos please?

    • @iRicardoTM
      @iRicardoTM 10 หลายเดือนก่อน +1

      @@RalphBacon Oops, forgot to change privacy settings. Should be good now.

  • @arshadkhankhan4981
    @arshadkhankhan4981 3 ปีที่แล้ว

    I have made a alexa enabled wifi switch with esp8266 can add touch switch at the same if I want to switch it off manually

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Excellent! That sounds like a great project.

    • @arshadkhankhan4981
      @arshadkhankhan4981 3 ปีที่แล้ว

      @@RalphBacon I am stuck and both the codes are not working for me any help would be great

  • @yogeshitaliya473
    @yogeshitaliya473 5 ปีที่แล้ว +1

    😍😍😍

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      You are most welcome Yogesh Italiya, I'm glad you like the videos. Nice to hear from you.

    • @yogeshitaliya473
      @yogeshitaliya473 5 ปีที่แล้ว

      @@RalphBacon thanks sir notice my comments 🇮🇳🇮🇳🇮🇳

  • @LimbaZero
    @LimbaZero 5 ปีที่แล้ว

    Usually these capsense "buttons" are shielded from direct contact to protect against ESD.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      In a way they already are, as the "touch" bit is the PCB on the other side to the copper. But they look a bit ugly anyway so hiding them behind a project case or enclosure makes the entire project a bit more 21st century anyway! Thanks for posting, LimbaZero, good to hear from you.

    • @LimbaZero
      @LimbaZero 5 ปีที่แล้ว

      @@RalphBacon I was thinking example that used directly arduino input pin.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Oh, the capacitive Arduino touch pin? I directly touch it, mine have survived for years now, no ESD damage at all.

  • @kgparanormal
    @kgparanormal 5 ปีที่แล้ว

    Hi mr. Ralph how can we use a touch switch to turn on a say led and touch it again and turn led off mine are momentary . just wondering if we can do that ... Been watching you for long time thought i would finely ask a question . love your show have learned alot only been working with electronics about a year. i turned in my fifty's and need a hobbie

    • @dekipet
      @dekipet 5 ปีที่แล้ว

      Of course you can. It no matter what kind of switch you use with microcontroller, as long as you set up your sketch correctly.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      This is easy enough, Greg, you saw it working in my bit of the video in Benny's cage. That used the capacitive touch in an Arduino but using the TTP223 would be similar. Actually, the TTP223 supports this natively, in hardware (locked on, locked off - both until another press) but in code it's easy too:
      /*
      * Tested solution.
      */
      bool buttonPressed = false;
      int buttonPin = 10;
      int ledPin = 12;
      // Declare the input pin for the TTP223 in your SETUP as an INPUT pin.
      // And the LED pin as an OUTPUT pin that you must set LOW initially.
      void setup() {
      pinMode(buttonPin, INPUT);
      pinMode(ledPin, OUTPUT);
      digitalWrite(ledPin, LOW);
      }
      void loop() {
      // Someone touched the touch pad?
      if (digitalRead(buttonPin) == HIGH) {
      // Previously did we have an unlit LED?
      if (buttonPressed == false) {
      // Remember the state of the LED (ON)
      buttonPressed = true;
      // Light the LED
      digitalWrite(ledPin, HIGH);
      }
      else {
      // Previously lit, so now turn it off
      digitalWrite(ledPin, LOW);
      // And remember the state of the LED again (OFF)
      buttonPressed = false;
      }
      //Wait until user takes their fat finger off the button!
      while (digitalRead(buttonPin) == HIGH) {;}
      }
      }
      If you don't understand this, try loading the BLINK example sketch first and getting to grips with that. Then amend it and eventually come back here. It's not Rocket Science, we just like to pretend that it is so no-one else starts a TH-cam channel like mine! Heh heh! If you need a hobby this one will certainly keep you busy!

    • @kgparanormal
      @kgparanormal 5 ปีที่แล้ว +1

      @@RalphBacon Cool thank you ill try this.I'm familiar with the i.d.e, i will try to work with code thanks again Mr. Ralph

  • @taranagnew436
    @taranagnew436 5 ปีที่แล้ว

    Where can i find the video for the home-alone project?

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Only in my mind at the moment, Taran. Although I have built it, and am about to start videoing the hardware, I have to take it to my Mum in a week (who lives in Germany) and I'm still tweaking the code. So the video will be published soon but give it 2 - 3 weeks, OK?

    • @taranagnew436
      @taranagnew436 5 ปีที่แล้ว

      @@RalphBacon ok

  • @chimpofm
    @chimpofm 3 ปีที่แล้ว

    another amazing video that you conveniently made before i needed it good job!. Quick question..i followed both this and you deep sleep video. how do i wake up from deep sleep using a touch sensor module,? rising event? im using a pro mini. i would love your help. you helped greatly on my RFID talking Motorcycle.(i sent you a video on facebook )

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Assuming you have an Arduino then, you can wake on interrupt (digital pin 2 or 3) on a falling value. So configure that touch switch (TTP223) by making the output normally HIGH and which goes LOW when you touch it (there are pads underneath to solder to enable this) and it will trigger an interrupt. The TTP223 datasheet will give details if my video/GitHub doesn't.
      Just in case others read this, it's very different for an ESP8266.

    • @chimpofm
      @chimpofm 3 ปีที่แล้ว

      @@RalphBacon thanyou ralph that's exactly what I needed to hear. You have saved me hours of trial and error did you see my motocycle video I sent you on fb messager

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      I have to admit that although I have an FB account I rarely look at it (or know how to use it properly). Send me the link here if you have it handy please!

    • @chimpofm
      @chimpofm 3 ปีที่แล้ว

      @@RalphBacon a man with such technical prowess doesnt get stuck with social media... here you go - vm.tiktok.com/ZMJaxtw6j/

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Very cool, reminds me of Knight Rider and his talking car. Seriously, though, why are all bikes not equipped with something like this out of the factory to avoid thefts? Cheap, simple and sounds cool. You could even have different voices!

  • @dekipet
    @dekipet 5 ปีที่แล้ว

    In bunch of my projects i used HTTM modules. They are simply great to hide behind glass, acrylic or similar.
    www.heltec.cn/project/capacitive-touch-module/?lang=en
    They work similar (if not exactly) as TTP223, but they are my first pick on draft.
    Good video as always, and your voice is calm as always. Keep them coming.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      You must the third person you says I was calm, Dejan, in this video. I'm wondering whether I had double-dosed my daily intake! Actually, it was probably Benny's calming influence (who writes all the code, of course).
      Yes, the HTTM modules do look (from a technical standpoint) very similar to the TTP223 modules - I suspect they will be considerably more expensive with their lovely colours though! Thanks for posting.

    • @dekipet
      @dekipet 5 ปีที่แล้ว +1

      @@RalphBacon Well, both have temporary and latched mode which can be selected by soldering two joints. Both send HIGH to OUT pin and both can detect finger 5mm from its surface. Difference is that LED can be so effective behind some transparent or semi transparent surface. I use them for smart switches behind white glass plate and they look awesome. TTP223 have LED too, but from downside. I used it too, but it is not that effective for my purposes. And yes, price is a little higher...
      i.imgur.com/o7lpBWe.jpg

  • @fezgary8279
    @fezgary8279 3 ปีที่แล้ว

    Can you revisit this ttp223. How does it stay on for longer than 6 seconds when you attached the washer? mine re-calibrate(blink) after 6 seconds. If I touch the sensor and hold it there for longer than 6 seconds it begins to blink. Do your ttp223 do the same?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      I made a video, just for you Fez, showing what happens with mine: bit.ly/353nKvF
      Although my TTP223 has a tiny capacitor (22pF) on the reverse (to reduce sensitivity, optional but space designed for it on the PCB) it is otherwise standard. As you can see, once the power is applied it only switches ON when my finger touches the pad, no matter how long I hold it on there for.
      If yours blinks after 6 seconds... well, frankly I have no idea what that is doing. Best bet is to read the datasheet thoroughly and see what auto-calibration options there are - perhaps yours is set up differently to mine?
      The one I used for the HomeAlone project is all set up with the washer just above it (but separated by the perspex cover (aka coaster)) and on power up it does the auto config and after that runs 24x7 for months on end without an issue.

    • @fezgary8279
      @fezgary8279 3 ปีที่แล้ว

      @@RalphBacon Thank you very much for the video. I am gonna try adding a cap to it and see if that changes anything. Could be a bad batch of Sensors. I am having to code around the problem. All 5 sensors I ordered and have tested do the same thing. I hope the next 5 don't have this problem. Do you have any sensors without the cap to test if the cap is the answer? Also, my setup is just a breadboard, ardiuno, wires from breadboard to soldered wires on the sensors.

    • @fezgary8279
      @fezgary8279 3 ปีที่แล้ว

      Nope, adding cap does nothing to fix problem. I read there are some knock offs circulating. Can you give me a reputable place in the US where I can purchase them?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Not in the US I'm afraid, although you can doubtless buy the actual 6-pin chip (eg from Mouser, DigiKey) and design your own PCB (it just needs one capacitor, one resistor and an LED). I bought mine from AliExpress and Banggood and never had the issues you describe, but YMMV.

    • @fezgary8279
      @fezgary8279 3 ปีที่แล้ว

      @@RalphBacon if you are interested in a few of these for a follow up video, let me know I can ship em out fast. No Charge of course. Just wamt to see what you come up with.

  • @paperg21
    @paperg21 4 ปีที่แล้ว

    Can you use this circuit to power wemos d1 on and off??

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Not directly, Stephen, as this gives out a signal level of either VCC or GND - but you could use that to drive a transistor which would in then turn a Wemos on and off. If you want it _latching_, that is, when you remove your finger you want it to remain in that state, you have to bridge a pad on the back, see the datasheet for exact details.

    • @paperg21
      @paperg21 4 ปีที่แล้ว

      Ralph S Bacon it’s not working!! 😩.. can you provide a circuit diagram? It’s not powering the D1 on

    • @paperg21
      @paperg21 4 ปีที่แล้ว

      Ralph S Bacon should I be using a P MOSFET? Or will a simple NPN transistor do the trick?

  • @sortofsmarter
    @sortofsmarter 5 ปีที่แล้ว

    Off topic a little.. I have had a terrible time trying to get my Nano's to program using the latest Arduino IDE..1.8.9 There Chinese clones using the CH340 chips and I have like 6 of them and I can only get it to take a sketch 1% of the time if I'm lucky. even the blink sketch. after google searching and trying a patch for a driver update for the ch340 driver it worked once and then not again. Finally i gave up after 2 days and went to my desktop and downloaded 1.8.4 and had no problem. Even my uno wouln't work right.. I use windows 7 64 bit.. and yes i was trying the old bootloader option..lol and every setting i could. Has anybody else had this issue or is it just me..

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      I _did_ have this problem when I did not use the "old bootloader" option. Also when I had a Nano 168 instead of a Nano 328P which caused a bit of head-scratching for a while. I've marked up all my 168 Nanos with red nail varnish now so I can identify them! Let me dig out a brand new one that I've had sitting there in it's anti-static bag for ages and see what happens (read next post for the result)

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      So I'm using 1.8.9 IDE with a brand new Nano from about 1990 (that is, quite old now). It has a CH340G USB to serial converter on-board.
      Uploading *without* stating *old bootloader* I get:
      avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x80
      Upload *with* the "new bootloader" option I get:
      avrdude: 930 bytes of flash verified
      So total success on an old bootloader Nano using 1.8.9.

    • @sortofsmarter
      @sortofsmarter 5 ปีที่แล้ว

      @@RalphBacon bummer..that failure is what i would get with either old bootloader or new. I wounder why It works great on my pc in the older version 1.8.4..lol its just a old dog and I like my lap top better..

    • @sortofsmarter
      @sortofsmarter 5 ปีที่แล้ว

      I wounder if it may be my ch340 chip... I think i may have bought a pack of 10 of these nano's all at once and now i look closely there is no markings on the chip. I'm going to try to find my USB isp avr programmer and see if it takes that way with the Arduino 1.8.9...

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Could be fake chips on there I suppose. Let us all know if you ever discover the cause.