Twizy Virtual BMS
- TwizyChrisy
-
- 10k Boarder
-
- Der Trend geht klar zum Zweittwizy äähhh....
- Beiträge: 19021
- Dank erhalten: 10952
Mehr Twizys, mehr Freude.
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- mio900
-
- Fresh Boarder
-
- Beiträge: 5
- Dank erhalten: 15
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- Delvecchio
-
- Pro Boarder
-
- Fabio java
- Beiträge: 619
- Dank erhalten: 1038
With no promises for the future, may be it will be possible in a short time to use for bigger battery the original BMS (also with decreased SOH), without reserve canister effect.

About your questions, you find a clear schematics in klaus's BMS implementation (it is linked in the dexter's virtual BMS github).
I started with it.
My adding to that project are working, but I need to improve some things (for example SOC calculation accuracy) before discussing about.
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- TwizyChrisy
-
- 10k Boarder
-
- Der Trend geht klar zum Zweittwizy äähhh....
- Beiträge: 19021
- Dank erhalten: 10952
Mehr Twizys, mehr Freude.
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- mio900
-
- Fresh Boarder
-
- Beiträge: 5
- Dank erhalten: 15
Thank you for your prompt response. I haven't purchased the LIFEPO4 cells yet; I was evaluating what to do. Your reflection on CALB is not wrong; in fact, it turns out to be the simplest solution at the moment. I've read a lot on this forum, and I assume that some user should develop a BMS shortly, which would be great. I've ordered 14 CALB cells of 195Ah; other capacities were no longer available. Although it seems strange to me that with all the electronically skilled people present here, no one has managed to modify the original BMS. Perhaps there isn't much interest in doing so.
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- Delvecchio
-
- Pro Boarder
-
- Fabio java
- Beiträge: 619
- Dank erhalten: 1038
Yes, me! But we are off topic here.mio900 schrieb: ...no one has managed to modify the original BMS...
You still have to wait a little until I complete the tests.
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- mio900
-
- Fresh Boarder
-
- Beiträge: 5
- Dank erhalten: 15
Delvecchio schrieb:
Yes, me! But we are off topic here.mio900 schrieb: ...no one has managed to modify the original BMS...
You still have to wait a little until I complete the tests.
Perfect, then I'll wait for news from you, thank you.
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- dexter
-
- Autor
- Moderator
-
- Beiträge: 6039
- Dank erhalten: 4227
Delvecchio schrieb: I have a question because I guess I'm suffering of timing problem.
In the timer ticker callback I read this note:
// Note: avoid complex operations, this needs to be fast.
How much could last the callback function?
I think for sure less then 10 ms, but is there a max timing value I can take as a reference?
I ask this because I'm using an ADC ADS1115 to retrieve voltage values for current sensors, cells voltage and temperature sensors and this ADC, also if set for the fastest reading, takes about 2,7ms to complete a reading with an arduino nano.
For this reason I'm currently taking two readings for each timer ticker call, but I can reduce to one.
Correct, you need to stay well below 10 ms to avoid ticker overruns.
A maximum time share available is hard to determine, as the time needed by the framework depends on the software configuration, the ECU state and the CAN bus state.
A major consumer of CPU time is the debugging (TWIZY_DEBUG_LEVEL & MCP CAN DEBUG_MODE), as the standard Arduino serial output is slow and may even block, when the buffer is full. Setting the highest baud rate available helps, but reducing and avoiding debug outputs as soon as possible is the best option. There may be new options available now, possible a better serial library replacement. And using an ESP type Arduino instead of course yields a much higher performance, and would also make using a Wifi network channel an option.
I never tried to determine a "safe" maximum, but I'd generally recommend staying below 5 ms in the callback, to keep enough headroom for the framework.
And, btw, very nice & valuable work!
Michael
Twike 3 (2001) … Emco Novum (2011) … Twizy 80 (2012) … Mii electric+ (2020)
dexters-web.de
Bitte Anmelden oder Registrieren um der Konversation beizutreten.