Skip to main content

Weight Saving in the Marine Environment

作者:田浩冬 黎祖林 周宇涛

指导教师:杨佳庆

项目介绍:

我们使用的平台或软件有:homeassant,Android studio,DesignSpark Mechanical和vtk等。快递公司随机生成带有特定字符串的二维码附加于快递上,快递员在上门前先通过APP查询家用快递箱内是否有快递,如果有,则先不派件,如果没有则上门派件。快递箱扫描快递上的二维码,得到字符串,通过与箱内存储的串联进行匹对,如果识别成功则自动为箱柜,如果识别失败,则不能打开。为防盗,已经识别通过的二维码再次识别将会显示失败。用户可登陆homeassantant,查看快递箱内是否有快递,并且可以打开箱门。为模拟现实生活情况,我们采用双层来实现快递箱门的关闭。

原理框图:

_2020-08-06_143003_4be202b93ab3f3885981780dcdfb8d10c3969fe1.png

具体步骤:

第一部分:项目背景

从舆情来看,消费者的诉求主要集中在两个方面:一是免费保管12小时不合理,没有顾及上班族的工作习惯;二是快递经常在有关同意的情况下被快递员放进丰巢快递柜,侵犯了消费者权益。基于这个现实问题我们组设计了“家用防盗快递箱”,并有效解决了以下痛点:1 ,不用跑到快递柜取件,接入快递员派件到门口; 2,规避了由于超时未取而产生的费用问题; 3,防止快递因错拿等情况出现丢失问题,促进了安全性。

1152_ec2e671093b77fd02201becf8063d5eeab30c0a0.png

2345_f2b7ba8dbe5d98dd584494f9b874f67a8fb2c67a.png

第二部分:核心代码介绍

APP:避免了“快递员白跑一趟”的情况发生,能够实时反映对应快递箱的放置状态,当快递员查询快递箱状态时,服务器端通过套接字发送箱子状态到客户端并在UI接口上进行显示,方便快递员判断箱子的状态

Homeassantant:通过读取check.txt文档里的内容,来实时更新“快递箱为空”,“您有新的快递!请及时取回”两种状态。如果是有快递的情况,则设置状态值给open.txt,以此控制箱门打开。

二维码读取和识别:为进行二维码的读取,本次项目采用了pyzbar库进行二维码识别。原本需安装在快递箱上的摄像头,用电脑摄像头替代,我们结合摄像头相关程序完成了一个电脑摄像头的二维码识别。

Vtk:建模时,快递箱主体和箱门分开,当识别正确的二维码或用户在HA上点击“打开箱门”时,箱门才能打开;关闭只能通过串行关闭。

第三部分:运行流程

Android Studio

1.apk.rar为工程压缩包。可直接下载app-debug.apk到手机使用。

2.APP将配合web_ha.py来进行合并络的APP控制python

3.web_ha.py中的IP地址需要修改。cmd输入ipconfig,找到最后面的无线适配器适配器wlan:修改为自己电脑里的IPv4地址。

家庭快递箱

1.快递箱模型,时刻模型导出box.stl以及door.stl两个文件。

2.二维码_makedemo.py为二维码生成程序,本次模拟使用的二维码为该程序生成。

3.二维码_recognition.py使用摄像头进行二维码扫描。

3.box.py VTK控制模型程序

4.chuankou.py模拟手动关门,此次项目使用串口进行模拟。

5.Web_ha.py初始化络连接APP的程序。

注:hello.png为错误二维码,相当于不属于该用户的快递; verify.png以及verify_new.png允许该用户所购买的快递件上的二维码。

家庭辅助配置

1.hachina6_package.py为homeassistion中位于custom_components内部的配置文件。

注意:需要在该文件夹下创建package_send.txt,open.txt,check.txt。

代码运行须知

1.将Homeassistion配置中的文件复制到自己计算机中的custom_components文件夹中,并在该文件夹下创建package_send.txt,open.txt,check.txt三个空白文件。注意在configuration.yaml文件中添加(hachina6_package :)。添加脚本加载hachina6_package,添加实体显示hachina6_package。

2.下载APP到自己的手机中。用户名:20171600密码:20171600

557_464dc222538d95ab7fac2df41efc7057ec5fa59a.png

3.运行box.py,Web_ha.py,二维码_recognition.py以及chuankou.py四个python程序。二维码_recognition.py使用扫描二维码,Web_ha.py运行后使用连接手机APP,box.py为快递箱模型。

4.步骤:扫描二维码,箱门打开,使用串联关闭箱门,Homeassistion内部显示改变,用户使用脚本开箱门,同时使用串行关闭箱门。APP输入密码后查询若快递箱内部有快递显示数量为1,若没有显示为无。

66_wps%E5%9B%BE%E7%89%87_6e41a93d187be04ba8bbbc84c1d05c61f0344071.png

The marine environment might seem like an odd place to talk about space and weight saving technologies. After all, ocean-going ships displace thousands, or even tens of thousands, of tonnes. Neither are they small, with commercial and naval vessels regularly exceeding 100 metres in length.

Fig 1.  (Images courtesy of US Navy, TE Connectivity)

Despite this, the quest to save weight and space is of primary concern to designers. Careful tradeoff in weight mean that savings in one area may allow more capability in another area. Capability can mean an increased load-carrying capacity, an increase in fuel carried, or lighter weight resulting in improved speed or handling. Therefore, designers are always looking to optimise their vessel by saving space and weight - without compromising performance or personnel safety.

In many cases, a vast saving in weight and space can be generated by implementing a small change. A perfect example would be the cabling used aboard ship for power and data distribution. Modern ship design emphasises the increased use of automated systems, often incorporated into ship-wide information networks, and the total weight of cables can represent a quite staggering amount - sometimes a significant proportion of the total weight of the ship.

Reducing the size and weight of cabling is not always easy to achieve. Aside from the electrical characteristics of the cables, those used in a marine environment must also provide performance benefits in a range of circumstances:

  • Mechanical robustness and resistance to abrasion
  • Environmental toughness to resist a range of temperatures, and also oil and solvents
  • No compromise of safety, including low toxicity and low flammability in the event of a fire

Critically, these characteristics are desirable in a range of markets far beyond just the marine and offshore industry.

Clearly, the key to size and weight reductions in cabling is the intelligent use of materials that are appropriate for the task that is required of them. TE Connectivity have produced a range of cables with a unique thin-wall insulation used on the conductors called C-Lite.

A typical cable used in marine applications meets the requirements of EN60092 and has an insulation wall thickness of 0.8 mm. C-Lite offers a thin-wall insulation system, meeting the same performance requirements while reducing the thickness to a mere 0.2 to 0.3 mm.  Fig 2 shows the space saving that can be acheived with even a modest reduction in the thickness of cable insulation.

Fig.2

TE Connectivity have created a fantastic white paper that details the challenges of this demanding environment, the approach that they have taken to solve the problem, and some of the products that would be useful not only to ship designers, but to engineers in a wide range of industries.

总结

本次通过使用Python设计了一个家用的防盗快递箱,改快递箱可基本满足当前人们的快递需求,并且能解决些许当今运送快递的事端,不用跑到快递柜取件,接入快递员派件到门口,规避了由于超时未取而产生的费用问题,防止快递因错拿等情况出现丢失问题,促进了安全性。

下载Github代码,欢迎和作者沟通!

Downloads

Connector Geek is Dave in real life. After three decades in the industry, Dave still likes talking about connectors almost as much as being a Dad to his two kids. He still loves Lego too. And guitars.