2019-7-17 15:28:02 [显示全部楼层]
2358浏览
查看: 2358|回复: 2

[项目] 给微波传感器加上警报

[复制链接]
本帖最后由 gada888 于 2019-7-17 15:59 编辑

微波传感器传输稳定,能穿越一些材质。用处很大,只是个人在试用中需要一个声音的提醒,以便更有效率的测量物体。项目里加了5个不同频率的音频来替代本准备使用的单调音频。///////////////////////////
项目使用的模块如下:

给微波传感器加上警报图7
Arduino nano
给微波传感器加上警报图5
Microwave sensor微波传感器模块

给微波传感器加上警报图4
带功放喇叭模块Speaker
////////////////////////////////////////////////////////
主模块产品概述:
概述
微波运动传感器是利用多普勒雷达原理设计的微波移动物体探测器。不同于一般的红外探测器,微波传感器通过通过检测物体反射的微波来探测物体的运动状
况,检测对象将并不会局限于人体,还有很多其他的事物。微波传感器不受环境温度的影响,探测距离远,灵敏度高,被广泛应用于工业、交通及民用装置
中,如车辆测速、自动门、感应灯、倒车雷达等。
由于微波传感器检测对象存在普遍性,在实际的生活应用中,会搭配另一个传感器来做针对性的检测。如微波传感器+红外热释电传感器,能够有效的判断是
否有人经过,不会被阳光,被衣物颜色所干扰,也不会对其他物体产生反应。
特性
这种探测方式与其它探测方式相比具有如下的优点:
1. 非接触探测;
2. 不受温度、湿度、噪声、气流、尘埃、光线等影响,适合恶劣环境;
3. 抗射频干扰能力强;
4. 输出功率小,对人体构不成危害;
5. 探测距离远;
6. 支持对非生命类物体的检测
7. 微波的方向性很好,速度等于光速;
产品参数
工作电压 : 5V±0.25V
工作电流(CW): 60mA max., 37mA typical
尺寸: 48.5x63mm
发射参数:
探测距离: 2-16m连续可调(最小范围2m,最大范围16m)
发射频率 : 10.525 GHz
频率设置精度 : 3MHz
输出功率(最小): 13dBm EIRP
谐波发射: <-10dBm
平均电流 (5%DC) : 2mA typ.
脉冲宽度(Min.): 5uSec
负载循环(Min.): 1%
接收参数:
灵敏度(10dB S/N ratio)3Hz至80Hz 带宽: -86dBm
3Hz至80Hz带宽杂波 10uV
====================================
给微波传感器加上警报图2
写的测试代码
给微波传感器加上警报图1
[mw_shl_code=applescript,true]#include <MsTimer2.h>           //Timer interrupt function
int pbIn = 0;                   // Define the interrupt PIN is 0, that is, digital pins 2
int ledOut = 13;         
int piezoPin = 8;      
int count=0;                    
volatile int state = LOW;       //Define ledOut, default is off
int pitches[] = {523, 587, 659, 698, 784};
int numPitches = 5;
void setup()
{      
     Serial.begin(9600);         
     pinMode(ledOut, OUTPUT);
     pinMode(piezoPin, OUTPUT);
     attachInterrupt(pbIn, stateChange, FALLING); // Sets the interrupt function, falling edge triggered interrupts.
     MsTimer2::set(1000,process); // Set the timer interrupt time 1000ms
     MsTimer2::start();//Timer interrupt start

}

void loop()                     
{
    Serial.println(count); // Printing times of 1000ms suspension
    delay(1);        
    if(state == HIGH)  //When moving objects are detected later, 2s shut down automatically after the ledout light is convenient.
  {
    delay(2000);
    state = LOW;
    digitalWrite(ledOut, state);    //Turn off led
    int i;
   for( i=0; i<numPitches; i++){
   tone(piezoPin, pitches, 200);
   delay(210);
   }
  }

}


void stateChange()  //Interrupt function
{  
  count++;  

}

void process()   //Timer handler
{
  if(count>1)  //1000ms interrupt number greater than 1 is considered detected a moving object (this value can be adjusted according to the actual situation, equivalent to adjust the detection threshold of the speed of a moving object)
       {
                   state = HIGH;            
                   digitalWrite(ledOut, state);    //Lighting led
                   count=0;   //Count zero
  
       }
        else
            count=0;   //In 1000ms, interrupts does not reach set threshold value is considered not detect moving objects, interrupt the count number is cleared to zero.  
}
[/mw_shl_code]
===================
给微波传感器加上警报图6
连线图
给微波传感器加上警报图3

pATAq  版主

发表于 2019-7-17 22:00:43

支持一下!
回复

使用道具 举报

ASH腻  管理员

发表于 2019-7-18 17:17:41

实测感觉怎么样 准吗
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail