Breadboard capacitive touch sensor tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 มิ.ย. 2024
  • Build your own capacitive touch sensor on a breadboard! In this tutorial we will use the PIC16F627A microcontroller to build a simple capacitive touch sensor from scratch. And to keep things interesting, we will build a momentary switch, a toggle switch, a timer, and a 3-level dimmer.
    Thanks for watching, and let me know in the comments if you have any questions!
    Companion article: www.friendlywire.com/tutorials...
    Email list: www.friendlywire.com/email
    Website: www.friendlywire.com
    Twitter: / friendlywire
    Reddit: / friendlywire
    Facebook: / friendlywire
    Instagram: / friendlywire
    Timestamps:
    00:00 Introduction & Overview
    01:06 What you need
    01:58 How does a capacitive touch sensor work?
    04:12 Schematic
    05:01 Programming the PIC16F627A microcontroller
    06:46 How does the program work?
    08:00 Bending the touch sensor wires
    08:18 Building the circuit
    10:20 Flashing the PIC16F627A microcontroller
    11:46 The final product
    12:21 Conclusion & troubleshooting

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

  • @FriendlyWire
    @FriendlyWire  2 ปีที่แล้ว +9

    To all of you building this circuit: there is a mistake in the video at 10:45 ! MCLR is pin 1 of the PICkit3, VDD is pin 2, and GND is pin 3. The schematic at 10:37 is correct. The corrected version of the wrong diagram at 10:45 is this one: friendlywire.com/tutorials/touch/flashing-annotated-large.jpg (See also the friendlywire.com/tutorials/touch/#ch4 ). Sorry about that!

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

    Awesome work and great explanation

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

      Thank you so much, glad you liked it!

  • @joshmyer9
    @joshmyer9 3 ปีที่แล้ว +14

    At the risk of repeating what everyone else is saying: this is a great video! I especially like how you broke out every section of it pretty completely, since you never know where someone's going to have a gap in their background for something like this. The production value was also good, especially the work put in to make that breadboard "schematic." So many caps, so many nets! Even with copy-paste, that kind of thing is tedious to put together.
    (One small nit to pick: I missed if there was a reason to say "capacity" instead of "capacitance" in the video. Apologies if that was in there and I missed it. It's not a big deal, but it is definitely something that caught my attention, since I don't know anyone who would use that word in English.)

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

      Thank you, Josh, glad you liked it! I am not a native speaker, so I may mess up things like "capacity" vs "capacitance," so thank you for letting me know!

  • @ScottWalshWoodworking
    @ScottWalshWoodworking 3 ปีที่แล้ว +4

    Fantastic video! There are so many cool applications for DIY-type projects with capacitive touch sensors. And it's not limited to only user interfaces as well.
    In the wood working world, there's a European machinery manufacturer that has developed a safety feature (Felder PCS) using capacitive sensing. Their table saw blade retracts immediately using a strong electromagnet if a finger is too close to the blade. The finger does not need to touch the blade to trigger the input. There are great possibilities for more of this in the machinery world.

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

      Thank you, Scott, glad you like the video! (Your videos are awesome, too!) What an interesting thought! Yeah, if you play with the wires, the resistor values, and the threshold values inside the program you can make this sensor "touchless." In this project I found it a bit hard to film that setup under the fluorescent studio lights, in general there was too much interference for larger resistor values.
      I can imagine that with a spinning motor with all the electromagnetic noise it will be even harder to have a stable detection mechanism... Here the algorithms is very simple, but the newer PIC controllers have that mTouch feature that might be able to pull it off. Thanks for sharing, so cool!

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

      That's worth a video. Not just about the basic principle but in depth. What are the design considerations (prevent a costly misfire but still have 100% safety) Is it 100% safe? Are there circumstances in which the system will not trigger (or too late) at all?
      I have seen some video's on this subject but they all are a bit simplistic. "When a finger touches the blade it retracts the blade" and go a bit in detail from there on. I am more interested in the triggering itself.

  • @SteelLighter
    @SteelLighter 2 ปีที่แล้ว +1

    you are fantastic brother, big thank from Vietnam!

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

      Thank you so much, Thắng, much appreciated! 🙂

  • @KarthikRaj-dd9vd
    @KarthikRaj-dd9vd ปีที่แล้ว +2

    perfact video explination ...i never seen this much detail video ..sprrrrr

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

      Thank you so much, Karthik, I am glad you like it! :)

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

    Just thank you for the great video with the great work done to .

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      Thank you so much, Hamza, much appreciated! :)

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

    Nice info, thanks for sharing it:)

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

      Thank you, and I am glad you like it! :)

  • @shokdj1
    @shokdj1 3 หลายเดือนก่อน +1

    Nice tutorial you e earned another subscriber. I'm hoping with this sensitivity I'm going to be able to set this up on something that rotates without the need for wires to be attached

    • @FriendlyWire
      @FriendlyWire  3 หลายเดือนก่อน

      Thank you, I am glad you liked the video! You'll have to try a bit with the threshold values in the code for that, let me know how it goes, I will be happy to help!

  • @tele_graf
    @tele_graf 2 ปีที่แล้ว +1

    Nice one

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

      Thank you, glad you like it! :)

  • @Seriouslyfunny1
    @Seriouslyfunny1 2 ปีที่แล้ว +1

    Just awesome brother. It's so refreshing to see this thing years after college.
    I wish you could do something on automated circuits and devices.

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

      Thank you for your kind words! I am always open to suggestions, what exactly do you have in mind? :)

    • @Seriouslyfunny1
      @Seriouslyfunny1 2 ปีที่แล้ว +1

      @@FriendlyWire hi brother. I in college, once built a fan with a humidity and thermal sensor, which could 'just about' identify a human, then read the ambient and body temperature. Using the equation of human comfort, I programmed it to automatically adjust the fan speed. Finally, using a set of stepper motors, it always faces the person within a 180° range.
      There are tons of fun projects like this which I can't even think of right now 😅
      I'm sure you'll be able to make even better things and make your channel grow !!
      All the best !

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

      @@Seriouslyfunny1 That sounds like a great project! With my channel I want to inspire beginners to learn more about PIC microcontrollers, which is why they typically are smaller projects. But it would be an interesting direction to combine several components that were previously covered in videos into bigger projects. Thank you for the inspiration!

    • @Seriouslyfunny1
      @Seriouslyfunny1 2 ปีที่แล้ว +1

      @@FriendlyWire even professionals like me love to revisit our college days and relive the fundamentals that we learned :D
      Keep up the great work. All the best for your channel !!

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

      @@Seriouslyfunny1 Thank you, very much appreciated! :)

  • @unperrier5998
    @unperrier5998 3 ปีที่แล้ว +11

    I think you're mistaken with tristate. Here are the usual three states:
    - input (I)
    - output (O)
    - high-impedance (Hi-Z)
    Where Hi-Z is unable to drive or capture, but is also not bothering anything else that wants to drive the line, even with a weak pull-up or pull-down (like an I2C bus for instance)
    Just checked the PIC16F627A datasheet and they just use the term "high-impedance" without prior explaination, but it is an industry standard in terms of digital I/O pads.
    Apart from that nitpick, great video.

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

      Thank you for your comment, I was unaware of that! I hope it does not confuse beginners too much.

  • @davidandrews8566
    @davidandrews8566 3 ปีที่แล้ว +8

    Hi, its very refreshing to encounter PIC based projects. TH-cam is infested with arduino copy and paste projects were the practitioners dont/wont /cant read a data sheet. Nice work 👏

    • @FriendlyWire
      @FriendlyWire  3 ปีที่แล้ว +4

      Thank you, David! I think Arduinos are a fantastic platform with many benefits, but I prefer PICs because I actually like reading datasheets and setting the right bits here and there :)

  • @shuyuanliu9797
    @shuyuanliu9797 2 ปีที่แล้ว +1

    Thanks for the great video! Easy to understand with nice animations. Small correction I believe: "capacity" should be capacitance, e.g. stray capacitance.

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

      Thank you for your kind words, glad you like the video! And yes, you are completely correct, I am not a native speaker so I messed that one up :)

    • @444guns
      @444guns 9 วันที่ผ่านมา

      "capacity" and "capacitance" are 2 separate things only in english. In other languages they are one and the same because, if you think about it, english has it all wrong actually. There aren't 2 separate things, really it's just one thing with 2 different words in english. Capacitance is just the capacity of a capacitor (or anything else that behaves that way). So, just like the channel owner said, for anyone else not english, capacity is just as correct.

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

    Nice explanation and video! I came here while trying to fix a fuse resistor on my touch sensor lamp. What I noticed, and what I'd like to ask is, that for such a circuit to work (perhaps stating the obvious here), the circuit always draws a bit of power to power the IC and RC loops, right?

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

      Hello Daniel, glad to have you! :) Good question and yes, you're completely correct! The circuit draws power when the LEDs are not on. The current flowing through the 10M resistors should be negligible (5V over 10M is less than one microampere) so the main part of the power consumption will be the microcontroller at a few mA.
      If standby power consumption is an issue then the software could be optimized to go to sleep mode and only check the buttons every 100ms or so. I did not build that into this tutorial to keep it simple, but it is definitely possible :)

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

    أحسنت قناة رائعة أتابعها
    تستحق الدعم

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

      Thank you so much! شكراً جزيلاً!

  • @vedangj044
    @vedangj044 3 ปีที่แล้ว +2

    Great video 🌟

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

      Thank you so much, glad you like it! Also let me know if you have any questions or suggestions for future videos! :)

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

      @@FriendlyWire I am thankful to the instructable who retweeted your content and I discovered your channel. Glad that happened :)

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

      @@vedangj044 Thank you, that's very kind of you! Have a wonderful day! :)

    • @unperrier5998
      @unperrier5998 3 ปีที่แล้ว +2

      @@FriendlyWire a suggestion would be: how could your circuit be used to drive a LED based lamp (I mean with 110V/220V bulbs).

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

      @@unperrier5998 That's a very good question, yes! I did not include it here because it is a breadboard-only project, and the line voltage part is always a bit tricky especially for beginners. But in principle you could use the PIC output to drive a solid state relay (or use a ULN2803A driver to drive a mechanical relay).
      It's great to have good comments like this, it always reminds me of cool things I could/should have added in the video! Maybe I should do a "XYZ revisited" series and address all the cool comments that people made! :)

  • @science.20246
    @science.20246 3 ปีที่แล้ว +2

    Great Video

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

      Thank you, glad you like it! :) Let me know if you have any questions or ideas for future videos!

  • @JulianHaardt
    @JulianHaardt 2 ปีที่แล้ว +1

    Thank you for the video. I just wonder about the two capacitors. You never explained what they are for and on the website it first states that you don't need them and later they are getting used as in the schematic and video. And than the question, why two of different kinds with a small and a big value in parallel? Wouldn't the big one be enough?
    Edit: Figured it out on my own. The two capacitors are for stabilizing the input voltage. The bigger electrolytic one is for the lower frequencies, but isn't fast enough for the higher frequencies (greater ESR). That's why there is the small ceramic capacitor (with lower ESR) for the high frequencies. But normally a pure battery voltage is noise free, that's why I still don't rly get the point of them. Or is it with people in mind, that maybe use a powerbank with a crappy boost converter setup?

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

      Hello Julian, thank you for your question! It's always good practice to have a bypass capacitor, they cost almost nothing and since the pins are turning off and on rather quickly it makes sense to add it. The big one is just there to act as a buffer whenever the LEDs turn on and off, or if you have a really noisy supply. I am using this circuit with a battery, but somebody else might use a switch mode supply, so I always add those capacitors.

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

    Great video. But, I want to make a capacitive touch sensor just like the one you made using an IC. No programming. Do you have a video on this? Do you do consulting?

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

      Thank you, Albert! Check out this video here: th-cam.com/video/sx3E6VM0e90/w-d-xo.html . This is an IC-only version without programming. I have not tried it myself, but in the video it looks like it works very well.

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

    First off I’d like to say what a great video! I’ve had an interest in the idea of capacitive touch sensors for a while and this video approached and explained it wonderfully, and was one of the first ones I found!
    I’m curious what might be a practical way to modify/add to the circuit in order to have more switches and lights. Would it be best to just copy the circuit multiple times until the desired amount is reached or are there better approaches I could take in making a circuit with an increased number of lights?

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

      Thank you, Wilson, I am glad you found this video helpful! Regarding the LED lights the answer is very easy: you can control as many as you like with just three wires by using shift registers, and for that you can check out my video here: th-cam.com/video/7RWaDvTeG7Y/w-d-xo.html
      Adding more inputs is more difficult, because they have to be physical inputs of the microcontroller so that we can use the trick presented in this video (switching between input/output mode for each pin). This prevents us from using peripheral hardware to do the job, it has to be a pin of the controller. The easiest fix would be to go for a bigger controller with more pins (for example, the PIC16F1459, PIC16F883, or PIC16F707). But, out of curiosity, how many inputs are you thinking about? If you need 10 instead of the 4 presented here, then using a bigger controller is a good idea. If you need 10,000 pins then it's perhaps a better idea to go with a different solution. Let me know, and I hope this helps! :)

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

      Thank you for the response! I checked out the video on shift registers and for some of my ideas that could work great! However there are other projects I’d like to make which I don’t believe shift registers would work for because I’d need more inputs. I have a couple different ideas - and of the ones that shift registers wouldn’t work I’d need between 118 and 121 inputs. There are some more intricate details I’d like to be able to add eventually, but I think the first thing would be to figure out how to have that many capacitive touch sensors to begin with

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

      @@wilsonkilgore2461 You can use shift registers for digital inputs as well :) Only if you need the touch functionality (or other analog features) they won't work. In your case, with so many pushbuttons, there may be a lot of interference from all the wires and probing signals, making it unreliable, especially if the PIC is far away. In your case it may make more sense to have dedicated chips with, say, 8 touch sensors each, that communicate with a central chip that controls everything. What kind of application do you have in mind? Do you have a bunch of space, or does everything have to be small? And what is the environment? Anything automotive can be a nightmare because of interferences... Happy to help!

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

      @@FriendlyWire Sorry for the delayed response - using dedicated clusters all connected to a central board seems like it may be the best way to do what I’m thinking, I’d love to talk to you about the specific details of what I’d like the completed project to be. Do you have an email I could send a more thorough explanation to?

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

      @@wilsonkilgore2461 Of course, you can find my email at the bottom of www.friendlywire.com :) Happy to help!

  • @johnyoungquist6540
    @johnyoungquist6540 ปีที่แล้ว +7

    Capacity has nothing to do with capacitors. The only correct term is capacitance. Don't confuse the two.

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

      I am a non-native speaker, in German they are the same word, hence my mistake :)

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

    Great video but i have a few questions.
    Could this be multiplexed for more touch sensors?
    How fast can the switches be actuated?

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      Hey Mike, glad you like the video!
      For this to work you need each switch wire to be mechanically connected to a proper microcontroller IO pin, because we need to be able to switch it from output mode to input mode. So digital multiplexing does not work this way, unfortunately. You could always use one dedicated microcontroller as a touch switch sensor, and then transmit the touch switch data to the main microcontroller with a serial protocol, of course.
      Regarding the speed: this program runs at 4MHz, so the effective speed is 1 million commands a second (PICs divide that by 4), or, in other words, 1 microsecond per command. The threshold values that worked for me are around 15, and the wait() command adds another 8 cycles or so, so call it 30 cycles per readout, which would amount to 30 microseconds, give or take. Hope that helps :)

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

      @@FriendlyWire it certainly did answer my questions i have a ongoing project for my senior design that has "capacitive" sensors, so seeing this in action showed me not to change my design to much. But overall i did get a good practical example from your video and may use these type of sensors in the future.

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

    I need a capacitive touch on / touch off to control a circuit that trips a micro relay and operates on 5 volts. I don’t want to do programming. What IC can I use? Is there a simple circuit? Love to get your help.

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

      Hey Albert, I'm sorry, maybe you did not see my response to your previous question. There is this this video here: th-cam.com/video/sx3E6VM0e90/w-d-xo.html . This is an IC-only version without programming. I have not tried it myself, but in the video it looks like it works very well. And if you look at 1:33 in the video I linked there is the LED after the 1K resistor. Instead of that you could put a simple NPN transistor driving a relay, all at 5V. Hope that helps!

  • @WaySide66
    @WaySide66 2 ปีที่แล้ว +1

    Thank you. How do you modify this design to use it with a 110v power source? I want to make it custom for lamps in my house and instead of an LED light it will turn on a relay

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

      Good question! You can use an ULN2803A driver IC and connect their inputs parallel to the LEDs. Then drive 5V relays on their outputs. Have you used relays before? This kind of stuff can be dangerous, so only proceed if you know all the risks. Otherwise I would recommend to get a ready-made module :)

  • @azrulnizamzainalabidinphb1247
    @azrulnizamzainalabidinphb1247 2 ปีที่แล้ว +1

    i hv same concept touch button as what have you share in this video. My sensor have problem, which does not gives desire output. From my understanding the microcontroller shall give 4.5v and 0v. But i hv measure the value on the microcontroller always 4.67v, does not alternate 4 to 0v. Does that mean my miC already problem? Or there is posibility the touch sensor dirty due to aged that effect treshhold value?

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

      Thanks for your interest, Azrul :) The voltages do not really matter, you can run this at 5V as well, or at 3V, it should behave the same way. Are you building this on a breadboard as well? And can you send me a photo @FriendlyWire so I can see? :)

  • @michaelteta875
    @michaelteta875 2 ปีที่แล้ว +1

    Idk if you’ll see this but could you use this with a multiplexer of some sort to get a big matrix of touch sensors?

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      Hey Michael, thanks for your question! :-) I don't think it works because it really needs the tristate-capability of the microcontroller I/O, and if you add multiplexers then there is the chance that these will mess up the capacitances and make it work less reliably. It's probably the best idea to use a microcontroller with lots of I/O pins for this purpose, or to use multiple really small and cheap ones. Did you have a specific multiplexer in mind?

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

    very nice i would like to know how 12v led strips works like this one in video. i want to learn it

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

      Thank you for the question, Sumith :) I have a video on the WS2812B LEDs here: th-cam.com/video/NLyB3-vEbFk/w-d-xo.html . A lot of these 12V LED strips make use of this type of LED (but they are run at 5V, not 12V). Is that what you have in mind? If not, can you send me a link to the type of LED you are talking about? :)

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

      @@FriendlyWire I have emailed you for developing a project. Hope you have read it. Am willing to pay for the project also

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

      @@sumithk5754 Unfortunately, at this point I cannot take any paid for commissions. I will check for your message, and if it's something that can be a nice tutorial I may do a video on it. Keep in touch!

  • @krishnaagrawal9840
    @krishnaagrawal9840 2 ปีที่แล้ว +1

    can i use the same c code for pic18f458 and if not then what changes should i do. and also will i have to change the values of resistance and capacitor for pic18f458?

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

      Thanks for the question, Krishna! In principle this touch sensor method does not use anything specific to the PIC16F627A. But you cannot just use the same code for the PIC18F458 because this chip has different I/O pins, and a different structure. But the good news: it is not so difficult to get it working on the PIC18F458. Have you checked out my tutorial on how to get source code on a microcontroller? [ th-cam.com/video/mUhzqDD6dg4/w-d-xo.html ] Can you try the steps for the PIC18F458 and set up a project for this chip?

  • @ebbewertz3417
    @ebbewertz3417 2 ปีที่แล้ว +1

    I recently discovered when I was working on my Arduino microcontroller that if you use a very high pulldown resistor (just like those 10Mohms in this video), the digitalRead(); command will just go high when I touch the input pin so you don't need a breadboard and much less programming.
    (This isn't as efficient as the method in this video, but it does work.)

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

      Nice! Does it also work for longer wires (as seen in the introduction of this video)?

    • @ebbewertz3417
      @ebbewertz3417 2 ปีที่แล้ว +1

      Yes it does, but as I said it isn't as efficient because if you ground yourself it doesn't work because then you are a pulldown resistor too, so small voltages in your body prefer to go to that ground instead of the microcontroller.

    • @ebbewertz3417
      @ebbewertz3417 2 ปีที่แล้ว +1

      I think I can explain this:
      So normally if you use a digital input, you use a pulldown resistor because otherwise your controller will pick up noise from small voltages floating in the air and thus randomly detect high or low.
      So:
      -you get noise with infinite resistance:(nothing, air)
      -but if you have 0 resistance (wire) you just have a direct ground connection and your input will always be low.
      The pulldown is in between these 2 statements, and if you think logically; if you have a very low resistance, your ground connection is very strong so you need a large voltage to exceed this, but if it's too big it will pick up that noise which means it's much more sensitive. That's because those very small voltages are bigger than the voltage that's able to go to ground/ to go through that giant resistance. So they will not go to ground but to the controller. And therefore using a very high (not too high) resistor like 10Mohm makes it sensitive enough to pick up small voltages from your finger.
      (Btw 1 Mohm works too, it just needs to be bigger than the resistance of your body)

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      @@ebbewertz3417 That's a good way to think about it! Just one small thing: I think when you say "voltages from you finger" you actually mean "charges from your finger," yes? Charges go through a resistor and that can be detected as a voltage drop. Would you agree? :)

    • @ebbewertz3417
      @ebbewertz3417 2 ปีที่แล้ว +1

      @@FriendlyWire yes, that's right and I also think that in my example it is based on static electricity stored in your body rather than the capacity of your body like in your video

  • @sarlupe
    @sarlupe 3 ปีที่แล้ว +2

    Microchips build and flash tools are windows-only it seems?

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

      No, works for all platforms :)
      www.microchip.com/en-us/development-tools-tools-and-software/mplab-x-ide#tabs
      www.microchip.com/en-us/development-tools-tools-and-software/mplab-xc-compilers#tabs

  • @ambulatorioveterinariodott3768
    @ambulatorioveterinariodott3768 3 หลายเดือนก่อน +1

    Hello, how can I have more range of activation like putting the sensor under 1cm of wood? Do I have to extend the size of the loop or what?

    • @FriendlyWire
      @FriendlyWire  3 หลายเดือนก่อน

      This is a passive circuit in some sense, because it does not amplify the signals, so there is a chance that 1cm is a bit too much. It depends a lot on the properties of the material, and the length of the wire, and the grounding of the circuit. Unfortunately there is no 100% guarantee that it will work. But the circuit is so simple that you can try it out rather easily.

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

    Can it be modified in a way that capacitive touch works from a distance like 2cm? without completely touching the sensor? if yes, then please let me know how. Thank you very much for so much knowledge.

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

      Thanks for the question! I am not sure if it would work reliably using this method at such a distance, it depends a lot on the environmental factors. I would say in this case you would need an active circuit that amplifies the signals first.

  • @samuelmorgan7112
    @samuelmorgan7112 2 ปีที่แล้ว +1

    Is there a way to make a capacitive touch sensor without a microcontroller? Im building a synthesizer and want a keyboard make of metal plates that control which note is played.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      Hey Samuel, thanks for the question :) I think so, yes! Here is one that uses a Schmitt trigger and a flip flop: th-cam.com/video/sx3E6VM0e90/w-d-xo.html

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

    can we use touch capacitive buttons available in the market instead of making one. If yes, then which button can we use and what will be the change in circuit.(I want to make it on a pcb)

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

      There are ready made modules out there, for sure. If you search for "touch sensor module" you will find plenty, and they have a logic-level output (5V when somebody touches, 0V otherwise). The goal of this video was to learn how these buttons work :)

  • @user-uo4um6cw1b
    @user-uo4um6cw1b ปีที่แล้ว +1

    Hi I've been trying to use the PIC18F05Q40 instead. As an SOIC package. I soldered it on a pcb with headers pins and wired up the connections. But couldn't get it work (currently only looking at Momentary Mode)
    So I decided to simplify and follow ur tutorial on blinking LEDs and it worked! Not sure if it's because the PIC18F05Q40 is not suitable for the capacitive touch sensor purpose or if I'm doing something wrong 😅
    Would appreciate any advice you can give!!😊

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

      Great to see that you are trying it out! Like I said in the video, this tutorial is for breadboards. On a PCB you may have a smaller stray capacitance. Try adding a very small 10-20pF capacitor parallel to the pin, that should help a bit, I hope.

    • @user-uo4um6cw1b
      @user-uo4um6cw1b ปีที่แล้ว +1

      @@FriendlyWire oo okayyy thanks so much! Will definitely give it a try when I can!

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

      @@user-uo4um6cw1b Hope it helps, and feel free to experiment with the "threshold" values in the code as well, because your discharge times may be different.

    • @user-uo4um6cw1b
      @user-uo4um6cw1b ปีที่แล้ว +1

      ​@@FriendlyWire heyy, so I tried connecting a 10pF capacitor in parallel with the 10Mohm resistor and did the following:
      1) Reduced the threshold to 1, no response when touching the sensor
      2) Increased the threshold to 15, also no response
      I also did try to connect the negative terminal of the battery to an external large metal object however it wasn't successful either. Do have any other advice I could try out?

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

      @@user-uo4um6cw1b It would be good to see a measurement of the values (i.e. how long it takes for the pin to read as low, both when you touch it, and when it's left open). Do you have a way to connect some LEDs to some extra ports? Or an LED module/LCD/anything else that we can use to read out data? This way it would be easier to diagnose :)

  • @preetichaudhari319
    @preetichaudhari319 2 ปีที่แล้ว +1

    Hey!
    Is there an issue if I use PIC16F628A instead of PIC16F627A?
    What modifications do I need to make to the code?
    Also I am facing problem while using the PICKIT.
    Despite making all the connections properly I getting Target Device ID does not match expecter Device ID.
    How to resolve this?

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

      Hello Preeti, thanks for your question! The PIC16F628A should work fine, without any modifications. Just make sure when you set up the project in MPLAB that you select "PIC16F628A" and the same in the MPLAB IPE.
      The connections to the PICkit3 are exactly the same for PIC16F627A and PIC16F628A.
      Can you send me a photo of your setup on Instagram/Twitter/Facebook @FriendlyWire or on Reddit /r/FriendlyWire ? Then I can take a look at it :)

  • @maxios-7613
    @maxios-7613 2 ปีที่แล้ว +1

    what if I'm building it on a normal pcb ? what can replace the stray capacitors ?

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      Good question! People usually use PCB traces for that and you can also insert a small capacitance of around 10pF or so. Overall it depends also on your PCB layout and your intended application. So: it depends. There is an application note by MicroChip on this topic, search for "AN1102 MicroChip" and you should be able to find it online.

  • @beewoo
    @beewoo 3 หลายเดือนก่อน +1

    This is a great tutorial. Do you think this can be made with the BBC microbit or Arduino?
    Thanks in advance!!

    • @FriendlyWire
      @FriendlyWire  3 หลายเดือนก่อน +1

      Thank you, I am glad you like it! Yes, this method should work with any microcontroller that has general purpose IOs :) The only difference can arise from not building it on a breadboard because then the stray capacitance may be to low and you may have to add a few picofarads with an extra small capacitor.

    • @beewoo
      @beewoo 3 หลายเดือนก่อน +1

      Ok, thank you so much for the reply! I appreciate it : ) @@FriendlyWire

    • @FriendlyWire
      @FriendlyWire  3 หลายเดือนก่อน

      @@beewoo Happy to help! If you have more questions, reach out to me on social media or via email (you can find it at the bottom of www.friendlywire.com) :)

  • @purposefulcreations
    @purposefulcreations 2 ปีที่แล้ว +1

    Thank you for this video! Do you do commission work? I have an idea but have no idea where to begin.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      Glad you like the video! I don't usually do that, but maybe it is something that can be turned into a video? What do you have in mind? :)

    • @purposefulcreations
      @purposefulcreations 2 ปีที่แล้ว +1

      That’s would be great. I want to do something similar to this video. Except the two functions are touch and voice. The idea is, someone will touch a button the button lights up and a recording will play.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      @@purposefulcreations Oh, I see! Honestly I am not an expert with audio playbacks on these 8-bit microcontrollers. I would probably get a cheap mp3 player and just activate its play button with a transistor. How long is the recording you want to play, and does it have to appear immediately (within a few milliseconds) or is a delay of a second acceptable?

    • @purposefulcreations
      @purposefulcreations 2 ปีที่แล้ว +1

      The length will vary per painting. I am a painter and I want to have some interactive pieces. I think it should be like a kids toy where you press the button once and the voice plays

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      @@purposefulcreations That's such a nice idea! I love it! Let me think about it and get back to you. If you want to talk outside of TH-cam, the best way to reach me is my email (which you can find on my website www.friendlywire.com) or over on Twitter @FriendlyWire :)

  • @jomfawad9255
    @jomfawad9255 23 วันที่ผ่านมา +1

    Question, does it only detect human finger or for example if it touches plastic or wood it works?

    • @FriendlyWire
      @FriendlyWire  22 วันที่ผ่านมา

      It only works if stray capacitance gets changed, so wood and plastic won't work, I think.

  • @niedarle
    @niedarle 2 หลายเดือนก่อน +1

    If I would use analog input I wouldn't have to strongly consider 0.8 as my low level value, but rather use any value I want, right?

    • @FriendlyWire
      @FriendlyWire  2 หลายเดือนก่อน

      This capacitive sensing only works with all ADC functionality turned off. I think the ADC is a bit too slow for a proper conversion. It's not so much about the voltage levels involved, but about the time scale in which the voltage levels change. So my recommendation is not to use the ADC functionality. But let me know if you can figure out a way to use it, it would be good to know! :)

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

    what shampoo do u use? btw love ur vids!

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

    I'm 53and i will learn. It was my first choice but was not able to get to decide.

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

      It's never too late to learn something new! :-)

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

    Could you make tutorial how to do the same with Arduino or ESP8266 WeMos d1 mini instead PIC16F627A ?

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

      Thanks for the question :) On this channel I like to focus on PIC controllers for now. But I encourage you to check out the coding video ( th-cam.com/video/I6m_DTDsE4U/w-d-xo.html ) that goes along with this main video here where we go through how to program this in detail. If you have some experience with Arduino and/or ESP's then it will be very easy to program, because the main idea of this is so simple :)

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

    how to make unit that if someone touch it with gloves , active alarm?

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

      Good question! The capacitance of a gloved hand is different than one without gloves. I am not sure if it works in this setting, but you can try to build it, and change the threshold numbers inside the code. Did you have a look at the source code? :)

  • @satalaj
    @satalaj 2 ปีที่แล้ว +1

    Nice

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

      Thank you, glad you like it! :)

    • @satalaj
      @satalaj 2 ปีที่แล้ว +1

      @@FriendlyWire I'm looking for a sensor which I can put under the table and when someone put the plate or touch the table only that part will glow. Will I be able to achieve using the technique you had shown. There is TTP223 module but I don't know how to increase the sensitivity of it. If I could figure out then I will put multiple touch sensors under the table and when someone put any object in the table only the part under it will glow using such a sensor

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

      @@satalaj Oh, that is probably very tricky. What kind of objects should it be? Not everything has the same capacitance, so it will always be different for different objects. Maybe a pressure sensor would be better in this case, or a really thin wire network that acts as a resistive touch sensor?

    • @satalaj
      @satalaj 2 ปีที่แล้ว +1

      @@FriendlyWire it can be any pot over the cofee table or a glass of water over the table

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

      @@satalaj How thick is the table?

  • @thomasvalletta4297
    @thomasvalletta4297 2 ปีที่แล้ว +1

    Hey Jens, I would love to build this project as one of my first electronic projects. Your link to the PIC16F627A is back-ordered until February 2023 :( Is there another microcontroller that I could use in place of the PIC16F627A? Thanks!

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      Hello Thomas, thanks for your interest! :) It looks like the PIC16F627A is hard to find now with the semiconductor shortage. I will try to see if there is another one you could use. One question: do you need the dimming function? Or is it OK if all the LEDs just go ON/OFF ?

    • @thomasvalletta4297
      @thomasvalletta4297 2 ปีที่แล้ว +1

      I'm actually building a password/pincode using 8 touch capacitive pads. So I believe ON/OFF (0/1) would be just fine for my use case. Thanks so much for the reply!

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      @@thomasvalletta4297 That's a great project, make sure to share it with me, if you can, I would love to see it. You can use any PIC microcontroller you want for that because the method works with any PIC pin that has a tristate register. Have you checked if the PIC16F628A is available? or the PIC16F877A? The PIC16F1459 is also a viable option.

    • @thomasvalletta4297
      @thomasvalletta4297 2 ปีที่แล้ว +1

      Awesome! I'll try to share it with you as I get towards completion! Thanks for the advice and replies, I'll check if those pins are available!

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      @@thomasvalletta4297 Yeah, definitely let me know, Thomas! You will need to tweak the code just a little bit, but we will figure it out. You can also reach out to me on Instagram/Twitter/Facebook @FriendlyWire , or use the email at the bottom of www.friendlywire.com , if you like. Thanks for your interest!

  • @7hBruh7
    @7hBruh7 ปีที่แล้ว +1

    Is there a way to make this powered by plug in to wall plugs? So not battery powered basically?

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

      Hey Rudy, thanks for the question! Yeah, you can run these off of a USB phone charger. All you need are simple adapters like these: www.amazon.com/dp/B00HJ6AE72/

    • @7hBruh7
      @7hBruh7 ปีที่แล้ว +1

      @@FriendlyWire legend! Thank you

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

      @@7hBruh7 Happy to help!

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

    Can these touch sensors work for non physical touches, for example like a touch with a plastic object? If not what other DIY sensors can i use?

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

      I think they won't work with plastic objects, because they would not change the capacitance of the pins enough. For that I would recommend maybe an optical sensor. What kind of application do you have in mind?

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

      To sense a cup or a bottle when it is placed on top of the sensor. And the sensor has to be a DIY sensor.

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

      @@sasidewa1893 I see! I think that in this case possibly a pressure sensor would work more reliably. I found a really simple tutorial here: www.instructables.com/How-to-Make-a-Ridiculously-Cheap-Analog-Pressure-S/ (and here is also a video: th-cam.com/video/BwjgX0kXCpo/w-d-xo.html ) . If you need better resolution, then you can look into "load cell" circuits (basically those are proper weighing modules used in bathroom scales etc.), or also perhaps look into piezoelectric sensors. Hope it helps!

  • @kabandajamir9844
    @kabandajamir9844 2 ปีที่แล้ว +1

    The world's best teacher

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

      Glad you liked the video! And thanks so much, that's very kind of you :)

  • @BIJAYKUMAR-kx2or
    @BIJAYKUMAR-kx2or ปีที่แล้ว +1

    Thanks brother but one question this microcontroller remember previous state
    In case current off, please answer

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

      Nope, this one has no memory function programmed in. You could probably use the internal EEPROM to do it, but that would be a different project.

    • @BIJAYKUMAR-kx2or
      @BIJAYKUMAR-kx2or ปีที่แล้ว

      @@FriendlyWire Thank you for reply, can you try new project EEPROM , I highest number of GPIO POINT, just change code
      Please try

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

    How can you bypass this? cause my client problem is this she just want it to automatically on when it is plug cause theyll be using this timer thing and inkbird

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

      Hey, not sure exactly what you mean by this question, could you explain more? Happy to help! :)

  • @Iamsuccesspro
    @Iamsuccesspro 2 ปีที่แล้ว +1

    Nice, now you need to show how to use it in real life. Example led light for a battery operated (24v) sit to stand lift.
    The touch switch would be the metal frame, that's painted. There's nothing connected to the frame (no + and no -) of the linear actuator motor.
    Seems simple, I have tried building such an circuit using transistors. Darlington configuration for the touch and another driver transistor for the 3×9 led light.
    The circuit is powered by the 24v .
    I also tried an fet and and a jfet for the touch (capacitive) switch.

    • @Iamsuccesspro
      @Iamsuccesspro 2 ปีที่แล้ว +1

      I have a microcontroller, TI I could use but I think it would be an overkill, and would introduce interface complexity to circuit as well as far as powering the MC and isolation.
      The circuit was sensitive enough, except that it wasn't reliable.

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

      @@Iamsuccesspro Yeah, I agree, this circuit can be a bit tricky to implement in connection with inductive loads that cause HF interference, but I think it can be improved by modifying the threshold values and by refining the code.

  • @erayyurtsever6849
    @erayyurtsever6849 2 ปีที่แล้ว +1

    Can i do that without the microcontroller

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

      Yes, in principle you can build this without a microcontroller but you need to find a way to measure the discharge time. Are you worried it's too complicated with a microcontroller? I have a ton of videos on that topic to get you started with microcontrollers :)

  • @user-zv2yk9rc3q
    @user-zv2yk9rc3q 8 หลายเดือนก่อน +1

    I have a pic16f677 would this work?

    • @FriendlyWire
      @FriendlyWire  8 หลายเดือนก่อน

      Yes, the basic idea works very well with this chip. The code will need to be changed a bit, though. Have you used the PIC16F677 before?

    • @user-zv2yk9rc3q
      @user-zv2yk9rc3q 8 หลายเดือนก่อน

      No I haven't, I had a rummage round work and we have loads, presumably an old school projectthat was run before I started. do you happen to know what would need to be changed?@@FriendlyWire

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

    Hi can the capacitor sensor be modeled to stay in on position for a certain time when a touch signal occurs? And turns automatically off after the set time is over?

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

      Of course! This is what the green LED does at 0:14, right? How long should it stay on?

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

      @@FriendlyWire for like 1 minitue and btw thank you so much for the reply💕

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

      @@icebear4489 Do you want all buttons to work in the one-minute timer mode? By changing the line buf3 = 500; to something else, like buf3 = 5000; or buf3 = 15000; you can make the delay longer (for LED3). Hope it helps!

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

      @@FriendlyWire only the green one. Thank you so much this helps a lot💕

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

      @@icebear4489 Great, happy to help! :)

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

    Can this work using PIC18f45k20 and what would be the changes if any to the software?

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

      Yes! :) If you look at the datasheet (ww1.microchip.com/downloads/en/devicedoc/40001303h.pdf) check out Table 10-2 for PORTA, Table 10-4, and Table 10-6 you see that all ports can be set as input and output via their tristate registers. This means that all pins of the PIC18F45K20 can work as a touch sensor input :)
      Changes in the software: you need to write a new program from scratch within MPLAB X IDE and select the PIC18F45K20 as a device. The good news: any thing else can basically be copied and pasted, since it does not use any controller-specific things (except for the dimming). Feel free to send me a message on Twitter @FriendlyWire if you need help :)

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

      @@FriendlyWire Thanks alot, your dms on Twitter are locked I also wanted to ask how the wiring would change since the pic18f45k20 is different from the pic16f627a I'm kinda new to all of this .

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

      ​@@mzuvukilezweni5956 I think Twitter only lets you send DMs to people who you follow, so if you follow me you can send it. I just talked to a different viewer today and it worked fine, so I am not sure what else it could be.
      Yes, the wiring would change, because it depends on where you want toe pushbuttons to be. But if you are really new to all of it, maybe check out a simpler project first, like this one here: th-cam.com/video/e4Q2dYVedPY/w-d-xo.html Then try to get it to run on your chip :) What do you think?

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

      @@FriendlyWire what is the name of the cable connecting the picket to the breadboard??

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

      @@mzuvukilezweni5956 I am not sure if it has a name, it is just five wires. I think you can search for "Dupont connector" to get something similar :)

  • @maryamalrubaye1624
    @maryamalrubaye1624 2 ปีที่แล้ว +1

    Hi should I change anything if I use pic 16F877A or a larger breadboard ?

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      Hi Maryam :) For the PIC16F877A you need to change some things in the code, like the configuration bits, and also the PWM will not work exactly the same way. Do you already have some experience with the PIC16F877A? If you have a program for it and can make an LED blink then that will already be super helpful! Let me know, we will figure it out :)

    • @maryamalrubaye1624
      @maryamalrubaye1624 2 ปีที่แล้ว +1

      @@FriendlyWire actually I did it and its working now I need to change what the led does how can I do that do you suggest any thing

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      @@maryamalrubaye1624 Awesome job getting it to work on the PIC16F877A, congratulations! :) What do you want the LEDs to do instead?

    • @maryamalrubaye1624
      @maryamalrubaye1624 2 ปีที่แล้ว +1

      @@FriendlyWire maybe Christmas lights when you press one of them it blink each 0.01 second lik Christmas lights how can I do such a thing :(

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      @@maryamalrubaye1624 Not sure I understand 100%, because this blinking would not even be visible to the naked eye at 100 Hz. Do you have an example video of the effect? :)

  • @NOTJOSH100
    @NOTJOSH100 2 ปีที่แล้ว +1

    The glass is why the iPhone has a touch screen now it makes sense

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      You can usually see if something is a capacitive touch sensor by the absence of wires. Earlier touch devices had a very tiny grid of wires embedded in the glass, which you almost could not see, but those worked via resistance and not capacitance :)

  • @dr0mp507
    @dr0mp507 2 หลายเดือนก่อน +1

    Is it prone to magnetic interference?

    • @FriendlyWire
      @FriendlyWire  2 หลายเดือนก่อน

      Thanks for your interest and for the question! This circuit is sensitive to anything that affects the stray capacitance of the breadboard/surrounding air. The way it is built I did not pay attention to any particular EM shielding, and I doubt that it will be possible to design a truly robust circuit like that on a breadboard. Is there any particular type of application you have in mind? :)

  • @siamakaghazeinali
    @siamakaghazeinali 2 ปีที่แล้ว +1

    how to use 12 v car battery to run it?

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

      The circuit does not use too much current, so you could use a 7805 voltage regulator. Alternatively, you can also use a "step down" converter module that accepts 12V as an input and that outputs 5V. You can DM me @FriendlyWire on Twitter/Instagram/Facebook, or send me an email (see the bottom of www.friendlywire.com) if you need more help :)

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

    I have a lamp with this switch and I would like the lamp to be always on even after the mains power is cut off, how can I do this??? I don't want this switch on the lamp..

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

      Hi there, not sure I understand the question :) Is this a lamp you purchased somewhere (if yes, do you have a link) or did you build it yourself?

  • @haroarcadia4149
    @haroarcadia4149 2 ปีที่แล้ว +1

    Can i run this with arduino uno?

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

      The same idea works on any microcontroller :) But this project and all the code is for the PIC microcontrollers. If you search for "Arduino touch sensor" I am sure you will find similar tutorials :)

  • @askanyful
    @askanyful 5 หลายเดือนก่อน +1

    Can this work on a PCB if all components are soldered as per circuit ???

    • @FriendlyWire
      @FriendlyWire  5 หลายเดือนก่อน +1

      The same principle works, but you may have to add a picofarad capacitor as a dedicated capacitance. It also depends on the layout of the traces on your PCB. It may take a few times to get it right.

    • @askanyful
      @askanyful 5 หลายเดือนก่อน +1

      @@FriendlyWire ok thats great!!! thank you so much for the reply. I was just wondering how many caps will be required and where all it should be connected. This is one of the best circuits I have come across so I wanted to integrate it into an electric board!!!

    • @FriendlyWire
      @FriendlyWire  5 หลายเดือนก่อน +1

      @@askanyful Thank you, I am glad you find it inspiring! :-) Let me know if it works or if something goes wrong, I will be happy to help (and I'd love to see a photo of the project)

    • @askanyful
      @askanyful 5 หลายเดือนก่อน +1

      @@FriendlyWire absolutely!!! Of course it might take some time though but I will surely share a pic if it is a success...all thanks to you!!!!

    • @FriendlyWire
      @FriendlyWire  5 หลายเดือนก่อน +1

      @@askanyful Happy to help! Let me know if it works out as expected, or if you need help with something. And, most importantly: have fun with the project! :)

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

    Can I do it using PIC12F508?? and what about ATtiny13A(SMD)?

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

      This method works with all microcontroller pins that have tristate pins (i.e. pins that can be both input and output). Of course the code will be a bit different for each case (different names of registers, ...) but the main idea is the same. The only thing to keep in mind is that when using a PCB the stray capacitance will be a bit different from a breadboard, but it will still work.

    • @rubaiyat_bf
      @rubaiyat_bf 9 หลายเดือนก่อน +1

      I wanna place this into pcb. Will it affect the capacitance greatly?@@FriendlyWire​

    • @FriendlyWire
      @FriendlyWire  9 หลายเดือนก่อน +1

      @@rubaiyat_bfYes, it will, the typical capacitance of a breadboard is in the picofarad range. So it may be a good idea to add a, say, 10 pF capacitor on your PCB. But I have to say that I never tried this myself on PCBs, so I am not sure if this will work the first time around.

    • @rubaiyat_bf
      @rubaiyat_bf 9 หลายเดือนก่อน +1

      Thanks@@FriendlyWire

    • @FriendlyWire
      @FriendlyWire  9 หลายเดือนก่อน +1

      @rubaiyat_bf Happy to help, let me know how it works out, I am curious! :)

  • @nielsdaemen
    @nielsdaemen 4 วันที่ผ่านมา +1

    I wonder if it's even possible to just use the internal pull up resistor for this in some mcu's

    • @FriendlyWire
      @FriendlyWire  7 ชั่วโมงที่ผ่านมา

      Good idea, but I don't think it would work, I doubt they are more than a few kilo ohms, and here we need a million times more. Let me know if it works, I am happy to learn more!

    • @nielsdaemen
      @nielsdaemen 55 นาทีที่ผ่านมา

      @@FriendlyWire Hi I found this video of someone doing this on arduino (atmega328P) I'm not sure if he uses the exact same technique, but there are no external components required.
      th-cam.com/video/R94Ut3pOTd4/w-d-xo.html

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

    Hola¡¡¡ esta genial. ¿Alguien sabe como puedo conectar este circuito directamente con Arduino?
    Hello, it's great. Does anyone know how I can connect this circuit directly to the Arduino?

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

      Muchas gracias! The method described here works well for Arduino, too, since it does not use any advanced microcontroller features. All you need to do is switch a pin from digital output to digital input and then measure the time it takes for the pin to read as "low." But it is also a nice project to get started with on PIC microcontrollers :)

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

      @@FriendlyWire Muchas Gracias, me puedes mandar el código y esquema ? Te lo agradecería mucho, ya que si es algo en lo que quiero hacer. Gracias!

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

      @@zerinoggonzalez9726 I don't work with Arduinos, sorry. But why don't you give it a try yourself, I explain it all in the video :) It's a fantastic beginner project!

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

      @@FriendlyWire Muchas Gracias¡ TE lo Agradezco Mucho...

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

      @@zerinoggonzalez9726 Estoy felíz de ayudar :) Happy to help! :)

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

    Hi
    I tried replicating you u had done it looks like its not seems to work. Was trying it on atmega 8515. Can you please help me . Would so so very nice.
    Thanks in advance

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

      Hey Omkar, thank you for your question! Two questions: what frequency is the controller running at? And did you build it on a breadboard? If it is easier, you can also reach out on Twitter @FriendlyWire :) We will figure this out!

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

      @@FriendlyWire thanks
      I will reach out on twitter

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

    Hey bro I'm from Indonesia
    Can you make a capacitive touch sensor with a number pad along with running text?? I need your help bro?? Please🙏

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

      Sounds like an interesting project! Why don't you give it a try? :) You can use this touch sensor method for as many input pins as you like, and you can also check out my MAX7219 video for a simple way to show numbers on LED modules ( th-cam.com/video/3FJuhMNPibQ/w-d-xo.html ). Does that help? :)

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

      @@FriendlyWire I'm still beginner bro. So it does not really understand about this project. I'm so sorry Bro 🥺

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

      @@prodadmnz3743 That's OK, we all have to start somewhere! :) I would recommend you to get started with this video here th-cam.com/video/e4Q2dYVedPY/w-d-xo.html . It's a bit boring to just make one LED blink, but it will build your confidence, and then you will realize that you can TOTALLY do electronics projects with microcontrollers as well. I believe in you!

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

    Hi bro I really need you help please help mee 🙏🏻🙏🏻 can we make this same circuit without using any microcontroller just by using electronic components like transistors, capacitors , resistor etc I really need you help bro please help 🙏🏻🙏🏻

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

      Hey Aman, thanks for your question :) In this video I wanted to explain it with microcontrollers. But you can use readily made modules, such as the TTP223B. A non-microcontroller version is in this video here: th-cam.com/video/sx3E6VM0e90/w-d-xo.html I have not built this myself, but it looks like an interesting approach. Let me know if it helps, and thanks again for your interest!

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

      @@FriendlyWire thank youu soo muchhh 😊😊😊

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

      @@amanjoshi6591 Let me know how it works out, happy to help!

  • @rgbcrafts
    @rgbcrafts 2 ปีที่แล้ว +1

    Wonder if it could handle 9 bicolor LEDs to a exquisite nerdish project of mine.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      I think you could do that. Do you want either color to be on? Or also both at the same time? :)

    • @rgbcrafts
      @rgbcrafts 2 ปีที่แล้ว +1

      @@FriendlyWire I think it would be a two state by touch. I'm not sure if a third one would be possible without making the circuit way too complex. One color at a time.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      ​@@rgbcrafts I think you could "charlieplex" the LED, or something similar. Do you have a datasheet or a link for your LED? :) The exact circuitry depends a lot on the wiring inside the LED, so it's better to have a look at that first.

    • @rgbcrafts
      @rgbcrafts 2 ปีที่แล้ว +1

      @@FriendlyWire I think that, to be able to have the colors I'm looking for, I would need an RGB LED, the commonly found around is common anode one, with 4 legs. I'm looking for two specific colors swap: pink/purple and blue/cyan light emission.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      ​@@rgbcrafts Hey, sorry for the delayed response, I was traveling. In the example case you mention the color blue would always be on, so you would need to just add green for cyan, or red for purple :) But the problem is that in an RGB LED the LEDs have common anodes, so you can forget about Charlieplexing. But if you edit the code of the microcontroller then you can easily add additional LED pins. Does that sound doable? If not I am happy to help :)

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

    No se puede hacer sin microcontrollers...???? No me gustan los microcontrolers... odio todo lo digital

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

      Thank you for the question! I know, using microcontrollers can be a bit scary. On this channel I try to help beginners to lose that fear and give it a try :-) But of course you don't have to use microcontrollers, if you don't want to.
      For touch sensors, there are ready-built modules. Just search for "TTP223B touch sensor" and you will find ready-made modules. But if you want to build something yourself, there is also a microcontroller-less version that I found here: th-cam.com/video/sx3E6VM0e90/w-d-xo.html . I have not built this circuit myself, but it looks like it makes use of a similar principle.
      Let me know if that helps, and thank you again for your question! Have a great weekend! :)

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

      @@FriendlyWire aaaah... ok... muchas gracias..!!! Tomare nota... estaba buscando un sensor capacitivo que pueda armarse con componentes simples... gracias por los datos...
      Saludos y buena suerte...!!!

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

      @@tiempoveganoprovida2247 Happy to help, and good luck to you, too! :)