当前位置:网站首页>Arduino uno realizes simple touch switch through direct detection of capacitance
Arduino uno realizes simple touch switch through direct detection of capacitance
2022-06-28 00:17:00 【perseverance52】
Arduino The simple touch switch is realized through the direct detection of capacitance

Arduino In addition to receiving digital signals from digital ports , The only analog physical quantity that can be detected is voltage . The detection value of any analog sensor is almost converted into voltage value through relevant circuit , Then input its analog port for analog-to-digital conversion . Capacitance values require relatively more complex and expensive circuits to be converted into voltage values , Can be Arduino testing , And the detection of many physical processes , Can be easily and reliably realized by detecting the capacitance value .
Implementation method
Set a digital port to low potential , And open arduino The internal pull-up resistance of , Start to calculate the time required for this port to reach the high potential . And this time is related to the ground capacitance of this port , The greater the capacitance , The longer the time . On the hardware, you only need to connect a wire to one port . Touch the exposed end of this wire with your finger , Will cause capacitance change ,arduino This change can be detected by the above method . If you want to increase sensitivity , You can attach a piece of tin foil to the wire . To prevent you from having a strong static electric shock to puncture the chip , You can cover the tin foil with a thin layer of paper .
Sample code
No need for third-party libraries
// readCapacitivePin
// Input :Arduino pin number边栏推荐
- RNA-seq入门实战(一):上游数据下载、格式转化和质控清洗
- ASP. Net warehouse purchase, sales and inventory ERP management system source code ERP applet source code
- Zero foundation self-study SQL course | complete collection of SQL basic functions
- TIME_ Solutions to excessive wait
- Smart wind power | Tupu software digital twin wind turbine equipment, 3D visual intelligent operation and maintenance
- Learning notes for qstringlist
- C language - date formatting [easy to understand]
- [untitled]
- 炼金术(1): 识别项目开发中的ProtoType、Demo、MVP
- Instructions for vivado FFT IP
猜你喜欢

Smart wind power | Tupu software digital twin wind turbine equipment, 3D visual intelligent operation and maintenance
![[paper reading | deep reading] sdne:structural deep network embedding](/img/6a/b2edf326f6e7ded83deb77219654aa.png)
[paper reading | deep reading] sdne:structural deep network embedding

Safe, fuel-efficient and environment-friendly camel AGM start stop battery is full of charm

A summer party

一文剖析C语言函数

Promise是什么

吴恩达《机器学习》课程总结(14)_降维
Does the subscription of Siyuan notes stop deleting cloud data directly?

数仓的字符截取三胞胎:substrb、substr、substring

吴恩达《机器学习》课程总结(13)_聚类
随机推荐
数仓的字符截取三胞胎:substrb、substr、substring
十大券商注册账户安全吗,会有风险吗?
[microservices sentinel] sentinel data persistence
技术的极限(11): 有趣的编程
MongoDB-在windows电脑本地安装一个mongodb的数据库
[AI application] detailed parameters of NVIDIA geforce RTX 1080ti
logging日志的使用
How to find Chinese documents corresponding to foreign documents?
ASP. Net warehouse purchase, sales and inventory ERP management system source code ERP applet source code
[PCL self study: pclplotter] pclplotter draws data analysis chart
零基础自学SQL课程 | IF函数
认识微信小程序项目的基本组成结构
Alchemy (9): simple but not simple, never-ending test -- always_ run
安全省油环保 骆驼AGM启停电池魅力十足
Request object, response object, session object
[AI application] detailed parameters of NVIDIA Tesla v100-pcie-32gb
Deployment and test of crtmp live video server
N methods for obtaining effective length of genes
QStringList 的学习笔记
代码整洁之道--格式