电子发烧友App

硬声App

0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示
电子发烧友网>电子资料下载>电子资料>使用LM35温度传感器监测食品行业冷库的温度

使用LM35温度传感器监测食品行业冷库的温度

2022-11-23 | zip | 0.14 MB | 次下载 | 免费

资料介绍

描述

本项目将使用LM35温度传感器监测食品行业冷库的温度。冷藏单元的预定义阈值温度值由操作员设置。在 PyCharm 软件的帮助下,当前值显示在监视器上。如果超过阈值温度,则会通过 Twilio 向用户发送 SMS 警报以及存储单元的当前温度读数值。此外,LED 的点亮和蜂鸣器发出的蜂鸣声提醒周围的人员或操作员。温度传感器发送的数据存储在 Bolt Cloud 中,这有助于使用机器学习随时间进行温度预测。Z-Score 分析有助于检测温度的任何突然变化。

电路连接

1 、LM 35温度传感器是本项目的主要单元。LM35 传感器为 A0 引脚提供模拟输入。Bolt 内置了模数转换器 (ADC),可将此模拟值转换为数字值。然后这个数字值被发送到 Bolt Cloud。

握住 LM35 传感器,使传感器上写有 LM35 文字的平面朝向您。在此配置中,左侧引脚VCC 中间引脚V 输出右侧引脚接地引脚

连接面包板上的 LM35 传感器。公头/公头跳线用于将 VCC 连接到 Bolt wifi 模块的5V 引脚,V 输出连接到A0 引脚,将 LM35 的接地引脚连接到 Bolt wifi 模块的接地引脚 (GND)

2. LED 的短腿连接到面包板上的GND 引脚,而较长的腿连接到串联的 330ohm 电阻的一端。电阻的另一端使用公/公跳线连接到GPIO (通用输入/输出)引脚 1 。

3. Buzzer长短脚分别通过公/公跳线连接到GPIO 引脚 4GND 引脚。

4.最后,使用 USB-A 转 Micro-USB 电缆将 Bolt wifi 模块连接到笔记本电脑/个人电脑/充电器,以便通电。

 
 
 
pYYBAGN7IQSAWRrEAAAU5WCR2SY073.png
 
1 / 2Bolt Wifi 模块和电路
 

设备

 
 
 
poYBAGN7IQeAOx9TAAAiboh0FLg178.png
 
1 / 5LM 35 传感器
 

完整的电路

 
 
 
poYBAGN7IQqAImM1AAVndS5pt7M384.jpg
 
1 / 4
 

 

设置 ProductOnBolt Cloud

1.设置 Bolt wifi 模块。

2.在这里,您将找到您的 Bolt API 密钥和 Bolt 设备 ID。保存。

3.转到 PRODUCTS 并制作一个新产品,为其命名并选择如下所示的选项,然后单击 DONE。

pYYBAGN7IRKAYKhMAAB9E-HlW1g742.png
 

4.进入配置,然后设置硬件并编写预测温度的代码,然后保存。

poYBAGN7IRSAOtlgAACzr2SFCzw983.png
 
poYBAGN7IReAQsZQAACJ4JMTOow469.png
 

5.产品链接到设备并部署配置。

poYBAGN7IRmAaf5TAABLx4aXLIU758.png
 

制作 TWILIO 帐户

Twilio 是第三方 SMS 功能提供商。它是一家云通信平台即服务 (PaaS) 公司Twilio 允许软件开发人员以编程方式拨打和接听电话,还可以使用其 Web 服务 API 发送和接收文本消息。

1.使用您的邮件 ID 和页面上提供的其他详细信息进行注册。然后 Twilio 将在您的邮件 ID 上发送一封验证邮件,该邮件必须经过验证。

 
 
 
pYYBAGN7IR6AO_oUAABhFUVWtf4774.png
 
1 / 2
 

2.然后提供将发送 OTP 的手机号码进行验证。

 
 
 
pYYBAGN7ISGAKGi5AABHQNQ6oyM692.png
 
1 / 2
 

现在,您已入职。回答几个问题,如下所示。

