newrudeman

5-way socket control board based on esp32

 
Overview

I have a retractable socket at home. Seeing that the space inside is relatively large, I drew this board and used esp32_solo_1 (which I removed from the light panel of Wang Bao’s house and wanted to use it) to control five relays to achieve five-way control. I used hlw8012 Perform power statistics. The power supply part refers to the circuit of @shj162 and finally uses a power module... The socket has a physical switch and is connected to the key board through a pin header. There are 6 keys and 6 indicator lights. The key board schematic is in another project. There are currently 3 ways to connect the keypad:

1: Use the i2c io expansion chip, so that only 4 pin lines are needed to the key board.

2: Use esp32 io direct connection, 13pin line.

3: The button uses ADC to determine the resistance value. The button has 2 pin wires, and the LED light is directly connected to the 6 pin wire, a total of 8 pin wires.

I finally spent a huge sum of 2.6 yuan to buy a PCF8575TS from a certain treasure to implement the first method...

 

Power module: A Bao Preda 3.5 yuan ac-dc plus 3.7 yuan HLK-1D0505 DC isolation power module (power supply for hlw8012).

It is not cost-effective to buy parts to make ac-dc non-isolated when making just one board.

 

 

 

Plug strips like this. If you have the same type of socket at home, you can try plugging it in as well.

If you have the same type of socket at home, you can also try it with a board. The approximate code of esphome is uploaded in the attachment.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-24 13:42:47

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号