Arduino动手做(10)敲击传感器模块

网友投稿 2019-09-10 12:30

Arduino动手做(1)干簧管传感器模块
Arduino动手做(2)光敏电阻模块
Arduino动手做(3)微波雷达感应模块

Arduino动手做(4)振动传感器模块

Arduino动手做(5)热敏电阻温度传感器模块

Arduino动手做(6)声音传感器模块

Arduino动手做(7)旋转电位器模块

Arduino动手做(8)湿度传感器模块

Arduino动手做(9)火焰传感器模块

实验之十:敲击传感器模块(KY-031 )

有机玻璃外壳的敲击头和振动开关类似,只是能感受较小振幅的振动,更灵敏一些,余振的时间能维持稍微久一点点。这个模块简单些,相关资料非常少。

https://cdn.china-scratch.com/timg/190912/1230153205-0.jpg

https://cdn.china-scratch.com/timg/190912/1230155107-1.jpg

模块参数
1、工作电压:3.3V-5V(DC)
2、模块接口:3PIN
3、输出信号:数字开关信号

https://cdn.china-scratch.com/timg/190912/1230155349-2.jpg

https://cdn.china-scratch.com/timg/190912/1230155039-3.jpg

模块接线
1、GND  接电源负极(板示-)
2、VCC  接电源正极3.3-5V
3、DO   TTL开关信号输出(板示S)

https://cdn.china-scratch.com/timg/190912/12301B962-4.jpg

https://cdn.china-scratch.com/timg/190912/1230164321-5.jpg

https://cdn.china-scratch.com/timg/190912/1230164103-6.jpg

https://cdn.china-scratch.com/timg/190912/12301I503-7.jpg

https://cdn.china-scratch.com/timg/190912/12301M045-8.jpg

https://cdn.china-scratch.com/timg/190912/12301GR4-9.jpg

实验仿真示意图

https://cdn.china-scratch.com/timg/190912/12301T111-10.jpg

实验示意图

https://cdn.china-scratch.com/timg/190912/12301T234-11.jpg

实验说明
敲击传感器模块和数字13 接口自带LED 搭建简单电路,制作敲击闪光器。利用数字13 接口自带的LED,将敲击传感器接入数字3接口,当敲击传感器感测到有敲击信号时,LED 闪烁发光。

https://cdn.china-scratch.com/timg/190912/12301R452-12.jpg

/*【雕爷学编程】Arduino动手做(10)【Arduino】66种传感器模块系列实验之十:敲击传感器模块实验源代码*/void setup(){pinMode(3,INPUT);pinMode(13,OUTPUT);}void loop() {if (digitalRead(3)) {digitalWrite(13, HIGH);}else {digitalWrite(13, LOW);}} https://cdn.china-scratch.com/timg/190912/1230196341-13.jpghttps://cdn.china-scratch.com/timg/190912/1230195L1-14.jpghttps://cdn.china-scratch.com/timg/190912/1230193105-15.jpg

--end--

声明:本文章由网友投稿作为教育分享用途,如有侵权原作者可通过邮件及时和我们联系删除:freemanzk@qq.com