3.对于编码,选择“是”。然后选择您喜欢的编码语言。我选择 Python对于目标,选择“在项目中使用 Twilio”。对于消息传递,请从下面给出的选项中进行选择。我为我的项目选择了SMS

 
 
 
poYBAGN7ISWARNiOAAA5VRNjmLs132.png
 
1 / 4
 

4.现在,转到 Twilio Dashboard 并选择将提供试用号的选项。选择那个号码。该号码将与您联系。

 
 
 
pYYBAGN7ISeACq_KAACHIdex6EI111.png
 
1 / 2
 

5.最后,您将在 Twilio Dashboard 上获得您的 Account SID、Auth Token、您的手机号码和试用号。保存。

pYYBAGN7ISyAVuXIAACkV-luYXc561.png
 

下载并安装 PYCHARM

PyCharm is an integrated development environment (IDE) used in computer programming, specifically for the Python language. It is developed by the Czech company JetBrains.It provides code analysis, a graphical debugger, etc. and supports Data Science with Anaconda. PyCharm is cross-platform, with Windows, macOS and Linux versions.

1. Download PyCharm by visiting http://www.jetbrains.com/pycharm/ and click DOWNLOAD (shown in black). Then select the type of OS you have and then download either OPEN SOURCE (COMMUNITY) which is completely free or PROFESSIONAL which is for free trail. I took open source. Then click Download button and wait for it to download.

 
 
 
poYBAGN7IS6AFjYvAADA3q8S8vs758.png
 
1 / 2
 

2. When it gets downloaded. Double click the file stored on your computer. Then follow the steps shown in the images below to install PyCharm.

3. Click NEXT. Select the folder where you want to install PyCharm. Select 64 bit launcher. Create a folder with name 'JetBrains'. Wait for PyCharm to install.

 
 
 
poYBAGN7ITGAUUfBAADK8IF4WKQ640.png
 
1 / 5
 

4. Click FINISH once installed. Click OK for 'Do not import settings'. Accept the terms and con5.ditions shown. Finally, click on 'Don't send'.

 
 
 
pYYBAGN7ITOAIh1TAADCO1L8cuw494.png
 
1 / 4
 

5. Now, open PyCharm. Select the screen colour DARCULA or INTELLIJ. Skip the next step (If you want, you can install UI themes as also). Then, wait for PyCharm to load. Then select the option CreateNewProject. Then give a name to your project. Make a new file as shown below and name it. Then you can start with your coding.

 
 
 
pYYBAGN7ITWAag8HAAFLRfNNtZI202.png
 
1 / 6
 

THEORY

Z-SCORE ANALYSIS

Z-scoreanalysis is used for anomaly detection i.e. anything outside of normal. When temperature increases or decreases suddenly, it is called anomaly and Z-score analysis detects this. Upper and lower bounds are found out using multiplication factor, frame size and input values from LM 35 sensor.

poYBAGN7ITqAVxXXAAAfxGnUmf0125.png
 

Mn is the mean of input data collected. Vi is the variance, r is the frame size i.e. number of input data points collected. I have collected 5 data points. C is the multiplication factor which is taken as 3 in my project. Tn gives the upper and lower threshold depending on + and - respectively in the formula shown.

WORKING

LM 35 sensor collects data every 5 minutes and sends it to Bolt Cloud.

I placed the setup in open for getting normal temperature. Then I put the setup in cold area quickly so that temperature decreases suddenly.

Then again, I placed the setup in open for normal temperature. Then, I took the setup in a hot area quickly so that temperature rise is quick.

The code checks if the temperature is within threshold limits or not by using data from LM 35 sensor. If it isn't in the limits, then Twilio sends the message on our mobile regarding threshold getting crossed.

The code also checks if there is sudden change in temperature (increase or decrease) beyond the upper and lower bounds. If there is, then Twilio sends the message on our mobile regarding sudden change in temperature.

Prediction graphs gets plotted using data from LM35 sensor to predict temperature in near future using machine learning. Sudden changes were made to temperature values to see the affect on the prediction.

The detailed explanation of code is given along with the code itself.

PREDICTIONGRAPH

poYBAGN7ITyAcCKhAACm8WLbUh8382.png
 

