Page 3 of 4

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Tue Jul 08, 2025 7:47 am
by tom91
I will review the code when I get a chance and approve it.
Mitchy wrote: Tue Jul 08, 2025 12:20 am Ran into some issues when testing, but it does initiate a charge.
So you have it running on an ZombieVerter with other components connected?

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Tue Jul 08, 2025 9:26 am
by evMacGyver
Mitchy wrote: Tue Jul 08, 2025 12:20 am I stripped out all of the UDS stuff for now, Leaving that for the CAN-Bridge...
It should have a pretty good basis for CCS charging; So if you happen to have your system wired up with the DC Bus connections, I'd be interested to see if you can play around with the code to get it to work.
Nice work! I'll set up table test with zombie and connect charger to the battery. I also have pyPLC EVSE for simulating CCS charge if it helps. But I don't have correct charging socket with plug and cover locks, so I need to wait for UDS coding stuff. If you add it inside charger module, just like Foccci ConfigCan function, I could try it even there is no parameter for it.

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Tue Jul 08, 2025 10:53 am
by tom91
evMacGyver wrote: Tue Jul 08, 2025 9:26 am If you add it inside charger module, just like Foccci ConfigCan function, I could try it even there is no parameter for it.
Not that simple. Will require quite a bit of testing to get things running just right. Need the right flow of requests and responses.

Also need to ensure it does not interfere with other parts of Zombie code

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Tue Jul 08, 2025 10:58 am
by Mitchy
tom91 wrote: Tue Jul 08, 2025 7:47 am I will review the code when I get a chance and approve it.



So you have it running on an ZombieVerter with other components connected?
Bench tested with the most recent vehicle_testing branch.
I did upload it with the Simulate function still active :oops: , so may be best to reject it and I'll sync it up once modelfan reports back.
Tried to do a online edit once I realized, then a pull request via vscode; somehow got out of sync, so gave up for the night on it.

There's still some improvement to be had, I'm sending more msgs than absolutely required. But it's a good first step to get more testing done.

The PDK shifter and VAG_Utils code is being used in my build; the MQB function is being used for my vehicle CAN spoofing; so both functions of the Utils is proven.

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Tue Jul 08, 2025 11:03 am
by tom91
Mitchy wrote: Tue Jul 08, 2025 10:58 am I did upload it with the Simulate function still active , so may be best to reject it and I'll sync it up once modelfan reports back.
I think you could amend it, you can always get your own Branch to the state you want and do a new request. Then I will close the old one and accept+run checks on the new one.

Then we can merge it into vehicle testing and have others also try it.

It is great progress :)

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Thu Jul 17, 2025 11:21 pm
by modellfan
Thank you very much . I looked through all of it to start testing soon. My problem is , I don’t have the zombieverter bms info in my parameters . Do you have a version where you simulated those parameters like battery current ? I see some stubs in your code , but it’s unclear for me why you copy like a= b and then b= a

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Mon Jul 21, 2025 5:29 am
by Mitchy
A lot of the values being sent to the charger are similar enough that with the limited data, I end up copying the value into the various CAN messages.
The thing is that some use different scaling. I think that's where most of the copying values originates from.
There may be some back and forth copying, but I'm not sure if there's any circular references as such.

Most of the codebase is to align to the norms of zombieverter params, so you'll find a few switch conditions, as well as the power setpoint being a back calculation for amperage setpoint.

You likely won't need any of the BMS stuff; It should work on the bench without any BMS params, you'll mainly just need to set the voltage min/max in the zombie setup params.
I confirmed the charger has internal shutdown routines to prevent overcharge to the max voltage value, as well as it ramps down and will enter standby mode if SOC is at %.
The BMS values for Cell Temp and Voltage aren't used directly by the charger, but I kept them mapped in case there's some additional safety check with CCS. But to be honest they're probably for logging and fault freeze-frame data only.

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Wed Jul 30, 2025 11:00 pm
by modellfan
Thank you very much. I gave it a clear information flow structure and cleaned it up. In the next days, I will test it on the real vehicle.

