The ZombieVerter VCU Project

Locked
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Finally some progress. Just did a push to the repo.

-Fix ISA voltage bugs.
-Change to floats on ISA params.
-Add charge mode HV control.
-Add HV on/off via web interface for testing.
-Fix Leaf INVudc reading.
-Added kWh and Ah display from isa shunt.

Not tested in a car as yet due to weather. turned out my ripped off evtv isa functions were waaayy over complex so simplified those down quite a bit.

Thinking about testing Dilbert's regen code today gave me an idea that might get two birds with one inverter. I still have my diesel/electric rig in one piece from a previous experiment. Will link the video below in case anyone missed that classic. Basically its a 5hp Lister LT1 diesel engine and a Toyota Estima MG1 (belt driven MG). Now the LT1 has a massive flywheel sooo IF the prius inverter will accept the Estima MG1 then we can spin up that flywheel with the decompressor open on the engine and regen it back down. Then if that works kick the fuel on and "regen" the engine back in to the battery:) This way I stay warm and dry and get to breath engine exhaust.

Previous installment with openinverter sine control (pre foc) :
https://youtu.be/hYxxCOxyWM0
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 »

The sounds good. I'd imagine even the flywheel would do the job. It would give us a good idea of what rpm the system can regen down to.

I was considering if even a flywheel could be added to the input shaft on the gearbox, to do something similar.

I'm still in the process of sourcibg a gen 3 inverter so I can try with the gen 2 transaxle.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Charge mode now up and running and tested in the E46. Also ISA shunt data in float format is making sense. Think I'll add a delta voltage parameter.
Attachments
2021-02-21 15.31.51.jpg
2021-02-21 11.13.30.jpg
I'm going to need a hacksaw
Alibro
Posts: 857
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 271 times
Been thanked: 150 times
Contact:

Re: The ZombieVerter VCU Project

Post by Alibro »

Jack Bauer wrote: Sun Feb 21, 2021 3:45 pm Charge mode now up and running and tested in the E46. Also ISA shunt data in float format is making sense. Think I'll add a delta voltage parameter.
Are you trying to build a time machine JB? :D
I need a bigger hammer!
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Well, we have a regen tester :


Some interesting lessons :
1) Seems we can run non gen3 motors with a gen 3 inverter (estima starter generator in this case) which seems to be a gen1 motor.
2)It made monster torque in fwd but almost none in rev so I broke out the grinder and welder instead of the c compiler.
3)Running at 150v in the video it cranked the living s%^t out of the LT1 with only a smidge of throttle

Next up : Lexus mgr in the blue E39:)
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 »

Nice!

Thanks for testing my start engine code for my M3 hybrid :D
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 »

It will definitely spin a gen 2 transaxle then 😁
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Well following my test drive in the E46 last week I pushed a bug fix for the Leaf inverter RPM:) Now time for a dumb Damien software question (ddsq for short).

So I've been working on the model 3 pcs full bore the past week or so and finally have it charging. Now while waiting to see how we go about implementing a controller for the pcs I've been tidying up charge mode in the VCU. Now have HV on/off via web interface , digital input and CAN. In terms of the CAN I want to have the firmware look for a counter in the incoming message from the charger controller to give it a basic sanity check. Question is how do I do this? The send side is easy (even I can manage that) but how about receive ....
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Here are some connectors and Toyota part number for connecting to the Prius/Yaris gen 3 inverter. Still need to find the tails for the small signal wires and the resolver plug.
Attachments
2021-03-13 14.49.17.jpg
2021-03-13 14.49.10.jpg
2021-03-13 14.48.46.jpg
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 »

Perfect, thanks for posting! So the repair wire is one of the main 12V/Ground connections to the inverter.

I'll see if i can identify a crimps for the smaller signal wires, i would guess the same crimp would be used for the resolver connector. I have measured the pitch of the connectors and they seem to be 3mm pitch. I guess from a manufacturing point of view they don't want to use too many different crimps, so they must be used in other connectors.
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 »