PredictedPoints shows number of future data points of temperature taht need to be predicted. No. of Polynomial Coefficients (value of n) indicates how many coefficients or elements should be present in the function. Number of polynomial coefficients decide the nature of predict history graph (shown in red). This graph gets plotted based on the nature of actual graph (shown in blue) and no. of polynomial coefficients. It helps to tune the machine learning model. Frame size indicates how many points on actual graph should be taken into consideration for plotting predict history graph. Predicted Graph (shown in blue) shows the value and nature of future data points and graphs respectively. The 3 parameters shown in the figure have to changed and set such that predicted data most closely imitates the actual data. This lead to future data being most accurate.

pYYBAGN7IT-AZXAEAAAhzQyI9pA187.png
No, of Polynomial Coefficients
 

OUTPUT

CodedOutputRegardingThresholdCrossing and Sudden Decrease in Temperature

 
 
 
poYBAGN7IUiAAnL2AAFEiOyv8rM564.png
 
1 / 2
 

MessageRegardingThresholdCrossing and Sudden Decrease in Temperature

pYYBAGN7IUuADTpQAAKAeJqLgRs175.jpg
 

CodedOutputRegardingThresholdCrossing and Sudden Increase in Temperature

 
 
 
poYBAGN7IU2AfBTxAAGYHVyn5Qs783.png
 
1 / 3
 

MessageRegardingThresholdCrossing and Sudden Decrease in Temperature

pYYBAGN7IVGALwbYAAKcMcEtyqs340.jpg
 

 


下载该资料的人也在下载 下载该资料的人还在阅读
更多 >

评论

查看更多

下载排行

本周

  1. 1山景DSP芯片AP8248A2数据手册
  2. 1.06 MB  |  532次下载  |  免费
  3. 2RK3399完整板原理图(支持平板,盒子VR)
  4. 3.28 MB  |  339次下载  |  免费
  5. 3TC358743XBG评估板参考手册
  6. 1.36 MB  |  330次下载  |  免费
  7. 4DFM软件使用教程
  8. 0.84 MB  |  295次下载  |  免费
  9. 5元宇宙深度解析—未来的未来-风口还是泡沫
  10. 6.40 MB  |  227次下载  |  免费
  11. 6迪文DGUS开发指南
  12. 31.67 MB  |  194次下载  |  免费
  13. 7元宇宙底层硬件系列报告
  14. 13.42 MB  |  182次下载  |  免费
  15. 8FP5207XR-G1中文应用手册
  16. 1.09 MB  |  178次下载  |  免费

本月

  1. 1OrCAD10.5下载OrCAD10.5中文版软件
  2. 0.00 MB  |  234315次下载  |  免费
  3. 2555集成电路应用800例(新编版)
  4. 0.00 MB  |  33566次下载  |  免费
  5. 3接口电路图大全
  6. 未知  |  30323次下载  |  免费
  7. 4开关电源设计实例指南
  8. 未知  |  21549次下载  |  免费
  9. 5电气工程师手册免费下载(新编第二版pdf电子书)
  10. 0.00 MB  |  15349次下载  |  免费
  11. 6数字电路基础pdf(下载)
  12. 未知  |  13750次下载  |  免费
  13. 7电子制作实例集锦 下载
  14. 未知  |  8113次下载  |  免费
  15. 8《LED驱动电路设计》 温德尔著
  16. 0.00 MB  |  6656次下载  |  免费

总榜

  1. 1matlab软件下载入口
  2. 未知  |  935054次下载  |  免费
  3. 2protel99se软件下载(可英文版转中文版)
  4. 78.1 MB  |  537798次下载  |  免费
  5. 3MATLAB 7.1 下载 (含软件介绍)
  6. 未知  |  420027次下载  |  免费
  7. 4OrCAD10.5下载OrCAD10.5中文版软件
  8. 0.00 MB  |  234315次下载  |  免费
  9. 5Altium DXP2002下载入口
  10. 未知  |  233046次下载  |  免费
  11. 6电路仿真软件multisim 10.0免费下载
  12. 340992  |  191187次下载  |  免费
  13. 7十天学会AVR单片机与C语言视频教程 下载
  14. 158M  |  183279次下载  |  免费
  15. 8proe5.0野火版下载(中文版免费下载)
  16. 未知  |  138040次下载  |  免费