跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
最近更改
随机页面
MediaWiki帮助
Mcuzone Wiki
搜索
搜索
登录
个人工具
登录
查看“3001 TEMP AND RH EN”的源代码
页面
讨论
大陆简体
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
特殊页面
页面信息
←
3001 TEMP AND RH EN
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
[[3001 TEMP AND RH(树莓派专用温湿度模块)|切换语言为中文]] == '''Keywords''' == Raspberry Pi, Raspberry Pi 5, CM4, USB to serial, SHT20, STM32F030, CH340G, Temperature and humidity collection == '''I. Introduction''' == The Raspberry Pi is a versatile maker platform, and many makers require temperature and humidity data when using the Raspberry Pi. However, the accuracy and consistency of some affordable temperature and humidity modules on the market (such as the DHT2x series) are often quite poor. So we have designed a temperature and humidity module that offers better precision at a reasonable cost. We have set up a microcontroller on the module to read temperature and humidity data, which sends data to the main controller via a TTL serial port or through a USB-to-serial adapter. The temperature and humidity sensor used is the SHT20 from Sensirion, with a typical humidity accuracy of ±3%RH and a typical temperature accuracy of ±0.3°C. We have conducted consistency tests, and in the same environment, the temperature difference among five modules is within 0.3°C, and the humidity difference is within 3%RH. The entire module can be powered and communicated with through a USB-C interface, or it can be powered via pin connectors. The module can measure the temperature and humidity near the Raspberry Pi or can be placed in the target environment for measurement using a USB-C cable up to 2 meters long. == '''II. Hardware Resources''' == 1. The main controller uses STM32F030 to collect temperature and humidity data, which sends data to the host computer via a TTL serial port or a USB serial port. 2. The USB interface uses the popular USB Type-C connector, which is utilized for both power supply and USB-to-serial communication. 3. The USB-to-serial conversion chip used is the CH340G. After more than a decade of development, Nanjing Qinheng's USB-to-serial chips have become quite mature, with good stability and cost-effectiveness. 4. The temperature and humidity sensor chip used is the SHT20, with a typical humidity accuracy of ±3%RH and a typical temperature accuracy of ±0.3°C. 5. Reserve TTL serial ports/SWD interfaces/extra GPIO pins. 6. Solder a button for switching the output of data from the TTL serial port to the USB-to-serial port. Reserve a position for an unsoldered button. 7. A user LED, which is off by default and lights up after power-on. Users can modify it for other indicator purposes. 8. Size: 40*55mm, perfectly matching the dimensions of the Raspberry Pi CM4's core board; M2.5 mounting holes. http://www.mcuzone.com/wiki/3001_TEMP_AND_RH/3001_TEMP_AND_RH_12.jpg == '''III. Test in Raspberry Pi OS''' == Hardware Platform: We use the Raspberry Pi CM4's core board paired with our expansion board for testing. The operation methods for other Raspberry Pi models such as the 5/4B/3/Zero series are the same. Please refer to the following picture for hardware connections:http://www.mcuzone.com/wiki/3001_TEMP_AND_RH/3001_TEMP_AND_RH_10.jpg We use the official Raspberry Pi OS for test. 版本为2024-07-04-raspios-bookworm-arm64.img.xz The Raspberry Pi OS used in this document is: 2024-07-04-raspios-bookworm-arm64.img.xz(Raspberry Pi OS with desktop). You can download the Raspberry Pi OS in: https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit In the Raspberry Pi system, We use a serial port tool to read the temperature and humidity data in the Raspberry Pi system. Execute the following command in the terminal to install the serial port tool CuteCom: <code>sudo apt install cutecom</code> http://www.mcuzone.com/wiki/3001_TEMP_AND_RH/3001_TEMP_AND_RH_04.jpg After installation, click on the Raspberry Pi logo in the upper left corner, go to System Tools, and click on the CuteCom icon: http://www.mcuzone.com/wiki/3001_TEMP_AND_RH/3001_TEMP_AND_RH_05.jpg After opening, the software automatically detects the serial port number ttyUSB0 of the temperature and humidity module. The default serial port parameters of 115200@8-N-1 can be used: http://www.mcuzone.com/wiki/3001_TEMP_AND_RH/3001_TEMP_AND_RH_06.jpg Click "Open" to open the serial port; the output box below will then display the current temperature and humidity data: http://www.mcuzone.com/wiki/3001_TEMP_AND_RH/3001_TEMP_AND_RH_07.jpg ★ The board reserves I2C interface, which can be used to connect OLED display. If you have the requirement, you can write your own application to display the temperature and humidity information on the LCD screen. == '''IV. . Test in Windows''' == Under Windows 10, this module is recognized as a USB-to-serial converter. You need to install the CH340 driver first. The driver download link is: http://www.mcuzone.com/down/Software.asp?ID=10000607 After installing the driver, use a USB A-C cable to connect the temperature and humidity module to the USB-A port on the computer, and the module will start automatically. After a successful connection, we can see a USB-to-serial port (COM6 in this example) in the Device Manager: http://www.mcuzone.com/wiki/3001_TEMP_AND_RH/3001_TEMP_AND_RH_01.jpg Next, download the temperature and humidity measurement software: http://www.mcuzone.com/wiki/3001_TEMP_AND_RH/THTB.zip Unzip the compressed file, run TH TB.exe, open the software, and it will automatically detect the USB-to-serial port. Then click "Open Serial Port" to display the current temperature and humidity: http://www.mcuzone.com/wiki/3001_TEMP_AND_RH/3001_TEMP_AND_RH_03.jpg http://www.mcuzone.com/wiki/3001_TEMP_AND_RH/3001_TEMP_AND_RH_02.jpg {{联系我们_图标}}
本页使用的模板:
模板:Contact Us icon
(
查看源代码
)
返回
3001 TEMP AND RH EN
。
开关有限宽度模式