『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
楼主: polisher

[硬件DIY] 【小白首发】ESPhome自制WIFI多路电量表

  [复制链接]

12

主题

124

帖子

793

积分

高级会员

Rank: 4

积分
793
金钱
669
HASS币
0
发表于 2024-1-3 11:25:19 | 显示全部楼层
本帖最后由 duanyudan123 于 2024-1-3 11:30 编辑
polisher 发表于 2024-1-3 09:22
我购置于某宝的北创卡微电子科技。如有条件,建议您还是测量一下IN、IP间的电压,如果只是互感器变比的问 ...

1704252183183.jpg 麻烦楼主看一下算式有问题么?按说in和ip不能有这么高的电压。文档2000:1的互感器,30A的交流电才输出130多mv。我这小灯泡才几A就输出80多mv。另外如果修改配置文件计算公式,计算正确。但是计量大电流的设备时候会错误。
回复

使用道具 举报

18

主题

266

帖子

2160

积分

论坛DIY达人

积分
2160
金钱
1889
HASS币
20
 楼主| 发表于 2024-1-3 14:13:05 | 显示全部楼层
duanyudan123 发表于 2024-1-3 11:25
麻烦楼主看一下算式有问题么?按说in和ip不能有这么高的电压。文档2000:1的互感器,30A的交流电才输出130 ...

计算无误,说明问题并不出在BL0906。换批电流互感器排查一下
回复

使用道具 举报

12

主题

124

帖子

793

积分

高级会员

Rank: 4

积分
793
金钱
669
HASS币
0
发表于 2024-1-7 17:09:30 | 显示全部楼层
polisher 发表于 2024-1-3 14:13
计算无误,说明问题并不出在BL0906。换批电流互感器排查一下

我真想把我的脑袋拧下来当球踢,我焊上去的是5.1K的负载电阻。要是真的串到30A上边。还不把0906炸了。
回复

使用道具 举报

1

主题

44

帖子

382

积分

中级会员

Rank: 3Rank: 3

积分
382
金钱
338
HASS币
10
发表于 2024-1-10 16:47:01 | 显示全部楼层
之前用培正测了总的
回复

使用道具 举报

0

主题

3

帖子

24

积分

新手上路

Rank: 1

积分
24
金钱
21
HASS币
0
发表于 2024-1-10 19:41:43 | 显示全部楼层
我复刻完了但是hass里数据显示未知,logs里有报错;
[19:40:02][W][bl0906:165]: Junk on wire. Throwing away partial message
[19:40:02][E][uart:015]: Reading from UART timed out at byte 0!
[19:40:02][E][uart:015]: Reading from UART timed out at byte 0!
[19:40:02][W][bl0906:165]: Junk on wire. Throwing away partial message
[19:40:02][E][uart:015]: Reading from UART timed out at byte 0!
[19:40:03][E][uart:015]: Reading from UART timed out at byte 0!
[19:40:04][W][bl0906:165]: Junk on wire. Throwing away partial message
[19:40:04][E][uart:015]: Reading from UART timed out at byte 0!
[19:40:04][E][uart:015]: Reading from UART timed out at byte 0!
[19:40:04][W][bl0906:165]: Junk on wire. Throwing away partial message
[19:40:04][E][uart:015]: Reading from UART timed out at byte 0!
[19:40:04][W][component:214]: Component bl0906.sensor took a long time for an operation (4.80 s).
[19:40:04][W][component:215]: Components should block for at most 20-30ms.
[19:40:05][I][ota:117]: Boot seems successful, resetting boot loop counter.
回复

使用道具 举报

18

主题

266

帖子

2160

积分

论坛DIY达人

积分
2160
金钱
1889
HASS币
20
 楼主| 发表于 2024-1-11 17:05:30 | 显示全部楼层
本帖最后由 polisher 于 2024-1-11 17:11 编辑
yanyuans 发表于 2024-1-10 19:41
我复刻完了但是hass里数据显示未知,logs里有报错;

