foxbms / foxbms-1 Goto Github PK
View Code? Open in Web Editor NEWfoxBMS 1, online documentation at https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen1/docs/html/latest/
Home Page: https://foxbms.org/
License: Other
foxBMS 1, online documentation at https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen1/docs/html/latest/
Home Page: https://foxbms.org/
License: Other
➜ 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?
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.
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:
#if BUILD_MODULE_ENABLE_CONTACTOR == 1
#endif
I can create a pull request to remedy the issue if necessary.
Relevant files:
If you need the foxBMS PCBA, please click on the link: https://www.youtube.com/watch?v=gXM_qo0uZdY
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.
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.
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
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.
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
Indeed, AutoRetransmission
field should be set to :
ENABLE
: if we want to retransmit the message until it has been successfully transmittedDISABLE
: to transmit only once, independently of transmission resultThis 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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.