hqc201105 / esphome_tds_sensor

GNU General Public License v2.0
13 stars 6 forks source link

esphome_tds_sensor

本项目可在home assistanct中显示纯水tds值,自来水tds值以及水温,其中纯水tds值刷新时间为1秒,自来水tds值刷新时间为1分钟,同时设置了一个虚拟开关,当开关关闭时停止采集数据,并关闭显示屏。

home assistant效果如下:

image

image

实物如下图所示:

IMG_20231220_233524

硬件方案

处理器

使用esp8266 nodemcu

tds模块

使用双路tds传感器模块,样子长这样:

image

image

有温度补偿,有休眠模式,使用uart通讯,通讯协议如下: command1

command2

command3

显示模块

使用4位数码管TM1637模块,样子长这样:

image

电源模块

使用dc-dc降压模块,从净水器的24v电源处取电,样子长这样: image

电路图

image

软件方案

本项目使用esphome开发,使用的技术参考文档:

自定义串口设备:

https://esphome.io/components/uart.html

https://esphome.io/custom/uart.html

4位数码管tm1637:

https://esphome.io/components/display/tm1637.html

使用方法:

将TDSSensor.h放到esphome项目根目录,然后参考tds-esp8266.yaml编程