logo elektroda
logo elektroda
X
logo elektroda

Arduino Sketch for BL0937 Simulator on ESP-WROOM-32 for OpenBeken Testing

divadiow 423 2
ADVERTISEMENT
  • Helpful post
    #1 21459594
    divadiow
    Level 34  
    Here's something GPT and I have been working on to create a BL0937 simulator for OpenBeken testing across different platforms. It's an Arduino sketch that runs on an ESP-WROOM-32 and is currently connected to an RTL8720DN/BW16E NiceMCU_RTL8720_V1 running OpenRTL. The sketch uses PWM to simulate CF, CF1, and SEL, allowing OpenBeken to interpret the signals as if a real BL0937 power monitoring chip were present.

    The readings aren't exactly realistic yet, but this is the closest I've gotten so far.
    Screenshot of the interface showing data for the OpenRTL8720D_FFFFFFFF device.

    Pin assignments and setup details can be found in the comments of the sketch.

    Feel free to use, improve, or modify it as needed—any feedback is welcome!

    Code: Arduino
    Log in, to see the code
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
  • ADVERTISEMENT
  • #2 21461976
    p.kaczmarek2
    Moderator Smart Home
    Interesting, is this on default OBK BL0937 calibration?

    It should be possible to even hand-tune it to give better results, but you'd also need to test different simulated powers/voltages/currents.

    Btw, what happened to your device MAC?
    Helpful post? Buy me a coffee.
ADVERTISEMENT