Supercapacitor Usage Guide
1 Overview
This section introduces the background and scope of application for configuring and using supercapacitors in products such as the ED-IPC and ED-HMI series.
1.1 Background
Some users who purchase products with supercapacitors want to understand how they work and further explore advanced applications, such as saving cached data after a power loss. In response to these needs, we have provided corresponding software. Users can install the software package themselves and modify scripts to enable operations like save cached data when the device loses power.
1.2 Application Scope
This application applies to ED-IPC2100, ED-IPC2200, ED-SBC2300, ED-IPC2600, ED-IPC3100, ED-SBC3300, ED-IPC3600, ED-HMI2120, ED-HMI2630, ED-HMI3120, ED-HMI3630, and other products.
2 Application Guide
Introduces how supercapacitors work and the specifics of configuring and using them.
2.1 Working Principle
The supercapacitor is connected to the LVD pin of the extended GPIO chip in the PCBA. When the external power supply of the device is disconnected, an interrupt signal will be generated at the LVD pin, and the CPU will execute the /usr/sbin/lvd-callback.sh
script after detecting the interrupt signal. Users can customise the content of lvd-callback.sh
to make the supercapacitor achieve the desired function when triggered.
2.2 Software Configuration
The following is an example of the ED-IPC2630 configuration.
Preparation Steps:
- The device has booted into the system normally
- The device has a supercapacitor
- The device is connected to the Ethernet via Wi-Fi or its Ethernet port
Operating Steps:
- Execute the following command to add apt source
curl -sS https://apt.edatec.cn/pubkey.gpg | sudo apt-key add -
echo "deb https://apt.edatec.cn/raspbian stable main" | sudo tee /etc/apt/sources.list.d/edatec.list
sudo apt update
- Execute the following commands in order to install
ed-lvd
sudo apt update
sudo apt install ed-lvd

- Execute the following command to modify
/usr/sbin/lvd-callback.sh
sudo nano /usr/sbin/lvd-callback.sh

TIP
The default configuration of lvd-callback.sh
is shown above.
systemctl restart codesyscontro takes effect only for users with codesys; users of the device without codesys can remove this line.

TIP
When the supercapacitor is triggered, the device will execute the commands in /usr/sbin/lvd-callback.sh
in sequence, and the user can customise the content of the script according to requirements.As shown above, implement the function of using sync to save cached data before shutting down the device.
Save the file and exit.
- Execute the following command to see if lvd-detect.service is running(Runs automatically by default)

TIP
cannot open /etc/lvd/config.ini
can be ignored, the software has been implemented to automatically find the LVD pins.
- Disconnect the external power supply and the device automatically executes the
lvd-callback.sh
script to perform the user's pre-defined functions.