久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 10496|回復: 8
打印 上一主題 下一主題
收起左側

51單片機HC-SR501人體感應模塊資料庫與代碼

  [復制鏈接]
跳轉到指定樓層
樓主
人體紅外感應實物圖:



單片機源程序如下:

  1. /*********************************************************************************************
  2. The name of the program: <Pyroelectric sensor module>     
  3. Date:  2012 04 09
  4. hardware:mcu(stc12c5a60s2),Operational Amplifier(lm324),Pyroelectric sensor module,etc
  5.                                                                
  6. /*********************************************************************************************/

  7. #include<stc12c5a60s2.h>  
  8. #define uchar unsigned char
  9. #define uint unsigned int
  10. /*********************************************************************************************/
  11. void Delay_us(unsigned int x)
  12. {
  13.         while(x--);
  14. }
  15. /*********************************************************************************************/
  16. void delay(int x)
  17. {
  18.         uchar i,j;
  19.         for(i=0;i<x;i++)
  20.                 for(j=0;j<110;j++);
  21. }
  22. /*********************************************************************************************/
  23. void ADC_one()       //Only channel P1.0
  24. {
  25.         P1ASF=0x1f;   
  26.         ADC_CONTR=0x00;
  27.         AUXR1=0x00;               
  28.         ADC_CONTR=0x80;
  29.         Delay_us(2);
  30.         ADC_CONTR=0x88;     
  31.         Delay_us(2);
  32.         while(ADC_CONTR==0x88);
  33.         ADC_CONTR=0;     
  34. }
  35. /*********************************************************************************************/

  36. void main()
  37. {       
  38.         while(1)
  39.         {
  40.                 float num=0;
  41.                 uint resl=0;
  42.                 ADC_one();            
  43.                 resl=ADC_RES;
  44.                 resl=(resl<<2)+ADC_RESL;
  45.                 num=resl/1024.0*5;   
  46.                 num=num*1000;

  47.                 if(num>2700)
  48.                 {
  49.                         P2=0XEF;//Light-emitting diode is lit
  50.                 }
  51.                 else
  52.                         P2=0XFF;        //Light-emitting diode is extinguished
  53.         }       
  54. }
  55. /*********************************************************************************************/
復制代碼

1 Piece HC-SR501 High Sensitivity Human Infrared Sensor Module Pyroelectric PCB
Article-Nr.:2802164
Product Details:
•  Human Infrared Sensor Module
•  Condition: New
•  :Product Feature:
Probe LHI778, high sensitivity
•  Technical parameters: 1.Operating voltage: DC5V to 20V
2.Static power consumption: 65 microamps
3.Level output: 3.3V, low 0V
4.Delay time: adjustable (0.3 seconds to 18 seconds)
5.Blockade Time: 0.2 seconds
6.Trigger Mode: L can not be repeated, H can be repeated default value H
7.Sensing range: less than 120 degree cone angle of less than 7 meters
8.Operating temperature: -15 to +70 degrees
9.PCB Dimensions: 32 * 24mm, screw hole distance 28mm, screw aperture 2mm sensor lens size: (diameter): 23mm (default)
•  Features: 1. automatic induction: when someone enters its sensing range input high, people leave the sensor range automatic delay off high. Output low

2. photosensitive control (optional): module is reserved for the location, you can set the photosensitive control, daytime or light sensing. The photosensitive Control optional features not installed at the factory photoresistor. If necessary, please purchase separately photoresistor install it yourself

3. two trigger modes: L can not be repeated, H can be repeated. Jumper selectable, default is H

