用Arduino建一座高大上的Weathercloud气象站
起床都是一件需要勇气的事情
还有在出门前把手伸出窗外
试试今天有没有刮风
要穿多少才能抵御寒风

今天带大家看点儿高大上的
用Arduino来做一个气象站
(不要以为Arduino只能做些小儿科)

它可以测量温度 湿度 气压
降雨量 紫外线指数
计算重要的气象值指数

在建立气象站之前
大家要先了解一下
Weathercloud
科普向
Weathercloud
Weathercloud是一个由世界各地实时报告数据的大型气象站网络。它是免费的,有超过10000个气象站连接Weathercloud。


要建立气象站,我们要有自己的HTML网站,所有数据可以上传发送。但制作自己的网站和图形很难,然而将所有数据发送到weathercloud要容易很多。大家可以登录https://weathercloud.net/去简单学习如何使用这一平台。

创建一个Weathercloud帐户后,你还需要在网站上创建一个电台配置文件。在Weathercloud上创建气象站配置文件时,你将获得Weathercloud ID和Weathercloud KEY。测量后,Arduino上获取的数据将上传到Weathercloud上。
材料与工具


传感器
DS18B20温度传感器
DHT21湿度传感器
MS5611压力传感器
UVM-30A紫外线传感器
雨量计
服务器
Arduino W5100模块
Arduino nano
Arduino扩展板
降压转换器
DS3231 RTC模块
塑料箱
WEATHERCAM摄像头
1080p wi-fi 模块相机
一面透明的盒子
其他
3 x 15cm不锈钢杆
6个M6螺母
15 x 25mm尼龙垫片
6块板子(推荐直径16厘米)
壁挂支架
IP65接线盒
至少10米长的10芯数据线
至少10米长的4芯电缆
很多很短的电线

剥线钳 电池钻
电烙铁 钳子
螺丝刀 胶枪
万用表 锯 钻头
一切就绪
带大家看看气象站如何建立
步骤有些多
而且有些复杂
请大家耐心食用

制作步骤
第1步 制作DS18B20太阳辐射防护罩
太阳辐射防护罩是气象站中用于阻挡直接太阳辐射的,用来减少测量温度误差。

它还可作为温度传感器的支架,辐射防护罩非常有用,但通常由钢制成,而且价格昂贵所以我们决定自己造一个防护罩。
防护罩制作 视频教程
第2步 制作接线盒
接线盒是气象站的重要部分。主14芯电缆将其连接入服务器盒,DS18B20的电缆接入接线盒,紫外线盒中的电缆也接入其中,此外它还承载湿度和气压传感器。

第3步 制作紫外线传感器盒
UV传感器盒装有UVM-30A紫外线传感器,它也是主接线盒和雨量计之间的中间点。UV传感器盒可以是任何塑料IP65盒。


第4步 安装Weathercam摄像头
天气网络摄像头(风标)用于记录或流式传输实际天气状况的图像。从图像中,可以确定光强度和云量,让计算机不断运行流媒体软件。将相机放在防风雨的盒子里,可以使用与UV传感器相同的盒子,此外相机的电池需要不断充电。可以通过拆下USB电缆并将 + 和 - 线连接到传感器的5V电源输出来实现充电。

接下来需要将IP摄像机连接到家庭Wi-Fi网络然后根据相机界面上的用户名和密码更改脚本中的用户名和密码,在脚本中更改摄像机IP地址。然后设置任务计划程序,每隔5分钟左右在计算机上运行脚本。脚本设置为每隔5分钟拍摄一次并将文件保存到预设文件夹中。文件夹必须是公共的,然后Weathercloud可以从公共文件夹中获取此图像并将其放在网页上,就类似于直播的感觉。

第5步 制作紫外线传感器盒
顶部传感器支架是一个钢制组件,可将顶部传感器固定在屋顶上。

第6步 连接Arduino W5100模块与扩展板
Arduino W5100模块上部是有网口的,这里就无法将Arduino扩展版与其连接,在扩展板上切出一个矩形的口子,以便于Arduino W5100模块与其连接。


第7步 降雨量测算板
我订购的雨量计没有任何通信接口,只有一个简单的开关,每次下雨超过0.28 mm / m2时,它会开启60微秒。除了测量降雨量之外,当它还有其他任务要做时(比如测量温度并发送到云端),Arduino处理器很可能在接通雨量计时会导致读数不准确。所以在这里添加一块Arduino nano,nano的唯一任务是测量降雨量将其发送给主Arduino板,这样降雨量读数将是完全准确的。

第8步 安装服务器盒子
将所有电子设备隐藏在一个小巧的盒子里。盒子里包括了Arduino UNO,Arduino W5100模块,Arduino扩展板,5V稳压器,主数据电缆终端和降雨测量板。

第9步 连接各部分
根据原理图连接所有部分即可。

第10步 测试代码
这是最后一部分,也就是测试,如果气象站有效。你需要根据家庭网络和Weathercloud帐户更改IP地址,Weathercloud ID和Weathercloud KEY。然后就可以将其上传到Arduino上了。此外还需要将I2C雨发送器代码上传到Arduino nano上。

第11步 安装
让气象站在室内工作是一回事,但让它在复杂多变的天气条件下工作又是另一回事。

温度和湿度传感器可以放置在建筑物的任何地方,但紫外线传感器和雨量计必须位于建筑物的顶部。紫外线传感器不能处于阴影中,雨量计不能靠近墙壁,否则当遭遇强对流天气时,雨滴根本不会落入仪表中,读数也会不准确。




至此
属于自己的气象站
就建立完成了
!!!
每天起床
掏出手机
瞬间了解全部的天气情况
什么温度、湿度、气压
降雨量、紫外线指数等等等等
比只报温度刮风下雨的
天气预报强多了

--end--
声明:本文章由网友投稿作为教育分享用途,如有侵权原作者可通过邮件及时和我们联系删除:freemanzk@qq.com