The ZombieVerter VCU Project

Locked
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: The ZombieVerter VCU Project

Post by mdrobnak »

Dilbert wrote: Thu Feb 04, 2021 5:20 pm Off the throttle seems to be about -100, then when the brake is applied it applies a variable torque proportional to the braking force required.

I have the MG2 speed also from the HTM frame on the same graph, so if we want to mimic how a toyota hybrid drives that should be no problem. I'll post up the full graph. We should also be able to see the MG2 speed that the system will regen down to.

I'm kinda undecided if we should include the gear selection in any algorithm for regen, or just do it like the simple algorithm above, which is based of MG2 direction of travel. I'm thinking if the vehicle rolls back might it correct in the wrong direction :o
If you've had this thought, then you've already figured out that it needs to be a bit more nuanced. :-)
Simple + direction taken into account might be your first pass, but that likely is a minimum. What's the vehicle speed? If it's below a certain value, probably don't want to do anything... That's probably another easy one.

-Matt
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post by Dilbert »

Here are the MG2 speed and torque for a drive cycle, this should give us a starting point for the torque during the various stages of regen etc..
Attachments
MotorSpeedAndTorqe_4_2_2021.xlsx
(55.24 KiB) Downloaded 192 times
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post by Dilbert »

I had a look at the FOC firmware today, there is some nice code in there that could possibly be re-used for this application to keep things similar enough. Although i want to try out the simple logic above before trying to do anythign more complex.

Also i'm thinking long term the likes of the direction selection should be moved to a higher level (100mS task), so it will work for both leaf and Toyota and not be implemented down in the HTM transmit routine.
User avatar
Jack Bauer
Posts: 3649
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Makes sense. I'm going to work on the Pius/Gs450h menu selection. Assuming I just need to specify a different offset in the 1ms case routine to do this?
I'm going to need a hacksaw
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post by Dilbert »

Yep one starts @ state 0 (lexus) and prius/auris/yaris starts @ state 5. If we want to support the rav4 Tripple inverter we could start @ state 10 etc...
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: The ZombieVerter VCU Project

Post by mdrobnak »

While that works for now, I'd recommend that the states be given names (via an Enum) that makes sense, and each control protocol is in their own subclass.

I'm heads down trying to get my head around my own stuff, but might have some time next week to dedicate to this and other things Damien is working on.

I hope to have my car shifting correctly by the end of the month, which would be the last main barrier before being able to convert it to an EV.
User avatar
Jack Bauer
Posts: 3649
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

uhhh...Yeah! what Matt said:)
I'm going to need a hacksaw
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post by Dilbert »

I would consider just renaming the GS450 files / class as something more generic like Toyota or Hybrid etc..


Here's the enum:

enum{

STATE_GS450H_SEND_REQ,
STATE_GS450H_SEND_HTM,
STATE_GS450H_DELAY,
STATE_GS450H_READ_MTH,
STATE_GS450H_EXCHANGE_DATA,
STATE_PRIUS_SEND_REQ,
STATE_PRIUS_SEND_HTM,
STATE_PRIUS_DELAY,
STATE_PRIUS_READ_MTH,
STATE_PRIUS_EXCHANGE_DATA,

};
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post by Dilbert »

I wasn't happy with my code above for regen, as it didn't give the brake priority over the throttle, so maybe something like this:-

int16_t CalcTorque( int16_t throttle, int16_t brake, int16_t motor_speed, int16_t dir_selected){
int16_t torque;


if(brake > 0){
if(motor_speed > 40){ //moving forward
torque = map(brake,0,100,-200,-2000); //need to make this variable or atleast have a number of steps
}
else if(motor_speed < -40){ //moving back
torque = map(brake,0,100,200,+2000);
}
else{
torque = 0;
}

}
else if(throttle > 0){
//let the throttle set the torque directly

torque = map(throttle,0,100,0,1000); // add in the map function
}
else{
//no throttle or brake applied so see if we need a negative torque....
//maybe implement creep feature here, to up/down the torque to when in gear

if(motor_speed > 40){ //moving forward
//minimum torque to simulate engine braking
torque = -200;
}

else if(motor_speed < -40){ //going back
//minimum torque to simulate engine braking
torque = 200;
}

else{ //not moving
torque = 0;
}


}

return torque;

}


