Elbilforum.no

Bilmerker => Tidlige elbiler: Think => "Nye" TH!NK City produsert fra 2008 - 2012 => Emne startet av: BauDemo på mandag 31. oktober 2016, klokken 15:43

Tittel: Simulating BMI
Skrevet av: BauDemomandag 31. oktober 2016, klokken 15:43
Hi there,
I have been getting some e-mail about simulating BMI with the Duinomite Mega - the same hardware used on the Nicometer. Hope we can all chip in this thread and get to a point where one can easily change battery in the Think...
So keep posting about it here and I will help with what I can.

Nikolay
Tittel: Sv: Simulating BMI
Skrevet av: motorulfmandag 31. oktober 2016, klokken 16:57
Exactly was i was planing for aswell.

I found some information on page 18 of this file  http://vehiculeselectriques.free.fr/Download/Think/THINK%20City%20Enerdel%20Battery%20Service%20Manual.pdf

Also member Orla Pedersen says the BMI controlls the charger by a simple 0-100% command.
That is something i havnt found more information on yet.

Member VWspirit says ther is no special PCU-firmware for different batteries.
So I think the same CAN-commands would work on both gen1 and gen2.
Tittel: Sv: Simulating BMI
Skrevet av: motorulfmandag 31. oktober 2016, klokken 17:32
The service manual seams to mostly show info on error codes, maybe not very intresting... 

Also, there is this open source project called gevcu started by EVTV.
Somebody wrote some code to talk to the think BMI.
https://github.com/collin80/GEVCU/blob/master/ThinkBatteryManager.cpp
There we can see some CAN commands, 2 bytes for controlling charging voltage, 2 bytes for controlling charging current. There are also other quite interesting info there  :)

In a code comment they are refering to other CAN frames in the Think BMI specification.
It would be golden to find that specification  :)
Tittel: Sv: Simulating BMI
Skrevet av: PRenselmandag 31. oktober 2016, klokken 17:34
For some reason the Zebramonitor software doesnt see that my Peak adapter is installed so i have used pcanview to read the CAN traffic.

I have traced down the error to msg 0x305 bit 51/52 (byte 6, bit 3/4), sys_Zebra_TempError.
According to the A306 CAN Messages definitions the value 0, 1 and 3 are defined but my error has value of 2.
0 = OK
1 = Power Limit Temp reached
3 = Full Power Limit Temp reached

Anyone know what error value 2 means ?

Could this be a defective temp sensor ?









Tittel: Sv: Simulating BMI
Skrevet av: PRenselmandag 31. oktober 2016, klokken 17:37

It would be golden to find that specification  :)

I have 3 documents about the CAN traffic for the Enerdel and Zebra BMI.
Tittel: Sv: Simulating BMI
Skrevet av: motorulfmandag 31. oktober 2016, klokken 17:43
I can has too?   8)

maybe put on some file sharing site, like minus.com or other.
Tittel: Sv: Simulating BMI
Skrevet av: aurbamandag 31. oktober 2016, klokken 18:44
I can has too?   8)

maybe put on some file sharing site, like minus.com or other.