1、检查BL0906电压是否正常
2、先不接入220V和ESP,通过串口调试工具直接向BL0906发送指令(指令参考厂家文档),确认其状态
3、检查BL0906与ESP的串口连接是否正常
回复

使用道具 举报

0

主题

3

帖子

24

积分

新手上路

Rank: 1

积分
24
金钱
21
HASS币
0
发表于 2024-1-15 09:28:32 | 显示全部楼层
大佬,我复刻完了但是有报错温度有时会乱跳是啥原因?附日志
INFO ESPHome 2023.12.5
INFO Reading configuration /config/esphome/power-monitoring.yaml...
INFO Starting log output from 192.168.1.39 using esphome API
INFO Successfully connected to power-monitoring @ 192.168.1.39 in 0.009s
INFO Successful handshake with power-monitoring @ 192.168.1.39 in 2.668s
[20:15:30][I][app:102]: ESPHome version 2023.12.5 compiled on Jan 10 2024, 20:50:59
[20:15:30][C][wifi:573]: WiFi:
[20:15:30][C][wifi:405]:   Local MAC: 10:52:1C:EA:8C:14
[20:15:30][C][wifi:410]:   SSID: 'yanyuans AP'[redacted]
[20:15:30][C][wifi:411]:   IP Address: 192.168.1.39
[20:15:30][C][wifi:412]:   BSSID: 34:47:D4:79:75:2C[redacted]
[20:15:30][C][wifi:414]:   Hostname: 'power-monitoring'
[20:15:30][C][wifi:416]:   Signal strength: -82 dB ▂▄▆█
[20:15:30][C][wifi:420]:   Channel: 1
[20:15:30][C][wifi:421]:   Subnet: 255.255.255.0
[20:15:30][C][wifi:422]:   Gateway: 192.168.1.1
[20:15:30][C][wifi:423]:   DNS1: 114.114.114.114
[20:15:30][C][wifi:424]:   DNS2: 223.5.5.5
[20:15:30][C][logger:443]: Logger:
[20:15:30][C][logger:444]:   Level: DEBUG
[20:15:30][C][logger:445]:   Log Baud Rate: 0
[20:15:30][C][logger:447]:   Hardware UART: UART0
[20:15:30][C][uart.arduino_esp8266:102]: UART Bus:
[20:15:30][C][uart.arduino_esp8266:103]:   TX Pin: GPIO5
[20:15:30][C][uart.arduino_esp8266:104]:   RX Pin: GPIO4
[20:15:30][C][uart.arduino_esp8266:106]:   RX Buffer Size: 256
[20:15:30][C][uart.arduino_esp8266:108]:   Baud Rate: 19200 baud
[20:15:30][C][uart.arduino_esp8266:109]:   Data Bits: 8
[20:15:30][C][uart.arduino_esp8266:110]:   Parity: NONE
[20:15:30][C][uart.arduino_esp8266:111]:   Stop bits: 1
[20:15:30][C][uart.arduino_esp8266:115]:   Using software serial
[20:15:31][C][captive_portal:088]: Captive Portal:
[20:15:31][C][mdns:115]: mDNS:
[20:15:31][C][mdns:116]:   Hostname: power-monitoring
[20:15:31][C][ota:097]: Over-The-Air Updates:
[20:15:31][C][ota:098]:   Address: power-monitoring.local:8266
[20:15:31][C][ota:101]:   Using Password.
[20:15:31][C][api:139]: API Server:
[20:15:31][C][api:140]:   Address: power-monitoring.local:6053
[20:15:31][C][api:142]:   Using noise encryption: YES
[20:15:47][D][sensor:093]: 'Frequency': Sending state inf Hz with 0 decimals of accuracy
[20:15:47][D][sensor:093]: 'Temperature': Sending state 26.31356 ℃ with 0 decimals of accuracy
[20:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:15:48][W][bl0906:165]: Junk on wire. Throwing away partial message
[20:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:15:48][D][sensor:093]: 'Current_1': Sending state 0.00000 A with 3 decimals of accuracy
[20:15:48][D][sensor:093]: 'Current_2': Sending state 0.00000 A with 3 decimals of accuracy
[20:15:48][D][sensor:093]: 'Current_3': Sending state 0.00000 A with 3 decimals of accuracy
[20:15:48][D][sensor:093]: 'Current_4': Sending state 0.00000 A with 3 decimals of accuracy
[20:15:48][E][uart:015]: Reading from UART timed out at byte 1!
[20:15:48][W][bl0906:165]: Junk on wire. Throwing away partial message
[20:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:15:48][D][sensor:093]: 'Current_6': Sending state 0.00000 A with 3 decimals of accuracy
[20:15:48][D][sensor:093]: 'Power_1': Sending state 0.00000 W with 3 decimals of accuracy
[20:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:15:48][W][bl0906:144]: Junk on wire. Throwing away partial power message
[20:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:15:48][D][sensor:093]: 'Power_4': Sending state 0.00000 W with 3 decimals of accuracy
[20:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:15:48][W][bl0906:144]: Junk on wire. Throwing away partial power message
[20:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:15:48][D][sensor:093]: 'Power_6': Sending state 0.00000 W with 3 decimals of accuracy
[20:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:15:48][W][bl0906:144]: Junk on wire. Throwing away partial power message
[20:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:15:48][D][sensor:093]: 'Energy_1': Sending state 0.00000 kWh with 2 decimals of accuracy
[20:15:48][E][uart:015]: Reading from UART timed out at byte 2!
[20:15:48][W][bl0906:165]: Junk on wire. Throwing away partial message
[20:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:15:48][D][sensor:093]: 'Energy_3': Sending state 0.00000 kWh with 3 decimals of accuracy
[20:15:48][D][sensor:093]: 'Energy_4': Sending state 0.00000 kWh with 3 decimals of accuracy
[20:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:15:48][W][bl0906:165]: Junk on wire. Throwing away partial message
[20:15:49][E][uart:015]: Reading from UART timed out at byte 0!
[20:15:49][D][sensor:093]: 'Energy_6': Sending state 0.00000 kWh with 3 decimals of accuracy
[20:15:49][E][uart:015]: Reading from UART timed out at byte 3!
[20:15:49][W][bl0906:165]: Junk on wire. Throwing away partial message
[20:15:49][E][uart:015]: Reading from UART timed out at byte 0!
[20:15:49][W][component:214]: Component bl0906.sensor took a long time for an operation (1.75 s).
[20:15:49][W][component:215]: Components should block for at most 20-30ms.
[20:16:47][D][sensor:093]: 'Frequency': Sending state inf Hz with 0 decimals of accuracy
[20:16:47][E][uart:015]: Reading from UART timed out at byte 2!
[20:16:47][W][bl0906:206]: Junk on wire. Throwing frequency message
[20:16:47][E][uart:015]: Reading from UART timed out at byte 0!
[20:16:47][D][sensor:093]: 'Voltage': Sending state 0.00000 V with 0 decimals of accuracy
[20:16:47][D][sensor:093]: 'Current_1': Sending state 0.00000 A with 3 decimals of accuracy
[20:16:47][E][uart:015]: Reading from UART timed out at byte 0!
[20:16:47][W][bl0906:165]: Junk on wire. Throwing away partial message
[20:16:47][E][uart:015]: Reading from UART timed out at byte 0!
[20:16:47][D][sensor:093]: 'Current_3': Sending state 0.00000 A with 3 decimals of accuracy
[20:16:47][D][sensor:093]: 'Current_4': Sending state 0.00000 A with 3 decimals of accuracy
[20:16:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:16:48][W][bl0906:165]: Junk on wire. Throwing away partial message
[20:16:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:16:48][D][sensor:093]: 'Power_1': Sending state 0.00000 W with 3 decimals of accuracy
[20:16:48][D][sensor:093]: 'Power_2': Sending state 0.00000 W with 3 decimals of accuracy
[20:16:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:16:48][W][bl0906:144]: Junk on wire. Throwing away partial power message
[20:16:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:16:48][D][sensor:093]: 'Power_4': Sending state 0.00000 W with 3 decimals of accuracy
[20:16:48][D][sensor:093]: 'Power_5': Sending state 0.00000 W with 3 decimals of accuracy
[20:16:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:16:48][W][bl0906:144]: Junk on wire. Throwing away partial power message
[20:16:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:16:48][E][uart:015]: Reading from UART timed out at byte 2!
[20:16:48][W][bl0906:144]: Junk on wire. Throwing away partial power message
[20:16:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:16:48][D][sensor:093]: 'Energy_1': Sending state 0.00000 kWh with 2 decimals of accuracy
[20:16:48][D][sensor:093]: 'Energy_2': Sending state 0.00000 kWh with 3 decimals of accuracy
[20:16:48][D][sensor:093]: 'Energy_3': Sending state 0.00000 kWh with 3 decimals of accuracy
[20:16:48][D][sensor:093]: 'Energy_4': Sending state 0.00000 kWh with 3 decimals of accuracy
[20:16:48][D][sensor:093]: 'Energy_5': Sending state 0.00000 kWh with 3 decimals of accuracy
[20:16:48][D][sensor:093]: 'Energy_6': Sending state 0.00000 kWh with 3 decimals of accuracy
[20:16:48][E][uart:015]: Reading from UART timed out at byte 0!
[20:16:48][W][bl0906:165]: Junk on wire. Throwing away partial message
[20:16:49][E][uart:015]: Reading from UART timed out at byte 0!
[20:16:49][W][component:214]: Component bl0906.sensor took a long time for an operation (1.56 s).
[20:16:49][W][component:215]: Components should block for at most 20-30ms.
回复

