Skip to content
Daniel Öster edited this page Jul 2, 2024 · 30 revisions

Webserver

You can interact with the Battery-Emulator via the built in Webserver. Here you can check battery status, change battery settings, update the software over-the-air, check active events, monitor cellvoltages plus much more! It is the preffered way to monitor a newly setup battery system.

image

Prerequisites

ℹ️ To be able to use the Webserver, make sure that #define WEBSERVER is enabled in the USER_SETTINGS.h file. This is enabled by default, but incase you made changes to the file it is always good to verify that it is set!

Next up, you need to connect to the Battery-Emulator to either your home Wifi, or connect directly to the access point that the Battery-Emulator itself is broadcasting.

A: Connect to your home network

To have the Battery-Emulator accessible in your home network, you need to enter your home wifi credentials into the USER_SETTINGS.cpp file. The lines ssid and password will have placeholders, REPLACE_ME..., this is where you enter your home network credentials. After the file has been modified, flash it onto the hardware via USB.

When the board boots, it will attempt to connect to the wifi network you specified. Your router will give it a unique IP, so next up is figuring out what the actual address is. There are a few options you can do

  • Connect via USB and read out the serial print via Arduino serial montitor. When the board boots, it will post which IP address it got assigned to.
  • Check your router info. Incase your home router has a login page (typically 192.168.1.1), you can via this see what devices are connected to your home network. The board will show up as esp32-xxxxx here in your router table.
  • Bruteforce guessing. If your PC has the IP 192.168.1.10 , you can typically just replace the last number with a few numbers up/down and this way get a connection. For instance if your PC is 192.168.1.10 and the only other device on the network, the emulator might get the next available address, 192.168.1.11

Once the IP of the board has been determined, open a webbrowser on a device that is connected to the same home network, and type in the IP. This will open the Webserver user interface

B: Connect to the Access Point

By default, there is an access point broadcasted by the board, called "Battery Emulator". The default password is "123456789". This can be changed in the USER_SETTINGS.cpp file incase you want to improve cyber-security.

After connecting your laptop/phone to this network, you can open a webbrowser and access the interface. To login , browse to the page (192.168.4.1)[192.168.4.1] , this will open the Webserver user interface

Using the Webserver

The front page will contain some quick information about the system. What software version the system has, Inverter protocol, Battery type, Livedata from the battery transmitted to the Inverter, along with some buttons to go to other pages. The page will be green incase all is well, go yellow incase there is an active warning, and go red incase an error is active and blocking operation. Incase there is a warning/error active, you can click the Events button to go to this view.

Events

This page contains information about events that have occured while the system has been running. All events are timestamped, and have an occurance counter so you know if many events of the same type has triggered.

image

Each event also has a description field with more info. The events are grouped into three categories:

Info ℹ️

Info events contain useful information like when battery has been charged full, completely discharged, reset reason etc. Having info events present does not warranty any user action

Warning 🟡

Warning events contain info that users might want to act upon. The system will try to mitigate certain warnings, like incase the battery is reaching too high voltage, the system will raise a warning event and prevent further charging (only discharging will be possible). Warning events should be analyzed when spotted. The front page of the webserver, plus the LED on the board will also turn yellow when a warning event is active.

Error 🔴

Critical error events contain info about why the system has stopped operation. Incase it is no longer safe to continue using the battery, an error event will be generated and charging/discharging is set to 0W allowed. Check the Error event description for information on how to proceed or what to check. The front page of the webserver, plus the LED on the board will also turn red when an error event is active.

Settings

Cellmonitor

Via this page you can keep track of all the cells in your battery. At the top of the page there is a quick readout of Min/Max/Deviation inside the battery. The view also has a grid view of all cells and their values, along with a graph at the bottom for quick visualization on how balanced the battery is. The two cells that are lowest and highest will be highlighted red for quicker identification where they are.

image

Interpreting the values

In general, the lower the voltage deviation in mV, the better. A battery with 10mV deviation is considerably healthier than one with 100mV deviation. Individual cells that are lower than the rest can be a sign of early stages of cellfailures/degradation/overheating, however, this depends heavily on the chemistry of the battery. Some chemistries like LMO can have way larger deviations at lower SOC% compared to NCM chemistries.

Deviations can also grow under heavy load. If you pull tens of kW out of the battery, the mV deviation usually increases. This is completely normal.

The system will automatically go into a warning state incase a cellvoltage goes too high or too low. If this happens, an Event will be raised (see the event page), and further charging/discharging will be halted.

Perform OTA Update

Via this page you can update the software. See the page OTA Update for more info how

Reboot Emulator

This button will restart the emulator. Can be useful to get out of a latched error message blocking operation (critical cell condition, etc.). Pressing the button will prompt you, are you sure you want to reboot?

Clone this wiki locally