简介:
风速传感器现被广泛运用于物联网项目中,该传感器输出模拟电压值,配合arduino的驱动,使测量风速变得更加简单。同时风速传感器可连续监测地点的风速风量大小,能够对所处巷道的风速风量进行实时显示,是矿井通风安全参数测量的重要仪表。
参数:
输入电压:7~24V DC
输出信号:0.4~2V
风向值=(输出电压-0.4)/16*360
输出电压上升0.1V对应风向顺时针转移一个方向
接口定义:
1:VCC(褐色)
2:GND(黑色)
3:信号(蓝色)
4:无连接
特点:
- 体积小,重量轻,野外携带安装方便,防水
- 防震结构设计,可在野外全天候使用
- 检测精度高,系统采用低功耗环保节能设计,数字处理技术
- 量程宽,稳定性好
- 数据信息显示线性度好,信号传输距离长,抗外界干扰能力强
应用范围
广泛用于环保、气象、农业、林业、水利、建筑、科研及教学领域
Arduino驱动示例
/*************www.openjumper.cn**************/ /*************Winddirection test**************/ char* dirstring[16] = {"North","North1","Northeasterly","Northeasterly1","East","East1","Southeast","Southeast1","South","South1","Southwest","Southwest1","West","West1","Northwest","Northwest1"}; void setup() { Serial.begin(9600); } void loop() { int sensorValue = analogRead(A0); float value = sensorValue * (5.0 / 1024.0); //Serial.println(value); int winddirection =( value *10) ; winddirection = winddirection - 4 ; Serial.println(winddirection); // if(winddirection < 0) // winddirection = 0; // if(winddirection > 15) // winddirection = 15; Serial.print("winddirection is "); if(winddirection == 0 || winddirection == 15 ) { Serial.println( dirstring[0] );} else { Serial.println( dirstring[winddirection] );} delay(500); }