Project Overview: This project
implements remote power consumption statistics for a 485 electricity meter connected to Home Assistant using the ESP32-C3 module.
ESPHOME code:
device_name: esp485
esphome:
name: ${device_name}
esp32:
board: esp32-c3-devkitm-1
framework:
type: arduino
logger:
api:
encryption:
key: !secret api_encryption_key
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
fast_connect: on
web_server:
port: 80
button:
- platform: restart
name: ${device_name}_reboot
- platform: uart
name: ${device_name}_ep_reset
data: [0x01, 0x10, 0x00, 0x02, 0x00, 0x01, 0x02, 0x00, 0x01, 0x66, 0x72]
time:
- platform: sntp
id: ${device_name}_time
uart:
id: ${device_name}_uart
rx_pin: 5
tx_pin: 4
baud_rate: 9600
data_bits: 8
stop_bits: 1
modbus:
id: ${device_name}_modbus
send_wait_time: 200ms
modbus_controller:
- id: ${device_name}_modbus_controller
modbus_id: ${device_name}_modbus
address: 0x01
command_throttle: 200ms
setup_priority: -10
update_interval: 10s
text_sensor:
- platform: wifi_info
ip_address:
name: ${device_name}_ip
mac_address:
name: ${device_name}_mac
sensor:
- platform: uptime
name: ${device_name}_uptime
- platform: wifi_signal
name: ${device_name}_signal
update_interval: 60s
- platform: internal_temperature
id: ${device_name}_cpu_temprature
name: ${device_name}_cpu_temprature
- platform: modbus_controller
modbus_controller_id: ${device_name}_modbus_controller
id: ${device_name}_u
name: ${device_name}_u
address: 0x2000
register_count: 2
unit_of_measurement: V
register_type: holding
value_type: FP32
accuracy_decimals: 1
device_class: voltage
- platform: modbus_controller
modbus_controller_id: ${device_name}_modbus_controller
id: ${device_name}_i
name: ${device_name}_i
address: 0x2002
register_count: 2
unit_of_measurement: A
register_type: holding
value_type: FP32
accuracy_decimals: 3
device_class: current
- platform: modbus_controller
modbus_controller_id: ${device_name}_modbus_controller
id: ${device_name}_p
name: ${device_name}_p
address: 0x2004
register_count: 2
unit_of_measurement: W
register_type: holding
value_type: FP32
accuracy_decimals: 1
filters:
- multiply: 1000
device_class: power
- platform: modbus_controller
modbus_controller_id: ${device_name}_modbus_controller
id: ${device_name}_q
name: ${device_name}_q
address: 0x2006
register_count: 2
unit_of_measurement: var
register_type: holding
value_type: FP32
accuracy_decimals: 1
filters:
- multiply: 1000
device_class: power
- platform: modbus_controller
modbus_controller_id: ${device_name}_modbus_controller
id: ${device_name}_s
name: ${device_name}_s
address: 0x2008
register_count: 2
unit_of_measurement: VA
register_type: holding
value_type: FP32
accuracy_decimals: 1
filters:
- multiply: 1000
device_class: power
- platform: modbus_controller
modbus_controller_id: ${device_name}_modbus_controller
id: ${device_name}_pf
name: ${device_name}_pf
address: 0x200A
register_count: 2
register_type: holding
value_type: FP32
accuracy_decimals: 3
device_class: power_factor
- platform: modbus_controller
modbus_controller_id: ${device_name}_modbus_controller
id: ${device_name}_freq
name: ${device_name}_freq
address: 0x200E
register_count: 2
unit_of_measurement: Hz
register_type: holding
value_type: FP32
accuracy_decimals: 2
- platform: modbus_controller
modbus_controller_id: ${device_name}_modbus_controller
id: ${device_name}_ep
name: ${device_name}_ep
address: 0x4000
register_count: 2
unit_of_measurement: kWh
register_type: holding
value_type: FP32
accuracy_decimals: 2
device_class: energy
state_class: total_increasing
filters:
- median:
window_size: 3
send_every: 3
Actual product image
PDF_ESP32-C3 485 Device Module.zip
Altium_ESP32-C3 485 Device Module.zip
PADS_ESP32-C3 485 Device Module.zip
BOM_ESP32-C3 485 Device Module.xlsx
92435
TC3X7_BTB core board
Infineon TC3X7 core board, BTB connection
This chip may be locked; purchase with caution. Refurbished chips
are smaller and more reliable. BTB connectors
are purchased from Taobao's Shangudao Electronics. 0.8mm pitch, 4.0mm height, 50p
pins. Defines a DAP interface compatible with my open-source downloader.
Before soldering the BGA, please tin the PCB pads, then smooth and clean them, add a little solder flux, and then place the BGA with the balls aligned and heated. The solder paste layer in the project has been modified to have square holes, which can be directly used for manual soldering stencil
packaging: Self-made _TC3x7 core board.

PDF_TC3X7_BTB core board.zip
Altium_TC3X7_BTB core board.zip
PADS_TC3X7_BTB core board.zip
BOM_TC3X7_BTB Core Board.xlsx
92436
N20 motor small flashlight v2
Knob-powered flashlight EDC toy
The N20 geared motor charges the capacitor, driving the LED beads to emit light. The package includes 3D printed shell files. Compared to the original, this version features the ability to generate electricity in both forward and reverse directions.

n20 motor small flashlight v2 (fix).stl
PDF_n20 Mini Flashlight v2.zip
Altium_n20 motor mini flashlight v2.zip
PADS_n20 Mini Motor Flashlight v2.zip
BOM_n20 Mini Flashlight with Motor v2.xlsx
92437
FP7125 step-down LED driver
This project is a high-power LED driver design based on the FP7125 LED driver chip from Yuanxiang Technology.
The FP7125 is an average current-mode LED driver IC that operates in a constant off-time mode. The FP7125 does not produce peak-to-average current error, thus significantly improving LED current accuracy, line and load regulation without the need for loop compensation or high-side current sensing. The output LED current accuracy is ±3%. The FP7125 can be powered from 8.0-100V. It provides PWM and linear dimming inputs and accepts external TTL-compatible control signals. The output current can be programmed via an internal 250mV reference.
The shorted pins in the image are for debugging and have been removed in the production project; they do not need to be shorted again.
In this project, the output current is set by adjusting the current sampling resistor U2. The current calculation method is shown in the figure below. This project recommends use below 3A; higher power requires larger inductors and improved heat dissipation.
PDF_FP7125 Buck LED Driver.zip
Altium_FP7125 step-down LED driver.zip
PADS_FP7125 Step-Down LED Driver.zip
BOM_FP7125 Step-Down LED Driver.xlsx
92438
electronic