FlexSEA Wiki

A WEARABLE ROBOTICS TOOLKIT

User Tools

Site Tools


i2t_v2

This is an old revision of the document!


I²t current limit: Programmable Fuse (v2.0)

Important: this note covers the new and improved I2t protection. If you programmed your Regulate after September 2018 that's what you have. The base algorithm is the same as the original release. This note only covers the changes from the original release.

What's different:

  • The #define constants have been replaced by variables
  • An optional non-linearity has been added
  • On Rigid board, Mn can now write the I2t settings. You can now experiment with different limits without reprogramming Re.

Variables instead of #define

Instead of using:

#define I2C_SCALE_DOWN_SHIFT
#define I2T_LEAK
#define I2T_LIMIT
#define I2T_WARNING

The algorithm now uses:

struct i2t_s
{
	uint8_t shift;
	uint16_t leak;
	uint32_t limit;
	uint32_t warning;
	uint8_t nonLinThreshold;
};

Please note that all the #define are still present in i2t-current-limit.h. They are used as the default values. If Mn doesn't provide new settings the #define values are used.

Non-linearity

The whole point of the I2t algorithm is to model thermal dissipation and prevent dangerous conditions. Because of the power of two, peaks can lead to significant heating. The current sensors used by FlexSEA have limits ranging from 5A to 30A depending on the hardware version. While they will tolerate peaks above their maximum, they will only report up to their max. Using a 30A sensor as an example, if our current is 42A the energy is doubled versus 30A yet the sensor will report 30A. An optional non-linearity was added to deal with those conditions. Simply, if you get close to the sensor's maximum range you can artificially increase its sensitivity to protect your hardware.

Original version:

CURR = maxAvgCurrent:1000:30000;
tmp = (CURR./SCALE).^2;
time = (I2T_LIMIT * dt) ./ ( tmp - I2T_LEAK );

New version:

CURR = maxAvgCurrent:100:1.5*currentLimit;
CURR2 = (max(0,(CURR-NON_LIN_TRESH)));
tmp = ((CURR+10*CURR2)./SCALE).^2;
time = (I2T_LIMIT * dt) ./ ( tmp - I2T_LEAK );

As can be seen on the plot below, below the threshold the algorithm behaves the same. Above the threshold (set at 16A in this example) we can see that the protection trips faster with the non-linearity.

Changing settings from Mn

You can write all your parameters in the i2tBatt structure:

struct i2t_s i2tBatt = {.shift = 7, .leak = 6105, .limit = 76295, \
			.nonLinThreshold = 125, .useNL = I2T_ENABLE_NON_LIN};

The non-linearity is coded on 8-bits. Divide the current by 2^shift to get the value. Example with a shift of 7: 16000mA/(2^7) = 125

They will be used in misc.c at the end of the peripheral initialization. In the example below, the function is also setting the under-voltage lockout at 19V.

setRegulateLimits(19000, i2tBatt);
i2c3SlaveTransmitToMaster();
i2t_v2.1535640393.txt.gz · Last modified: 2018/08/30 14:46 by jfduval