使用道具 举报

0

主题

3

帖子

24

积分

新手上路

Rank: 1

积分
24
金钱
21
HASS币
0
发表于 2024-1-15 09:34:18 | 显示全部楼层
polisher 发表于 2024-1-11 17:05
1、检查BL0906电压是否正常
2、先不接入220V和ESP,通过串口调试工具直接向BL0906发送指令(指令参考厂家文 ...

好的,我试试
回复

使用道具 举报

18

主题

266

帖子

2160

积分

论坛DIY达人

积分
2160
金钱
1889
HASS币
20
 楼主| 发表于 2024-1-15 09:51:00 | 显示全部楼层
yanyuans 发表于 2024-1-15 09:28
大佬,我复刻完了但是有报错温度有时会乱跳是啥原因?附日志

因为硬件问题,可能性比较多,需要自己排查。比如esp8266、周围电磁干扰等问题均可能出现该情况。您可以考虑用esp32来替换试一试,当然如果不影响使用完全可以不管他。
回复

使用道具 举报

0

主题

2

帖子

44

积分

新手上路

Rank: 1

积分
44
金钱
42
HASS币
0
发表于 2024-1-21 14:40:29 | 显示全部楼层
本帖最后由 abc8474 于 2024-1-21 14:46 编辑
yanyuans 发表于 2024-1-15 09:28
大佬,我复刻完了但是有报错温度有时会乱跳是啥原因?附日志

你应该做的是缝合版,那个版本好像有一点点问题,esp读取bl0906会报错,我在3.3V输出加个电容后,情况好了很多,准备重新打板子测试
电子白痴,如有错误,请大佬们指正

微信图片_20240121142445.jpg

屏幕截图 2024-01-21 142636.png
屏幕截图 2024-01-21 143218.png
屏幕截图 2024-01-21 143327.png



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-23 09:32 , Processed in 0.081346 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表