long map(long x, long in_min, long in_max, long out_min, long out_max) {
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
User avatar
Jack Bauer
Posts: 3649
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Ok cool. Think I need to make an experimental branch for testing. Currently working on the Prius menu option then will bring in the regen. Good news is we can test in the E65/gs450h and E46/Leaf combos.
I'm going to need a hacksaw
theBROCK
Posts: 7
Joined: Thu Dec 31, 2020 7:03 am
Location: Parana, Brazil

Re: The ZombieVerter VCU Project

Post by theBROCK »

Hi Matt, Damien, Dilbert and everyone involved into this development, is there anyway I can get one of these boards and maybe try to contribute? Happy to be able to work on any end, got a 3rd gen Prius inverter and transaxle coming my way in the upcoming weeks; would love to help testing/adding features to it.

Cheers to everyone!
User avatar
Jack Bauer
Posts: 3649
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

I appreciate the support but at this point I want to keep the development very focused as personally I am under some tight time constraints on this and other projects. As explained in this video there will be a hardware release on the way with lots of additional capabilities :

I'm going to need a hacksaw
jetsetwilly2000
Posts: 1
Joined: Sun Feb 07, 2021 11:22 am

Re: The ZombieVerter VCU Project

Post by jetsetwilly2000 »

Hi, I've just watched the video about "so much software" and I missed the post when you asked for assistance with a webpage based front end for the projects.

I'm a "nerd" who deals with both Microcontrollers (hobby) and also Web based projects (as my job). I'd be delighted to work on a front end for you and everyone else on the forum to make updating, configuring and tinkering with the microcontrollers, etc.

I'm also looking at starting my own EV mod project using a GS450h equipment so it'll be a real pleasure to pay back to everyone involved by helping out in any way I can with the project.

-- Ian.
User avatar
Jack Bauer
Posts: 3649
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

So today I froze my butt of in a chilling wind to make sure everything worked. This kind of thing will be so much easier after I sell the ip and move to Lanzarote.

-added option to select prius gen3 inverter (bench tested working).
-added INVudc parameter (inverter measured dc link voltage). Works on prius and gs450h but reads double on the leaf inverter for some reason...
-remembered to git add the charger files:) just place holders for now. Working on this next.
-all of these bench tested and in the E46/Leaf and E65/GS450H combos.

In other news I'm supposed to have a gen3 leaf inverter on the way but someone thought Ireland is in the UK so slight delay :)
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3649
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

@jetsetwilly2000 many thanks for your kind offer:)
I'm going to need a hacksaw
arber333
Posts: 3557
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 133 times
Been thanked: 331 times
Contact:

Re: The ZombieVerter VCU Project

Post by arber333 »

Damien

Is your Zombie VCU capable of running Chademo code? Since you say it can run Leaf inverter and Chademo and Leaf VCU share a lot of design.

tnx
User avatar
Jack Bauer
Posts: 3649
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

No not at this time and I'm not planning on implementing fast charge presently.
I'm going to need a hacksaw
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 2 times
Contact:

Re: The ZombieVerter VCU Project

Post by Isaac96 »

The current state of the fast charge software is pretty much in flux anyways... The latest development versions are untested and the old ones have multiple known issues. At some point I can port it, but it's got to be working first.
User avatar
mackoffgrid
Posts: 94
Joined: Thu Jan 02, 2020 10:18 am
Location: Brisbane Australia
Has thanked: 6 times
Been thanked: 1 time

Re: The ZombieVerter VCU Project

Post by mackoffgrid »

I just watched your latest video which crystalized why you called this project "ZombieVerter" (I admit to not reading this whole thread) and your motivation - Very Good idea.

In regards to alternative youtube channels you may want to look at the Dave Jones video (EEVBlog) on this topic

https://odysee.com/@eevblog:7/eevblab-8 ... -year-of:3
or
https://www.youtube.com/watch?v=E_ChC3eY0zI
User avatar
Jack Bauer
Posts: 3649
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Gen 3 leaf inverter arrived today so will be trying to give this the zombie module treatment. Right now its too cold for me to work on the cars to test the regen code so going to work on the charger module for the next few days and get it running with a volt charger to get the bugs out. That and I need to charge the E46 soon and the pcs won't happen straight away. annndd I need to charge and balance the front pack for the E65......soo many cars....
Attachments
2021-02-11 12.17.39.jpg
2021-02-11 12.17.13.jpg
2021-02-11 12.17.03.jpg
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3649
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Just got my "middle class man's charger" up and running with a spare leaf vcu. Now on to charge enable via can for the zombieverter.
Attachments
2021-02-13 12.12.01.jpg
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3649
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

So, wrestled the control of the ampera charger to the ground after two days of bit (and head) bashing as they seem to swap endian every now and again! anyway, got it working on arduino to ease the burden so now time to move onto the STM32. As a bonus I got to learn about casting (variables. Not spells).
I'm going to need a hacksaw
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: The ZombieVerter VCU Project

Post by mdrobnak »

That seems rather odd. The coda variant that I have definitely asks for input in Big Endian mode. But then again they also have the 12V DC/DC disabled. So perhaps not quite as comparable as one might hope.
User avatar
Jack Bauer
Posts: 3649
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Yeah the coda is a different beast. Used one in the Range Rover build. Anyway, connected up the V2 and V3 taps from the isa shunt to the battery in the E46. Bugs! I think this is a left over from the evtv code I ripped off. So fix this and move to floats on the voltage display. What could go wrong:)
Attachments
2021-02-16 11.03.40.jpg
I'm going to need a hacksaw
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: The ZombieVerter VCU Project

Post by mdrobnak »

Yeah they were doing some weird stuff with voltage differences...
Do note (I assume you know this...but you know what assuming does) - Power and such is calculated from V1 - so that should be the highest voltage!

-Matt
Locked