The larger repair wire (82998-12440), is listed here:- https://www.ih8mud.com/tech/pdf/WireHar ... pairwi.pdf

Looks like this is the larger crimp terminal https://www.bmotorsports.com/shop/produ ... ts_id/1762
Sumitomo TS 2.3II Female Terminal


It says that its a 6mm pitch on the larger terminals.
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 »

If the whole connector is Sumitono, the only crimp that seems close to the right pitch for the signal wires is the type 1.0II or 1.0III, which are 1.8mm wide...
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: The ZombieVerter VCU Project

Post by EV_Builder »

Jack Bauer wrote: Sat Mar 13, 2021 2:14 pm So I've been working on the model 3 pcs full bore the past week or so and finally have it charging. Now while waiting to see how we go about implementing a controller for the pcs I've been tidying up charge mode in the VCU. Now have HV on/off via web interface , digital input and CAN. In terms of the CAN I want to have the firmware look for a counter in the incoming message from the charger controller to give it a basic sanity check. Question is how do I do this? The send side is easy (even I can manage that) but how about receive ....
I would add an array to the software. (atleast its the simplest method i think if you have the memory available).

I use always some code convention for example
Pseude code so it wont build i guess...

darr_lastseq[ CANID ] = Last recieved seq number. //init the array with 255 to disable the check // or add an extra VAR with the setting on / off..
darr_seqbytenr[ CANID ] = simlpe storage of the byte number containing the seq number. //init the array with 255 to disable the check..
darr_seqbytemask[ CANID ] = simlpe storage of the bytemask containing the seq number. //this value will be && with the databyte..

Now in the code you have everything available.

If you send me the code or a link i can implement it for you.

Regards,
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
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's the Pinouts for the GEN3 Toyota Inverters, we will probably move these over onto the wiki when there is some time.
Attachments
Gen3Pin_out.png
gen3 pin out.xlsx
(37.3 KiB) Downloaded 100 times
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

@EV_builder Thanks for the offer. Code is here : https://github.com/damienmaguire/Stm32-vcu
charger.cpp has the receive subroutine.

@Dilbert yeah lets start putting this on the wiki. I have a sneaky suspicion the gen 3 inverter will drive any Toyota motor...... Don't want to say that too loud or I'll get mobbed by even more emails:)

Just did a commit with the charge hv request over can implementation. Tested in the Grey Goose.
I'm going to need a hacksaw
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: The ZombieVerter VCU Project

Post by EV_Builder »

@Jack_Bauer:

Ok i did a simple version first for now...
We could always make a better full blown gui choice thing etc.
Also we could let the method return the error (void becomes a bit) but since HV was not done that way i thought i join the class var way of doing it.

charger.cpp:

Code: Select all

#include <charger.h>

bool chargerClass::HVreq=false;
bool chargerClass::CAN_108SeqError = false; //we boot with no errors

static uint8_t counter_109 = 0;

//Simple counter check
//Configure here the 108 message properties
static uint8_t lastseqcntr_108 = 255; //empty on startup
static uint8_t bytenrseq_108 = 7;
static uint8_t bytemask_108 = 0xFF;


void chargerClass::handle108(uint32_t data[2])  //HV request

{
	CAN_108SeqError = true; //we program write false == save

	uint8_t* bytes = (uint8_t*)data;// arrgghhh this converts the two 32bit array into bytes. See comments are useful:)

	uint8_t seqnr = (bytes[bytenrseq_108] & bytemask_108); //here we AND the data with the mask to write the result in the local seqnr var.

	if (bytes[0] == 0xAA) HVreq = true;
	if (bytes[0] == 0xCC) HVreq = false;


	if (lastseqcntr_108 == 255) {
		lastseqcntr_108 = seqnr; //if we are 255 we are just booted (this shoudn't be a normall counter value normally its 0-15 (16 messages);
		CAN_108SeqError = false;
	}
	else {

		if ( (lastseqcntr_108 == 15)  && (seqnr ==0) ) { //special case we expect now 0 in byte 7 (clock overrun??) 
			CAN_108SeqError = false;
		}
		else if ((lastseqcntr_108 + 1 ) == seqnr) { //if we increase the previous value by one we should match the bytes7 value...
			CAN_108SeqError = false;
		}
	}

}
We should check in the main program who calls this function if the bit is set after each call and then set the according error bit in the general error layer.