https://github.com/Modellfan/Stm32-vcu_ ... le_Testing

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Thu Jul 31, 2025 4:55 am
by RetroZero
I'm throwing a battery simulator together to see if that helps get consistant charging sequences. Would appreciate if you guys gave me pointers in the mqb charger thread....

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Thu Jul 31, 2025 6:33 am
by modellfan
Why pointers and not use Params as RTE replacement ?

What exactly do you simulate ? A battery simulator to be used as predictive model would be really neat .

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Thu Jul 31, 2025 11:33 am
by RetroZero
I am using parameters. I am simulating SOC, max/min voltage and current. I'll put it all together and try it in the morning. Just wanted a trained eye to see if I missed anything. I have a predictive simulation as well, but I'll try the easy way for now by spoofing the charger before starting the charge sequence, and see if that helps get conclusive charging sequences.

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Thu Jul 31, 2025 9:56 pm
by modellfan
I wasn’t able to fully run and test the code for now. Had some issues as it seems like to many parameters freeze my esp8266 uart interface

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Fri Aug 01, 2025 1:14 am
by Mitchy
If the simulate question was for me, it's not required
It was included just to mock having 400v applied, as I was bench testing with just a dummy load.

As for the parameters, Haven't looked at your codebase, but many of the ones I have mapped aren't needed.
I do suggest migrating to the ESP32 CAN based interface; If you have any more than one OI based item anyway.

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Fri Aug 01, 2025 5:33 am
by RetroZero
Mitchy wrote: Fri Aug 01, 2025 1:14 am If the simulate question was for me, it's not required
It was included just to mock having 400v applied, as I was bench testing with just a dummy load.

As for the parameters, Haven't looked at your codebase, but many of the ones I have mapped aren't needed.
I do suggest migrating to the ESP32 CAN based interface; If you have any more than one OI based item anyway.
I have a bench test setup as well with dummy load, so looking for anything I might be missing to spoof battery voltage.

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Fri Aug 01, 2025 3:34 pm
by modellfan
@Mitchy, did you already bench test your code base?

I don't get a charging session initialized. It's not about the hardware, as I get it working with the Teensy code.

https://www.youtube.com/watch?v=iWVAdwRuo7c

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Fri Aug 01, 2025 8:22 pm
by modellfan
After debugging for some time I have to ask, if you did test the code before. Just one example.
Working teensy code:

Code: Select all

  if (BMS_HV_Status = 1)
  {
    HVK_DCDC_Sollmodus = 2; // Voltage Status: 0=Init, 1=NoVoltage, 2=Voltage, 3=Fault & Voltage
    EM1_Status_Spgfreiheit = 2; // Voltage Status: 0=Init, 1=NoVoltage, 2=Voltage, 3=Fault & Voltage
    HVK_Gesamtst_Spgfreiheit = 2; // Voltage Status: 0=Init, 1=NoVoltage, 2=Voltage, 3=Fault & Voltage
  }
  if (BMS_HV_Status = 0)
  {
    HVK_DCDC_Sollmodus = 1; // Voltage Status: 0=Init, 1=NoVoltage, 2=Voltage, 3=Fault & Voltage
    EM1_Status_Spgfreiheit = 1; // Voltage Status: 0=Init, 1=NoVoltage, 2=Voltage, 3=Fault & Voltage
    HVK_Gesamtst_Spgfreiheit = 1; // Voltage Status: 0=Init, 1=NoVoltage, 2=Voltage, 3=Fault & Voltage
  }
Not working Zombie Code:

