Giter Club home page Giter Club logo

foxbms-1's Introduction

The foxBMS Project

foxBMS

foxBMS is a free, open and flexible development environment to design battery management systems. It is the first modular open source BMS development platform.

foxBMS 2

foxBMS 1

⚠️ Refer to foxBMS 2 as foxBMS 1 is no longer supported or updated ⚠️

Contact

For more information or if you want to give use some feedback, please contact us.

The Fraunhofer IISB foxBMS Team

foxbms.org

foxbms-1's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

foxbms-1's Issues

Reading from ADC is not working

Hi,

First of all -thank you for this great project!
I've encountered an issue while connecting to pins of STM32 ADC - the coming data is not from the pins, seems like an ADC setup issue.

My own function monitors data readings number and the data itself(from ADC).

COM_getADCData() test:
217; 777; 268; 1; 294; 335; 253; - data
COM_getADCData() readings:
1068; 1068; 1068; 1068; 1068; 1067; 1067; -readings number

Readings number increases, while data is floating near those values. What can be wrong? This is a setup for adc_cfg:

#define BS_NR_OF_VOLTAGES_FROM_MCU_ADC 7

uint32_t adc_ChannelList[BS_NR_OF_VOLTAGES_FROM_MCU_ADC] = {ADC_CHANNEL_VBAT, ADC_CHANNEL_TEMPSENSOR, ADC_CHANNEL_0, ADC_CHANNEL_1, ADC_CHANNEL_2, ADC_CHANNEL_3, ADC_CHANNEL_4};

I've tried to tie the pins to VCC and GND, but nothing changes. It remains at values of 290-340 while ADC_CHANNEL_1 is zero. Looks strange. And it does not react for touching VCC and GND.
Maybe you have some ideas, why it is happening?

Best regards,
Fedor.

CAN AutoRetransmission setting logic is inverted

In the following lines, documentation and setting are incorrect :
https://github.com/foxBMS/foxbms/blob/ca7e8d58e8bf26559b63c53bc61c5b18f48a0347/embedded-software/mcu-primary/src/driver/config/can_cfg.c#L179-L181

https://github.com/foxBMS/foxbms/blob/ca7e8d58e8bf26559b63c53bc61c5b18f48a0347/embedded-software/mcu-primary/src/driver/config/can_cfg.c#L296-L298

Indeed, AutoRetransmission field should be set to :

  • ENABLE : if we want to retransmit the message until it has been successfully transmitted
  • DISABLE : to transmit only once, independently of transmission result

This error may has been caused by the CAN HAL driver update which changes the logic of this field (previously NART). See below this message on ST Forum : https://community.st.com/s/question/0D50X00009Xkg2MSAR/stm32f4xx-rework-of-hal-can-driver-examples

image

CAN protocol compatibility with other BMS units?

There are a lot of BMS/batteries on the market that use CAN, and I was wandering in foxbms is compatible with any if them...?
Eg:
BYD Battery Box
PYLON US2000 or US3000
LG RESU
DYNESS PowerBox
GCL variants
AlphaESS Smile
...
And many more
Etc... I'd be happy with just one common one of these, as it would make integration of a foxbms with existing hybrid inverters easier, as they usually support most common batteries/BMS like these.

Errors when BUILD_MODULE_ENABLE_CONTACTOR set to 0

When setting the BUILD_MODULE_ENABLE_CONTACTOR switch to 0 I get the following errors when attempting to recompile the primary MCU binary:

err: embedded-software\mcu-primary\src\application\libfoxbms-application.a(bms.c.1.o): In function `BMS_CheckCurrent':
C:\Programming\foxbms\build\primary/..\..\embedded-software\mcu-primary\src\application\bms/bms.c:977: undefined reference to `CONT_GetActivePowerLine'     
collect2.exe: error: ld returned 1 exit status

The problem seems to be the reference to the BMS_CheckCurrent function in bms.c. The function CONT_GetActivePowerLine is being referenced without a declaration or definition due to it being effectively removed from the code base by pre-processor(s) when BUILD_MODULE_ENABLE_CONTACTOR is set to 0.

Adding the following lines of code (in bms.c) fixes the problem, but this seems temporary at best:

  • Above line 976:
#if BUILD_MODULE_ENABLE_CONTACTOR == 1
  • Above line 1029:
#endif

I can create a pull request to remedy the issue if necessary.

Relevant files:

BMS enters config_assert while loop sometimes on Startup or while communicating through serial

Hello, i am using foxbms in eclipse with the GNU toolchain environment (GNU 10) . My setup communicates through RS485. The user can communicate with the system though serial port and use certain pre-defined commands to get the status of the system. However, sometimes during this process it stops responding completely. On debugging it is seen that it enters the configassert while loop. This sometimes also occur after startup of the system.

I am attaching the debug call stack with the issue, please do let me know what can be done.

Screenshot (21)

PEC for Open Wire commands are incorrect

In this file: https://github.com/foxBMS/foxbms/blob/master/embedded-software/mcu-common/src/module/ltc/ltc.c

static const uint8_t ltc2_BC_cmdADOW_PUP_normal_DCP0[4] = {0x03, 0x68, 0x1C, 0x62}; 
static const uint8_t ltc2_BC_cmdADOW_PDOWN_normal_DCP0[4] = {0x03, 0x28, 0xFB, 0xE8}; 
static const uint8_t ltc2_BC_cmdADOW_PUP_filtered_DCP0[4] = {0x03, 0xE8, 0x1C, 0x62};  
static const uint8_t ltc2_BC_cmdADOW_PDOWN_filtered_DCP0[4] = {0x03, 0xA8, 0xFB, 0xE8}; 

I noticed none of these PEC codes are correct. Notice also when the commands are different they use the same PEC code which is not possible. I saw other commands have the same issue.

could not resolved

I based your documents(Setting an Eclipse Workspace),install it step by step。the last import the project and build it。NO binaries
the version 1.6.4 foxconda 3.03
微信图片_20201213011203
微信图片_20201213011340
微信图片_20201213012147

Build issue

image

I could not able to build the software in eclipse

python tools/waf --help

➜ foxbms git:(master) ✗ python tools/waf --help
Waf: The wscript in '/home/sourcelink/work/test/foxbms' is unreadable
Traceback (most recent call last):
File "/home/sourcelink/work/test/foxbms/tools/.waf-2.0.15-ff6573b86ad5ff5d449c8852ad58b8bc/waflib/Scripting.py", line 102, in waf_entry_point
set_main_module(wscript)
File "/home/sourcelink/work/test/foxbms/tools/.waf-2.0.15-ff6573b86ad5ff5d449c8852ad58b8bc/waflib/Scripting.py", line 142, in set_main_module
Context.g_module=Context.load_module(file_path)
File "/home/sourcelink/work/test/foxbms/tools/.waf-2.0.15-ff6573b86ad5ff5d449c8852ad58b8bc/waflib/Context.py", line 355, in load_module
exec(compile(code,path,'exec'),module.dict)
File "/home/sourcelink/work/test/foxbms/wscript", line 122
conf.fatal(f'path to foxbms must not contain spaces'

How to solve this problem?

Message: CAN0_MSG_SOP Feature Support

Is there any timeline for adding support to this CAN message? It would be great to record the CAN0_SIG_MaxDischargePower for calculating battery drain rate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.