Let me know if this is too lean :)

EDIT: If you are not sure if we recieve all CANBUS messages we could implement easily a count down counter instead of the bool.
Then it would be a bit more forgiven.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
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 »

Jack Bauer wrote: Sun Mar 14, 2021 1:31 pm @Dilbert yeah lets start putting this on the wiki. I have a sneaky suspicion the gen 3 inverter will drive any Toyota motor...... Don't want to say that too loud or I'll get mobbed by even more emails:)
Ya know, I wondered that. Can we drive the GS450h with a Prius inverter over serial? The Gen 3 is a bit more compact than the Lexus / Camry inverters, no? (Thinking for my hybrid conversion, trying to stuff things in as little space as possible....)

-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 »

Have the Yaris converter hooked up ready to test later in the week. I didn't have the correct connectors so made do with lots of 2 way JST connectors.
Attachments
YarisInverterConnections.JPG
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Excellent. My next move in the gen3 scene is to see if it will spin the MGR:)
I'm going to need a hacksaw
User avatar
arturk
Posts: 146
Joined: Wed Oct 02, 2019 3:58 am
Location: United States, MD
Has thanked: 1 time
Been thanked: 2 times

Re: The ZombieVerter VCU Project

Post by arturk »

I just couldn't wait any longer and had to test Dilbert's regen implementation from one of the earlier posts.
Success! I was able to get over 50 amps of regen in during braking with small amount of negative torque.
I had to adopt code slightly for my VCU v.2 Arduino code because I do not have VCU v.3 board.
Anyways looks like approach is solid however some tuning may be necessary.
I am going to keep working on it.
1998 Jaguar XJR, GS450h drivetrain, 48kWh/96s BMW battery
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 »

arturk wrote: Tue Mar 16, 2021 3:26 am I just couldn't wait any longer and had to test Dilbert's regen implementation from one of the earlier posts.
Success! I was able to get over 50 amps of regen in during braking with small amount of negative torque.
I had to adopt code slightly for my VCU v.2 Arduino code because I do not have VCU v.3 board.
Anyways looks like approach is solid however some tuning may be necessary.
I am going to keep working on it.
Perfect ;-)

Yea i was trying to develop something that could work for a simple on/off condition with the brake or a more complex brake position sensor. I was also trying to model engine braking. So if no throttle is applied, you get engine braking, when brake pressed it moves to the higher level of braking.

Most importantly i want the brake to have priority over the throttle, something which my Auris doesn't do at one particular point in the cycle.
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 »

Quick question, does the normal bootloader work on the zombie ecu? Or does it need some changes for this cpu?
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Bootloader is different due to 2k page size on the 105. Will upload later. Meanwhile here is a hex.
Attachments

[The extension hex has been deactivated and can no longer be displayed.]

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 »

Perfect thanks for that, I'll give that a go. I was able to use the STM32 programmer anyway.

I got the Yaris converter connected up and it seems to be outputting a larger MTH frame, which is 2.8mS long rather than the 2.4mS. I haven't had a chance to connect up the FTDI Cables yet, but this to me would mean that the MTH frame has increased from 120 bytes to 140 bytes on the Yaris.

The part number of the yaris inverter i have is G9200-52031, i knew i should have got the Auris one, but this one was too cheap to pass up!
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 »

OK so i bumped up the MTH frame from 120 to 140 bytes and i now have valid frames coming in from the yaris inverter!

The only question is, if the have added extra bytes to MTH have they done the same with HTM also, or is that still 100 bytes.

Lexus GS450 is 80 / 100
GEN3 Prius is 100 / 120
Yaris is ? / 140
Locked