A. not repeat the trigger mode: the sensor output high, the delay time has elapsed, the output automatically from high to low.
B. repeatable trigger mode: the sensor output high, the delay period, if human activities within its sensing range, the output will always remain high until people leave only delay the high level goes low (sensor module detected after every activity of the body's automatic postponed a delay period of time, and the last time activities as the starting point of the delay time)

4. induced blockade time (default setting: 0.2 seconds): sensing module in every sensor output (high to low) followed by set up a blockade of the time, in this period of time the sensor is not receiving any induction signal. This feature can be achieved both of the (inductive output time and the blocking time) interval can be applied to the interval detection products; This feature can effectively suppress the various interference generated in the process of load switching

5. wide operating voltage range: default Voltage DC5V to 20V

6. micro-power: quiescent current of 65 microamps, particularly suitable for battery- powered electrical products

7. output high signal: easy to achieve docking with the various types of circuits
•  Instructions for use:
1. Sensing module is powered initialization time of about one minute, during which the module will output 0-3 times the interval, one minute after entering standby
2. Should avoid lights and other sources of interference the a close direct module surface of the lens, in order to avoid the introduction of the interference signal malfunction; using the environment as much as possible to avoid the flow of the wind, the wind will cause interference sensor
3. Sensing module uses dual probe, the probe window is rectangular, dual (A $ B $) in the long direction at both ends, from left to right or from right to left when the body is walked by infrared spectroscopy reach the dual time, distance difference, the greater the difference, the more sensitive the induction, when the human body from the front to the probe or from top to bottom or from the bottom to the previous direction came dual detection distance of less than infrared spectroscopy, no difference value, the sensor should be installed up to the direction of the probe dual direction with human activities as parallel as possible to ensure that the human body has been passed by the probe dual induction sensor insensitive or does not work; Round lens in order to increase the sensing range of angles, the module also makes the probe surrounded induction, but the left and right sides still up and down both directions sensing range and sensitivity, still need to try to install the above requirements
•  Color: show as pictures
PLS NOTE that due to lighting effects, monitor's brightness / contrast settings etc, it could be some minor differences in the hue of the images and the actual item


所有資料51hei提供下載:
HC-SR501人體感應模塊.rar (2.62 MB, 下載次數: 208)



分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏2 分享淘帖 頂 踩1
回復

使用道具 舉報

沙發
ID:256517 發表于 2019-3-13 19:39 | 只看該作者
很不錯的資源
回復

使用道具 舉報

板凳
ID:256517 發表于 2019-3-13 19:40 | 只看該作者
很不錯的帖子,謝謝
回復

使用道具 舉報

地板
ID:524170 發表于 2019-4-29 08:34 | 只看該作者
很不錯的帖子,謝謝
回復

使用道具 舉報

5#
ID:349854 發表于 2019-6-22 10:01 | 只看該作者
感謝po主,正好需要
回復

使用道具 舉報

6#
ID:634955 發表于 2019-11-21 14:44 | 只看該作者
有沒有at89x52的程序和仿真
回復

使用道具 舉報

7#
ID:638921 發表于 2019-11-29 21:53 | 只看該作者
可以教教我51單片機與HC-SR501之間怎么連接嗎
回復

使用道具 舉報

8#
ID:356967 發表于 2022-9-20 11:26 | 只看該作者
這不某一個寶給的資料嗎?我還以為是51的
回復

使用道具 舉報

9#
ID:1064915 發表于 2023-9-27 09:34 | 只看該作者
       ADC_RES和ADC_RESL是用于保存A/D轉換結果的寄存器,當AUXR1=0x00時,轉換結果的高八位存于ADC_RES,低二位存于ADC_RESL;當AUXR1=0x04時,轉換結果的高八位存ADC_RESL,低二位存于ADC_RES;
      取十位完整結果:
      
      其中Vcc為單片機的供電電壓,Vin為輸入電壓;
     

回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 古装三级在线播放 | 麻豆精品国产91久久久久久 | 精品欧美一区二区精品久久久 | 亚洲成av人片在线观看无码 | 精品亚洲一区二区 | 成人免费激情视频 | 久久99精品久久久97夜夜嗨 | 99re在线视频观看 | 日韩久久久久久 | 亚洲午夜精品视频 | 在线观看中文字幕亚洲 | 国产有码 | 97精品超碰一区二区三区 | 干干干操操操 | 日韩免费在线观看视频 | 手机看黄av免费网址 | 国产精品一区二区日韩 | 国产精品久久久久久一区二区三区 | 久色| 国产一区欧美 | 免费超碰 | 欧美成人一区二区 | 91福利影院| 中文字幕日韩一区 | 久久一二区 | 久在线观看 | 午夜精品久久久久久久久久久久久 | 精品久久香蕉国产线看观看亚洲 | 日韩在线欧美 | 国产最新视频在线 | 亚洲精品电影网在线观看 | 四虎影视一区二区 | 亚洲精品在线观看网站 | 在线观看国产视频 | 国产精品一二三区 | 亚洲欧美日韩久久 | 激情五月婷婷丁香 | 国产真实乱全部视频 | 精品一区二区电影 | 亚洲电影在线播放 | 成人福利电影 |