And link to it here elbilwiki.no-Ny-Think (http://elbilwiki.no/index.php/Ny-Think)
 :D
Tittel: Sv: Simulating BMI
Skrevet av: PRenselmandag 31. oktober 2016, klokken 20:00
This is what I have:

MES-DEA Zebra:
https://dl.dropboxusercontent.com/u/27571755/ThinkA306/MES-DEA%20BMI.pdf

Enerdel CAN Bus Guide rev 3.0
https://dl.dropboxusercontent.com/u/27571755/ThinkA306/Vehicle_CAN_Bus_Guide_V3.0.docx


If anyone has more or other info, please share.
Tittel: Sv: Simulating BMI
Skrevet av: motorulftirsdag 01. november 2016, klokken 08:57
I have edited the 8 pages that was here for a while yesterday.
I have checked with the appropriate person and these are ok for sharing here now.
https://www.dropbox.com/sh/jc7kh4kp9ta91mb/AAC0AUfTG5XneNdjZ1Xq9Tvva?dl=0 (https://www.dropbox.com/sh/jc7kh4kp9ta91mb/AAC0AUfTG5XneNdjZ1Xq9Tvva?dl=0)
Tittel: Sv: Simulating BMI
Skrevet av: Orla Pedersentirsdag 01. november 2016, klokken 12:33
I never meant to hide the information, and "motorulf" have done a great job in removing the comments from the dokuments. The comments could/could not, compromise my source if noticed by the wrong persons. That is, if anyone chases copyrights anymore.

Now we don't know where it comes from, right   ;D
Tittel: Sv: Simulating BMI
Skrevet av: motorulftirsdag 01. november 2016, klokken 14:28
I was trying to get my head around what a BMI simulator needs to do.
I started making a flowchart and ended upp with something with a little bit of BMS functionallity.
Maybe this is not what others need, but this is what i need it to do.

This flowchart is not by any means complete, far from it, and i know plenty missing functions.
I made it online on draw.io and i will link to the XML if somebody wants to edit it, correct it, expand it... Please share if you do.
https://www.dropbox.com/s/4fueyz5e1fgtro1/BMI-emulator_flowchart.xml?dl=0 (https://www.dropbox.com/s/4fueyz5e1fgtro1/BMI-emulator_flowchart.xml?dl=0)

Maybe it is useful for somebody, who knows?  :D
Tittel: Sv: Simulating BMI
Skrevet av: PRenseltirsdag 01. november 2016, klokken 19:03
That is, if anyone chases copyrights anymore.

Nobody owns the rights to anything of the Think anymore so dont worry about that.

Just made progress on the 'Think-o-later' (short for Think Simulator). It can now mimic the BMI so my Think is now 'thinking' that everything is ok.
No more flashing wrenches, Power-limit or hazard symbol anymore, even without the BMI unplugged.
I can even control the fuel-meter so i can take an actual Ah-counter and reflect the SOC to the fuel meter.

Next step is to attach a suitable battery pack and drive away....




Tittel: Sv: Simulating BMI
Skrevet av: Orla Pedersentirsdag 01. november 2016, klokken 19:07
A few things to consider when building a BMI-emulator.

When working with battery powered circuits there are things to consider. First of all, no software should be allowed to run without a separate hardware implemented watchdog, periodicalle reset by the running software. If the software stops for any reason, the watchdog must disconnect the main contactors.

It's always a good idea to devide the software control into to systems with separate hardware, ei. one hardware with software doing calculation and main control of systems, and another hardware/software taking care of data collection and safety issues, both of them checking each other and making controlled shutdown if one of the hardware/software fails.

Remember that even the "small" output of the charger, out of control is capable of setting the batteries on fire.
Tittel: Sv: Simulating BMI
Skrevet av: Orla Pedersentirsdag 01. november 2016, klokken 19:10

Nobody owns the rights to anything of the Think anymore so dont worry about that.


Probably not, it's all in the hands of the recievers for many years to come.......
Tittel: Sv: Simulating BMI
Skrevet av: PRenseltirsdag 01. november 2016, klokken 19:26
Since the Zebra battery is pretty new to me can someone explain how the Zebra/AC heater stuff works ?

Tittel: Sv: Simulating BMI
Skrevet av: Orla Pedersentirsdag 01. november 2016, klokken 19:44
Since the Zebra battery is pretty new to me can someone explain how the Zebra/AC heater stuff works ?

When connected to mains the BMI is regulating temperature with a 230 volt heating mat placed on top of the cells. The BMI contains two "switches", one mecanical relay, and one semiconducter switch in series.

When not mains connected a similar circuit with its own heating mat and switches takes over heating for as long as there is power on the battery.

On my zebra the AC recognition was eratic, and maybe even the temperature regulation suffered. The mains AC was certainly present on the BMI-connector but not always recogniced by the BMI-software. Eventually one week-end the BMI-fault probably "fried" the battery I think.
Tittel: Sv: Simulating BMI
Skrevet av: PRenseltirsdag 01. november 2016, klokken 20:41
Ok, i have checked wat happens when i use the charging cable with the Zebra battery/BMI.
To check first I took out the round AC connector and theres 230V at outer pins, so the AC power all the way to the BMI does work.

Using pcanview i can see that the AC heater switch is closed and AC heater relay is enabled.
The battery is 115.0 degC so it should warm up first before charging.

Is there anything else to check if its really heating up ?


Tittel: Sv: Simulating BMI
Skrevet av: Orla Pedersenonsdag 02. november 2016, klokken 07:37
Just made progress on the 'Think-o-later' (short for Think Simulator). It can now mimic the BMI so my Think is now 'thinking' that everything is ok.
No more flashing wrenches, Power-limit or hazard symbol anymore, even without the BMI unplugged.
I can even control the fuel-meter so i can take an actual Ah-counter and reflect the SOC to the fuel meter.

Next step is to attach a suitable battery pack and drive away....

Great, could next step be bringing communication on the canbus to a minimum? We know that the BMI is running in "broadcast" mode, and that means a lot of information is send on the canbus, but how much is actually listened to by the PCU. There is no need for the emulator to "flood" the canbus with unnessesary information I think.

Good work!  :)
Tittel: Sv: Simulating BMI
Skrevet av: PRenselonsdag 02. november 2016, klokken 11:16
I believe lots of BMI traffic can be left out just for the PCU.
In the other post i made about the Think CANalyzer you can see clearly whats is needed and what not.
For most data i have created a 'translator'. It is still very beta but usefull as it is.
Tittel: Sv: Simulating BMI
Skrevet av: stradivariaonsdag 09. november 2016, klokken 15:59
Hi All,

