Hello everyone,
I am working on a smart plug with power measurement features. I use ESP32-C3 and ADE7953 for power measurement.
During development it turned out that calibration constants must be calculated for each and every device.
We have designed a custom calibration device with an accurate reference meter and phantom loads.
Now I am looking for the best way to run the calibration procedure and save the calculated constants to each ESP32-C3.
I have written a python program which communicates with the esp32 over uart, the energy meter and controls the different loads. The python program takes a measurement from both devices(our plug and reference meter) and calculates these constants. Then the constants are sent over uart to esp32 and saved in the NVS.
During normal operation, the smart plug reads the values from the nvs right after boot and assigns them to variables which are after that used for proper calculation of voltage, current, power etc.
What do you think of my approach and can you suggest me a better one?
Save calibration data to ESP32 during manufacturing
-
- Posts: 9711
- Joined: Thu Nov 26, 2015 4:08 am
Re: Save calibration data to ESP32 during manufacturing
That sounds about how I would do it. If you also want to use your NVS for other things (like WiFi credentials etc) it may be useful to create a 2nd NVS partition used solely for the calibration parameters, so these don't get lost if somehow the main NVS gets corrupted or you do a factory reset by entirely erasing the main NVS.
Who is online
Users browsing this forum: No registered users and 65 guests