完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
亲爱的所有人,在我试图找到一个简单而可靠的方法来实现一个“触摸”控制通过一个8位PIC我绊倒以下:我删除了输入从我现有的ADC输入端口(电位器),只留下附加10厘米的电线。当测量输入引脚上的电压(不是通过ADC而是通过电压表外部)时,我得到如下结果。当我不接触导线时,在ADC输入引脚上得到0,5伏,当接触导线的末端时,引脚上的电压下降到0,1伏。我首先给连接的电线加上一个5M6电阻,后来我的灯的金属部分和效果保持完全相同。这是一个单一事件(例如,在一个错误的测试板上的泄漏电流)还是有一个合理的方式来解释为什么会发生这种情况。如果这是一个100%可重复的效果,它将是通过设备的导电部分实现触摸功能的最简单的方式,因为它应该是没有问题的。通过ADC读出电压DROPP。无论是关于PIC的架构还是在这个设置背后的电子规则,任何反馈都是受欢迎的(实际上我会说,通过触摸电线,我添加了一个接地连接,因此电压下降。但是为什么一开始就有电压呢?当我开始测试时,我的第一个错误是检查我是否能在触摸电线时确保引脚上的电压增加,并惊奇地发现了相反的效果……)
以上来自于百度翻译 以下为原文 Dear all, During my attempt to find a easy and reliable way to implement a "touch" controll via a 8 Bit PIC I stumbled over the following: I removed the input from my existing ADC input port (a potentiometer), leaving only attached 10 cm of wire. When meassuring the voltage on the input pin (not via ADC but external via voltmeter) I got the following results. When I do not touch the wire, I get 0,5 Volt on the ADC input pin, when touching the end of the wire the voltage on the pin dropps to 0,1 Volt. I first added a 5M6 resistor to the connected wire and later the metal parts of my lamp and the effect stayed exactly the same. Is this some single event (e.g. by leak currents on a faulty test board) or is there a reasonable way to explain why this would happen. If this is a 100% reproducable effect it would be the most easy way to implement a touch function via a conducting part of the device as it should be no problem to readout the voltage dropp via the ADC. Any feedback, both regarding the architecture of the pic or the electronical rules behind this setup are welcome (actually I would say by touching the wire I add a ground connection and therefore the voltage dropps ... but why is there any Voltage in the first place? My initial idia when starting the tests was to check if I can meassure a voltage increase on the pin when touching the wire and was surprised by finding this opposite effect...) best regards Michael |
|
相关推荐
4个回答
|
|
建议的方法是CTMU,它工作得相当好:有点复杂,但有代码可用。它可以在电容上工作。你所测量的是有意义的,你也可以使用它:但是把手指放在输入PIC的引脚上通常会发出50Hz的信号,所以…你应该寻找这样的波形(或多或少精确)。某种类型的上拉或下拉是有意义的,按照兆欧的顺序,是的。
以上来自于百度翻译 以下为原文 The adviced method is CTMU and it does work fairly well: just a bit complicated, but there is code available. And it works on capacitance. What you measured makes some sense, and you could also use it possibly: but putting a finger on an input PIC's pin usually delivers 50Hz signal to it so... you should look for such a waveform (more or less precisely). Some kind of pullup or pulldown makes sense, in the order of megaohms, yes. |
|
|
|
嗨,达里奥,谢谢你的反馈…上周我用CTMU编写了一个工作解决方案…直到发现这是不支持我们目前的8位控制器PIC16F1825。在那里我必须使用CPS代替…从昨天看我的另一个论坛条目,所以如果我得到CPS并且跑得快,那就没事了。但如果不是,我想知道这种ADC行为是否是一个很好的工作。
以上来自于百度翻译 以下为原文 Hi Dario, Thanks for your feedback ... I have programmed a working solution using CTMU last week ... until finding out that this is not supported by our current 8 bit controller PIC16F1825. There I have to use CPS instead... see my other forum entry from yesterday. So if I get CPS up and running fast it would be fine. But if not I wonder if this ADC behaviour is a good workaround best regards Michael |
|
|
|
我怀疑它会在不同的房间,不同的湿度和不同的人得到不同的结果。
以上来自于百度翻译 以下为原文 I suspect it will give different results in different rooms, with different humidity levels and different people. i.e. it might work sometime, but not always. |
|
|
|
我不确定CPS,从来没有处理过……50Hz的检测方法可能是足够好的,我会说…
以上来自于百度翻译 以下为原文 I am not sure about CPS, never dealt with it... The 50Hz detection method may be good enough, I'd say... |
|
|
|
只有小组成员才能发言,加入小组>>
5217 浏览 9 评论
2020 浏览 8 评论
1944 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3194 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2247 浏览 5 评论
766浏览 1评论
653浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
575浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
664浏览 0评论
563浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-13 20:57 , Processed in 1.218963 second(s), Total 55, Slave 48 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号