I do not understand what is the target of this group?
Would you like to connect Gen 1 PCU with Enerdel battery, or you would like to connect any other battery to PCU Gen1 and Gen2?

RMI
Tittel: Sv: Simulating BMI
Skrevet av: PRenselonsdag 09. november 2016, klokken 17:18
would like to connect any other battery to PCU Gen1 and Gen2?

Thats it :-)

Tittel: Sv: Simulating BMI
Skrevet av: stradivariatorsdag 10. november 2016, klokken 11:37
So, what did you left to do?

I would be glade to help you...

There is already solution to replace Zebra with ENERDEL pack on GEN1,
I can fix 80% of all faults in ENERDEL pack.
If you have some broken Erelec, or Melec, send it to me, I can replace it with working parts.

Tittel: Sv: Simulating BMI
Skrevet av: BauDemofredag 11. november 2016, klokken 11:43
The purpose of simulating the BMI is to be able to use ANY battery with the Think.
So the choices would not be limited by only Enerdel or Zebra.

For example someone may want to build a battery pack out of nissan leaf battery modules and then use it in a Think.
Tittel: Sv: Simulating BMI
Skrevet av: Orla Pedersenonsdag 16. november 2016, klokken 10:35
Small news about initialization.
The BMI sends message ID H300 at startup, it keeps "Software version, revision, Id 1, Id 2, Id 3, Hardware version, Init succesfull, Battery address". Eight bytes in all.
I've just checked the remains of my cars BMI, and even if quite corroded i some places it still communicates, and the message ID H300 returns exactly the same pattern as that P.Rensel found in his car, "03 0B 0E 4D 44 02 01 00" or in decimal, "03 11 14 77 68 02 01 00".

(http://www.tfv-org.dk/th!nk/diagnose/foto/d_141116.jpg)

Even though there might be different Id.'s in zebra batteries it's obvius now, that they don't send unique Id.'s to the PCU. That makes me wonder if the PCU only cares about "Init Succesfull" ?

The screenshot is from my version of a diagnostic only software on the DuinoMite platform, and based on BauDemo's original software. As sone as I'm comfortable with reliability and some extensions I'll share the program, patience please  ;)
Tittel: Sv: Simulating BMI
Skrevet av: PRenselonsdag 16. november 2016, klokken 13:44
The BMI sends message ID H300 at startup, it keeps "Software version, revision, Id 1, Id 2, Id 3, Hardware version, Init succesfull, Battery address". Eight bytes in all.

I have been working on reverse-engineering the Zebra battery en Zebramonitor and have created a Zebra simulator. This is an Arduino with CANbus who simulates the original Zebra battery.
I can even 'talk' to it with Zebramonitor and the Zebramonitor thinks it is connected to a real battery pack.  I have also found a way of resetting some values in the Zebra pack like cell fail count, cell fail percentage etc which you normally have to have a MES-DEA code for it to change.

When the Zebra starts it sents out the packets 0x300, 301, 302, 303 and 304 and every 10 second 30E and 30F.

In return it expects the packets 0x310 and 0311 from the car. When these car-packets are not there it wont turn on the contacters so the pack doesnt provide any voltage.

In return by sending the packets 300-304 tot the car with the appropriate bits sent the car is enabled and ready to drive.

If the pack has an error (too many failed cells for example) it sents out a bit-error to the car and the car starts blinking the power-limit light and cannot drive anymore until faults are corrected or reset.

The Zebramonior talks to the battery with packets 0x500, 0x520, 0x530 and 0x581
It uses a simple scheme to request data from the battery or can set variables in the battery.

Resetting any faults doesnt mean the fault itself is corrected.
For example my pack was shutdown because it had too many failed cells, 16 in total.
The limit is set to 10% per string of 144 cells, so 14 is the limit.
By resetting the 10% value to 15% or by changing the failed-cell count to 0 i could restart the pack again :-) But this doesnt mean that the pack is usable again.
 