Code: Select all

  if(BMS_HV_Status == 2)
  {
    HVK_DCDC_Sollmodus = 2;         // Voltage Status: 0=Init, 1=NoVoltage, 2=Voltage, 3=Fault & Voltage
    EM1_Status_Spgfreiheit = 2;     // Voltage Status: 0=Init, 1=NoVoltage, 2=Voltage, 3=Fault & Voltage
    HVK_Gesamtst_Spgfreiheit = 2;   // Voltage Status: 0=Init, 1=NoVoltage, 2=Voltage, 3=Fault & Voltage
  }
  if(BMS_HV_Status == 1)
  {
    HVK_DCDC_Sollmodus = 1;         // Voltage Status: 0=Init, 1=NoVoltage, 2=Voltage, 3=Fault & Voltage
    EM1_Status_Spgfreiheit = 1;     // Voltage Status: 0=Init, 1=NoVoltage, 2=Voltage, 3=Fault & Voltage
    HVK_Gesamtst_Spgfreiheit = 1;   // Voltage Status: 0=Init, 1=NoVoltage, 2=Voltage, 3=Fault & Voltage
  }

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Sat Aug 02, 2025 12:18 am
by Mitchy
Yeah Its working on my bench setup,
I'll take another look over the weekend, just need to finish another project with my bench powersupply.
I'll grab a CAN log of the charge session initialization as well.

The teensy codebase is messy, as the first one I uploaded contained just = in the if statements.
By some act of god, it worked. I have no idea how, but I fluked in to the state machine being satisfied. It even starts the charge sequence a bit faster than the 'corrected' state machine.

If the zombie codebase isn't working for you, check your min/max voltage limits in the zombie config, That threw me for a loop.
You'll also need to set the zombie clock. Which ended up getting me as well.

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Sat Aug 02, 2025 9:51 am
by modellfan
Last night, I coppied over the state machine from teensy (except the wrong conditions) and also the preset values. Now it is working. First time I get a green light charging. https://github.com/Modellfan/Stm32-vcu_ ... le_Testing

Next steps?:
  • I created a pull request to your code base
  • Improve the state maschine, if necessary. E.g. the activity counter logic isn't implemented anymore, as both cases in the if statement were the same
  • CHeck set values against VCDS. e.g. Yesterday I found out SOC set to 100% leads to 25% in VCDS
  • Test implementation in ZombieVCU
@mitchy, if you like we can have a call to push the topic.

https://www.youtube.com/shorts/wizVLMsvUwY

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Sat Aug 02, 2025 9:59 am
by modellfan
I just found out, that no power target but only current target set in simulation mode, nulled out the target current. Maybe this was all the problem I had

Code: Select all

    if (charger_params.HVcur > 1000)
    {
        charger_params.calcpwr = 12000;
    }
    else
    {
        charger_params.calcpwr = charger_params.HVcur * (battery_status.BMSVoltx10 / 10);
    }

    charger_params.HVpwr = MIN(charger_params.HVpwr, charger_params.calcpwr);

    charger_params.IDCSetpnt = charger_params.HVpwr / (battery_status.BMSVoltx10 / 10);

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Sat Aug 02, 2025 3:22 pm
by RetroZero
Are you running this on a common CAN line?

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Sat Aug 02, 2025 3:55 pm
by modellfan
Nope . Can 1 webinterface , Can 2 charger

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Sat Aug 02, 2025 4:04 pm
by RetroZero
Do you need the web interface? I'd like to hack/compare with the 3.6Kw charger, but I don't have a zombie or stm32_vcu. I imagine running my code on an arduino due with 2 CAN circuits

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Sat Aug 02, 2025 7:56 pm
by modellfan
You would need to rewrite some of the code to run it on an arduino . Webinterface is useful for debugging but a serial console would also do it

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Sat Aug 02, 2025 8:39 pm
by m.art.y
Guys, does the 11 kw charger need to be configured first to get it to work? If not the original socket is used?

Re: MLBevo Charger- 11kw & 22kw Info

Posted: Sun Aug 03, 2025 6:17 am
by RetroZero
modellfan wrote: Sat Aug 02, 2025 7:56 pm You would need to rewrite some of the code to run it on an arduino . Webinterface is useful for debugging but a serial console would also do it

So engine and hybrid can are tied together? I'm using vcds to see and adapt values....
When you say Webinterface, you mean the Openinverter WI, with a zombie vcu as your platform for communicating with the charger?