STM32 NUCLEO-F446RE + SmartElex ACS37800 (I2C) – Request for Reference / Sample Code
Hello ST Community,
I am working on a project using STM32 NUCLEO-F446RE and the SmartElex Power Meter (ACS37800) for voltage, current, and power measurement over I²C.
https://robu.in/product/1-month-warranty-1276/?gad_source=1&gad_campaignid=18585959909&gbraid=0AAAAADvLFWd-Gp59GIu3AsyVYZj3ppOY9&gclid=Cj0KCQiA7fbLBhDJARIsAOAqhsePuiSx2qOJKlmgFcZN2-_7bfwkDHpCOUyG6G9Q4REJXpOXr7KYUEIaAq3dEALw_wcB
Hardware details:
MCU: STM32F446RE (NUCLEO-F446RE)
Sensor: SmartElex ACS37800 (Allegro ACS37800 IC)
Interface: I²C1
SCL: PB6
SDA: PB7
VCC: 3.3 V
External pull-ups: 4.7 kΩ on SDA/SCL
I²C speed: 100 kHz
Software details:
STM32CubeIDE v1.19.0
The sensor works correctly with ESP32 using the SparkFun Arduino library, but I am looking for a proper STM32 HAL-based reference or sample code specifically for:
Correct I²C initialization and addressing
16-bit register access required by ACS37800
Reading instantaneous voltage, current, and power
Recommended power-up timing and initialization sequence
I have seen Arduino and ESP32 examples, but I would prefer:
An official ST reference
Or a known-working STM32 HAL example for the ACS37800 (or similar Allegro power monitors)
If anyone has:
Sample code
Application notes
GitHub references
Or experience interfacing ACS37800 with STM32 (F4 series)
your guidance would be greatly appreciated.
Thank you in advance for your support.
Best regards,
Gnanendra Sai