Paul




Tittel: Sv: Simulating BMI
Skrevet av: Go-carteronsdag 16. november 2016, klokken 14:30
Exciting to hear this! I only have limited experience in programming Arduino, so its fun to see you guys coping with it.

Is there a light in the tunnel for making an interpretator/"box" between the PCU and a new battery and for instance making up a battery of Leaf-cells? Or similar.

 
Tittel: Sv: Simulating BMI
Skrevet av: PRenselonsdag 16. november 2016, klokken 15:19
Is there a light in the tunnel for making an interpretator/"box" between the PCU and a new battery and for instance making up a battery of Leaf-cells? Or similar.

Yes thats no problem at all really know all the traffic between PCU and BMI/BMS is analyzed.
I actually have this working with my Zebra emulator letting the Think believe it is connected to the battery while it is not :-)
And also the other way around letting the Zebra believe it is controlled by the Think.
And on top of that the Zebramonitor software is 'looking' at it and not seeing any errors :-)

It is all very experimental though and certainly needs some cleaning up before sending out boxes.


Tittel: Sv: Simulating BMI
Skrevet av: stradivariafredag 18. november 2016, klokken 15:17
This is my idea, but is it not better to take real BMS system and make it working with Think PCU.

Then you can use any cells you want, Nissan, Mitsubishi, Enerdel, Kokam, Eag...

I think it would be less work :)
Any way battery has to have BMS system, if it is open source, then you can use any cells.

I see, that you already have many messages on the list....

Tittel: Sv: Simulating BMI
Skrevet av: Orla Pedersenfredag 18. november 2016, klokken 16:09
This is my idea, but is it not better to take real BMS system and make it working with Think PCU.

That would probably be the case in many situations, and then the "BMI-emulator" would be a "PCU to BMS" interface. Anyway this interface would need different coding to "please" different BMS's, but act the same against the PCU. Much of the work would be the same in each case.
Tittel: Sv: Simulating BMI
Skrevet av: Dariusz Kowalczyktorsdag 01. juni 2017, klokken 08:23
This is my idea, but is it not better to take real BMS system and make it working with Think PCU.

That would probably be the case in many situations, and then the "BMI-emulator" would be a "PCU to BMS" interface. Anyway this interface would need different coding to "please" different BMS's, but act the same against the PCU. Much of the work would be the same in each case.

Hi all :)
I'm new member of this group. Got Think with faulty Zebra battery and found this fantastic forum. The idea of simulating BMS is just great, and I'm more than happy to help you guys to test it or develop it further. How is the progress of the BMS emulator?

Darek
Tittel: Sv: Simulating BMI
Skrevet av: Søren Nielsenfredag 29. desember 2017, klokken 19:46
Any news in the simulation software ??
Tittel: Sv: Simulating BMI
Skrevet av: Orla Pedersenlørdag 30. desember 2017, klokken 20:16
Jeg er ikke kommet videre med mine ideer endnu, af mange grunde, (prioriteringer ikke mindst). Jeg ved ikke om andre har udviklet siden sidste indlæg.

Not much progress in my project due to several reasons, (priorities). I have no idea if anyone else have worked on the idea since last post.
Tittel: Sv: Simulating BMI
Skrevet av: Lukáš Kvasnicafredag 19. april 2019, klokken 20:47
Hi all,
one year ago I bough Citroen Berlingo Venturi originally powered by Zebra battery but without battery itself.
I spent lot of time to get all information about Zebra battery BMI and my colleagues and I was able to build compatible LiFePO4 replacement. I realized that something like Zebramonitor software exist but I am not able to find it anywhere. If anyone of you have it could you provide it to me? I would like to test our BMI against it. Anyway if you are interested about our work lets see it there https://www.wernherd.eu/.

Thanks
Tittel: Sv: Simulating BMI
Skrevet av: pexicsøndag 21. april 2019, klokken 19:06
Hello everyone

This is my first post on this forum threfore some quick info about me/my Th!nk:
- I'm from Bucahrest - eastern europe
-I just bought a black defective think A306 from Austria
-My English is far from perfect, sorry in advance for that.

My big plans are:
-repair the actual battery pack
-remove the electric heater and install a webasto under the driver seat.
-replace and relocate the 12V battery. Relocate somewhere in the former electric heater place, replace with LTO battery (Lithium tithanate) 5 or 6 cells in series - 20-30Ah capacity.
-after repairing the actual deffective battery I plan to emulate the BSI and install a new battery  (LTO)
why LTO ?
>20.000 cycles
>works very well at -20...-30 celsius
>highest current / fastest charge (I have charged one 30Ah cell with 200A many times without problems)

