Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

This file holds the Changelog of the project and all relevant changes.

## 1.2.0
### Modified
- Added discharging cycles to BMS telegram
- Added information from @pervolianinen regarding different interfaces

## 1.1.1
### Fixed
- Wrong data interpretation in BMS telegram
Expand Down
33 changes: 19 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Other than NLog, the application can be configured using the following options i
"writeRawData" : true,
"outputDir" : "",
"replayCycle" : 5
}
}
}
```

Expand Down Expand Up @@ -103,20 +103,21 @@ The following telegrams and packages of read responses are already decoded.

### BMS Status (Read Response 0xAA5A)

| Byte (len=10) | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| ------------- | :-----: | :---: | :---: | :----: | :----: | :----: | :---: | :---: | :------: | :------: |
| | Voltage | SoC | Temp | Charge | CycleH | CycleL | ? | ? | VBreaker | Charging |
| Byte (len=10) | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| ------------- | :-----: | :---: | :---: | :----: | :----: | :----: | :-------: | :-------: | :------: | :------: |
| | Voltage | SoC | Temp | Charge | CycleH | CycleL | DisCycleH | DisCycleL | VBreaker | Charging |

#### Description of the variables
| Variable | Description | Unit | Data Type |
| ---------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------- |
| Voltage | current Voltage of the Battery in V | Volts[V] | unsigned byte |
| SoC | State of Charge in % | Percent [%] | unsigned byte |
| Temp | current temperatur of the BMS | Degree C [°C] | signed byte |
| Charge | current charging or discharging current in A | Ampere [A] | signed byte |
| Cycle[H/L] | Number of loading cycles | | unsigned word |
| VBreaker | | 0 = OK<br>1 = bms stopped charge<br>2 = too high charge current<br>4 = too high discharge current | unsigned byte |
| Charging | Battery is currently charging | 1 = charge<br>4 = discharge | unsigned byte |
| Variable | Description | Unit | Data Type |
| ------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------- |
| Voltage | current Voltage of the Battery in V | Volts[V] | unsigned byte |
| SoC | State of Charge in % | Percent [%] | unsigned byte |
| Temp | current temperatur of the BMS | Degree C [°C] | signed byte |
| Charge | current charging or discharging current in A | Ampere [A] | signed byte |
| Cycle[H/L] | Number of loading cycles | | unsigned word |
| DisCycle[H/L] | Number of discharging cycles | | unsigned word |
| VBreaker | | 0 = OK<br>1 = bms stopped charge<br>2 = too high charge current<br>4 = too high discharge current | unsigned byte |
| Charging | Battery is currently charging | 1 = charge<br>4 = discharge | unsigned byte |

### ECU Status (Read Response 0xAADA)
| Byte (len=10) | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Expand All @@ -143,4 +144,8 @@ The following telegrams and packages of read responses are already decoded.
| Variable | Description | Unit |
| -------- | --------------------------- | ---- |
| Hour | current hour in localtime | |
| Minute | current minute in localtime | |
| Minute | current minute in localtime | |


## Additional notes
As @pervolianinen stated in https://github.com/stprograms/SuperSoco485Monitor/issues/2#issuecomment-1676308814, this is a generic protocol that is used in all Lingbo controllers. Using specific hardware converters, the monitor application can be use on these interfaces too. For CAN, this would also need enhancement in how the data is extracted.
2 changes: 1 addition & 1 deletion RS485 Monitor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>1.1.0</Version>
<Version>1.2.0</Version>
<AssemblyTitle>Super Soco RS485 Monitor</AssemblyTitle>
<Description>Application for monitoring traffic on RS485 interface of Super Soco motorcycles.</Description>
<Author>stprograms</Author>
Expand Down
15 changes: 14 additions & 1 deletion src/Telegrams/BatteryStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ public enum VBreakerStatus
/// </summary>
private const byte POS_CYCLE_L = 5;
/// <summary>
/// Positiion of high byte of number of discharging cycles in PDU
/// </summary>
private const byte POS_DISCYCLE_H = 6;
/// <summary>
/// Position of low byte of number of discharging cycles in PDU
/// </summary>
private const byte POS_DISCYCLE_L = 7;
/// <summary>
/// Position of VBreaker information
/// </summary>
private const byte POS_VBREAKER= 8;
Expand Down Expand Up @@ -118,6 +126,10 @@ public enum VBreakerStatus
/// </summary>
public ushort Cycles { get => (ushort)((PDU[POS_CYCLE_H] << 8) | PDU[POS_CYCLE_L]); }
/// <summary>
/// Total number of discharging cycles
/// </summary>
public ushort DischargeCycles { get => (ushort)((PDU[POS_DISCYCLE_H] << 8) | PDU[POS_DISCYCLE_L]); }
/// <summary>
/// current battery activity
/// </summary>
public BatteryActivity Activity
Expand Down Expand Up @@ -155,7 +167,8 @@ public BatteryStatus(BaseTelegram t)
public override string ToString()
{
log.Trace(base.ToString());
return $"Battery Status: {Voltage}V, {SoC}%, {Temperature}°C, {Charge} Amp, {Cycles}x, VBreaker: {VBreaker}, " +
return $"Battery Status: {Voltage}V, {SoC}%, {Temperature}°C, {Charge} Amp, " +
$"Charged: {Cycles}x, Discharged: {DischargeCycles}x, VBreaker: {VBreaker}, " +
$"Activity: {Activity}, Charging: {Charging}";
}
}