{"id":814,"date":"2025-10-21T04:02:39","date_gmt":"2025-10-21T08:02:39","guid":{"rendered":"https:\/\/bussigel.com\/sonicarts\/?page_id=814"},"modified":"2025-10-22T05:12:07","modified_gmt":"2025-10-22T09:12:07","slug":"sensing-capacitance","status":"publish","type":"page","link":"https:\/\/bussigel.com\/sonicarts\/sensing-capacitance\/","title":{"rendered":"Sensing Capacitance"},"content":{"rendered":"\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" data-id=\"824\" src=\"https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/cracklebox.jpg\" alt=\"\" class=\"wp-image-824\" srcset=\"https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/cracklebox.jpg 640w, https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/cracklebox-300x225.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"620\" height=\"517\" data-id=\"826\" src=\"https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/FVJQBR2I6DYSJSY.webp\" alt=\"\" class=\"wp-image-826\" srcset=\"https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/FVJQBR2I6DYSJSY.webp 620w, https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/FVJQBR2I6DYSJSY-300x250.webp 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/figure>\n<\/figure>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Capacitance is the measure of a material&#8217;s ability to store electricity. Technically, <em>Capacitance<\/em> is a measure of how much electric charge something can store per unit of voltage. Think of a capacitor as a tiny rechargeable container for electric energy.<br>It consists of two conductive plates separated by an insulator. When you apply voltage, positive charge collects on one plate and negative charge on the other. The more charge it can hold for a given voltage, the higher its capacitance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our bodies can store electric charge as well, allowing us to measure when someone touches an electric circuit (because the capacitance changes). This allows for some truly interesting modes of interaction and opens up a vast material space for digital interaction. Anything that is reasonably conductive can be used as a button simply by making contact with it. A copper wire, a brass sculpture, conductive thread or fabric&#8211;pretty much anything that conducts electricity can be used to interface with digital programs. Even water can be connected to a microcontroller with a wire such that the computer can sense when someone touches the water. There are so many possibilities with capacitive touch. <\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Sonic creature: melodic harp circuit sculpture\" width=\"660\" height=\"371\" src=\"https:\/\/www.youtube.com\/embed\/sqhyhH7Hu3Y?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<div style=\"height:49px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">A couple of microcontrollers have a bit of circuitry connected to some of their pins that makes them set up for capacitance sensing. The Teensy 3.X series were my favourite microcontrollers for touch applications because of this feature. That said, we can use a simple, cheap stand-alone capacitance module to add touch sensing to any digital input. Here are three different touch sensor modules that do pretty much the same thing:<\/p>\n\n\n\n<div style=\"height:36px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-media-text is-stacked-on-mobile\" style=\"grid-template-columns:15% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"782\" height=\"986\" src=\"https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/Screenshot-2025-10-22-at-1.48.20-AM.png\" alt=\"\" class=\"wp-image-828 size-full\" srcset=\"https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/Screenshot-2025-10-22-at-1.48.20-AM.png 782w, https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/Screenshot-2025-10-22-at-1.48.20-AM-238x300.png 238w, https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/Screenshot-2025-10-22-at-1.48.20-AM-768x968.png 768w\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"wp-block-paragraph\">Adafruit&#8217;s touch boards (<a href=\"https:\/\/www.adafruit.com\/product\/1374\">momentary<\/a> and <a href=\"https:\/\/www.adafruit.com\/product\/1375\">toggle<\/a>) are wonderful. They both let you connect an LED that lights up when the board detects touch (useful as an indicator). They also have a connection point for attaching wire and other materials. <a href=\"http:\/\/Sparkfun has a similar board\">Sparkfun<\/a> has a similar board. These are not the cheapest options. <\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-media-text is-stacked-on-mobile\" style=\"grid-template-columns:15% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"449\" height=\"541\" src=\"http:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/capacitive-touch-switch-ttp223b-e1761123423170.jpg\" alt=\"\" class=\"wp-image-829 size-full\" srcset=\"https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/capacitive-touch-switch-ttp223b-e1761123423170.jpg 449w, https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/capacitive-touch-switch-ttp223b-e1761123423170-249x300.jpg 249w\" sizes=\"auto, (max-width: 449px) 100vw, 449px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/leeselectronic.com\/en\/product\/425835-capacitive-touch-switch-ttp223b.html\">These generic modules<\/a> are similar to the Adafruit and Sparkfun modules, but without the dedicated LED pin (there is an on-board led). A bit cheaper, and great for most cases.<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-media-text is-stacked-on-mobile\" style=\"grid-template-columns:15% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"414\" height=\"532\" src=\"https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/41Ymnej7FnL.jpg\" alt=\"\" class=\"wp-image-830 size-full\" srcset=\"https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/41Ymnej7FnL.jpg 414w, https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/41Ymnej7FnL-233x300.jpg 233w\" sizes=\"auto, (max-width: 414px) 100vw, 414px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.amazon.ca\/WWZMDiB-TTP223-Capacitive-Calibration-2-5-5-5V\/dp\/B0BFZXP1D8\/ref=pd_bxgy_d_sccl_1\/133-3871024-2357052?pd_rd_w=MBfzm&amp;content-id=amzn1.sym.c59b76b3-4b10-4b0d-81a5-397453a3b786&amp;pf_rd_p=c59b76b3-4b10-4b0d-81a5-397453a3b786&amp;pf_rd_r=T3E7MF79WB6RN1H9T1VA&amp;pd_rd_wg=SGKWp&amp;pd_rd_r=23ead719-868c-4a63-9263-1bed071cbd35&amp;pd_rd_i=B0BFZXP1D8&amp;psc=1\">These modules<\/a> are the cheapest. They are small, they have an LED on the back, and they can be switched to work as a button or a toggle (by soldering 2 pads together). They are lower quality and produce a noisier signal, but they are still good.<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-media-text is-stacked-on-mobile\" style=\"grid-template-columns:15% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"937\" height=\"1024\" src=\"https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/Screenshot-2025-10-22-at-2.06.01-AM-937x1024.png\" alt=\"\" class=\"wp-image-831 size-full\" srcset=\"https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/Screenshot-2025-10-22-at-2.06.01-AM-937x1024.png 937w, https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/Screenshot-2025-10-22-at-2.06.01-AM-275x300.png 275w, https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/Screenshot-2025-10-22-at-2.06.01-AM-768x839.png 768w, https:\/\/bussigel.com\/sonicarts\/wp-content\/uploads\/2025\/10\/Screenshot-2025-10-22-at-2.06.01-AM.png 1036w\" sizes=\"auto, (max-width: 937px) 100vw, 937px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.adafruit.com\/product\/1362\">These Adafruit modules<\/a> let you connect up to 5 touch connections, very useful for projects with multiple touch connection points. <\/p>\n<\/div><\/div>\n\n\n\n<div style=\"height:43px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">connecting the modules<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For all of the above modules, you will need to connect to both the ground (GND) and power (VDD or VCC). Then connect the output pin to whatever pin on the arduino is set up as a digital input pin. <\/p>\n\n\n\n<div style=\"height:42px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">practical considerations<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Pad size: larger pad \u2192 more sensitivity. For fingertip detection, a few cm\u00b2 is common.<\/li>\n\n\n\n<li>Ground reference: keep a clean ground. A ground plane behind the pad (on a PCB or a nearby copper piece tied to GND) improves stability.<\/li>\n\n\n\n<li>Shielding: put a grounded ring around the pad to reduce false triggers.<\/li>\n\n\n\n<li>Noise: keep sensor wiring short and away from motors\/AC lines.<\/li>\n\n\n\n<li>Debounce \/ filtering: software debounce, moving average, median filters or simple thresholds can reduce chatter.<\/li>\n\n\n\n<li>Environmental changes: humidity and temperature affect sensitivity; use auto-calibration if possible.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Capacitance is the measure of a material&#8217;s ability to store electricity. Technically, Capacitance is a measure of how much electric charge something can store per unit of voltage. Think of a capacitor as a tiny rechargeable container for electric energy.It consists of two conductive plates separated by an insulator. When you apply voltage, positive charge &hellip; <a href=\"https:\/\/bussigel.com\/sonicarts\/sensing-capacitance\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Sensing Capacitance<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-814","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/bussigel.com\/sonicarts\/wp-json\/wp\/v2\/pages\/814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bussigel.com\/sonicarts\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bussigel.com\/sonicarts\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bussigel.com\/sonicarts\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bussigel.com\/sonicarts\/wp-json\/wp\/v2\/comments?post=814"}],"version-history":[{"count":10,"href":"https:\/\/bussigel.com\/sonicarts\/wp-json\/wp\/v2\/pages\/814\/revisions"}],"predecessor-version":[{"id":834,"href":"https:\/\/bussigel.com\/sonicarts\/wp-json\/wp\/v2\/pages\/814\/revisions\/834"}],"wp:attachment":[{"href":"https:\/\/bussigel.com\/sonicarts\/wp-json\/wp\/v2\/media?parent=814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}