Anyway I will try to make different topics/posts for each modifications.

Back to the actual topic : I want to know if the people who actually done this beatifull job (emulating BMI/BSI) are still active on this forum and if they whant to share/sell their work progress.
I "think" this is the best solution for keeping our Thinks on the road.

Sorry for this long post and please forgive my very limmited english vocabullary, I'm also very sorry that I cannot speak Norvegian language, for me it sound like a "only for real men" language :)

Have a nice evening/easter!
Tittel: Sv: Simulating BMI
Skrevet av: pexicmandag 10. juni 2019, klokken 18:30
Hello

I dare to add here my idea related to this subject since I see little movement in the past year :)
I want to build an RLEC simulator (so to keep the actual working MLEC board to do his job).
The Rlec simulator will clone all 16 Rlec boards using an arduino + canbus shield boards.
I'm begginer on the Arduino field but I'm not afraid to work&learn.

What I want to do exactly :
-This Arduino + canbus shield boards ( let's call them Rleclone  :) )  must feed the MLEC board with necessary info : voltage of cells, voltage of packs, temps and ...anything else or that's it ?
-Separate and stand-alone bms for the cells.

For this I've started to study the CAN comunication between MLEC and 16xRlec boards.
As far I read only some info are useful for MLEC , not all ( for example only "filtered" voltages )
so it should not be so complicated...
I will use Rleclone to measure one single pack voltage (44volts average) and send this value to MLEC for all 16 packs.
Meaning that all 16 packs will have the same pack voltage (and cells voltages) in the eyes of MLEC board.
For "filtered" cells voltage I will simply divide the pack voltage by 12 in the software :)
Same idea for temperatures.
I can do that since the future stand-alone BMS will work continuosly to keep all cells voltages egual.

Thanks in advance for your feedback & help.
Tittel: Sv: Simulating BMI
Skrevet av: pexictirsdag 25. juni 2019, klokken 12:12
Hello friends

I've captured the start communications (via internal Enerdel battery CAN) between MLEC and RLEC's

Please see attached file (remove .txt extension) :
 [ You are not allowed to view attachments ]
I think this is the color code:
Violet - broadcast MLEC requests
Grey - MLEC request addresed to a specific RLEC board
Light Blue - RLEC broadcast  (ignored by MLEC - so not mandatory)
Green - specific RLEC response to MLEC requests (mandatory)

Please tell me if you think oitherwise ;)

Thank you
Tittel: Sv: Simulating BMI
Skrevet av: worrytorsdag 04. juli 2019, klokken 07:44
Hello pexic!
I'm sorry to say I can't give any help or comment, as I know little about electronics and data.
But I follow your project with great interest. I have a functional Li-battery, but most of my RLECS are gone.
Keep on, and tell us what you find. Thank you.
Tittel: Sv: Simulating BMI
Skrevet av: pexicsøndag 07. juli 2019, klokken 18:11
Hi Worry, thank you  :)  I'm working on it, our friends , the Chinese from aliexpress :) sent me the hardware and I will start testing very soon :)

https://www.aliexpress.com/item/32647794351.html?spm=a2g0s.9042311.0.0.73fa4c4d2CZl4I
+
https://www.aliexpress.com/item/32697443734.html?spm=a2g0s.9042311.0.0.27424c4dU0GohT

Regards!
Tittel: Sv: Simulating BMI
Skrevet av: pexictirsdag 09. juli 2019, klokken 08:34
Attached is the draft of my flowchart  :)
 [ You are not allowed to view attachments ]

The 400V-250V battery voltage range will be conevrted to 2,5 - 4.2v isolated voltage for arduino AD input.
This will be "The cell voltage" reported by arduino for all cells
The pack voltage (44,4V) will be also reported by arduino but basically will be cell voltage multiplied by 12 and this will be made "software" style ;)
In this way I can put any type of cells ("battery"), not only Li-Ion, because in reality I only measure the whole pack voltage (400-250v)

Thecell balance and cell monitoring, as I said, is a separate job (see my previous posts).

Regards
Viorel V.
Tittel: Sv: Simulating BMI
Skrevet av: pexiconsdag 24. juli 2019, klokken 11:33
Ok, the hardware is here.
 [ You are not allowed to view attachments ]

But... my battery is working perfectly after Rlec modifications so it will take some time till I'll test the Rlec clone, untill then i will start learning arduino ;)
I'll keep you posted.