Hyper car hybrid

Topics concerning the Toyota and Lexus inverter drop in boards
User avatar
daleread
Posts: 49
Joined: Sat Mar 05, 2022 3:59 pm
Location: UK
Contact:

Hyper car hybrid

Post by daleread »

I am building a Ford RS200 with 650bhp V8 engine in the back (wheels) and MGR Q211 for the front wheels to give on demand extra power and 4WD.
I am using a Pruis GEN-3 Inverter, Zombie VCU, Toyota Q211 MGR and a Prius battery (not chosen yet)
I want to use the Sync Serial communications from the Zombie VCU to control the Prius inverter which is connected to the MGR Q211 resolvers.
I need the regen from the inverter to charge the onboard batteries (only a Prius Pack) and then tell the inverter to use the battery under demand from the engine ECU (Can Bus or Analog).
Had this been done before? I have seen Damien's video running the Prius inverter from the Sync Serial (SPI) comms.
I am an embedded C code software programmer for Texas, Atmel, and Microchip.
I have bought the Inverter, MGR, and the Zombie VCU and a Variac.
Can I have some help please to get this project rolling.

The cars are here
Image
https://rsretro.smugmug.com/Design/RS200-2/
https://rsretro.smugmug.com
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Hyper car hybrid

Post by Isaac96 »

Very nice! Also quite ambitious.

The MGR is a very nice little package, having those diffs set up already. However, its power may leave something to be desired.

viewtopic.php?f=11&t=951&start=75
This thread covers some of the challenges that have been encountered with the MGR's performance. 50kw has been achieved

You may want to consider your desired top speed versus the MGR's maximum and also look at its performance at higher speeds (spoiler: not great).

I don't recall seeing anyone run the MGR from an OEM Prius inverter yet.
The Prius was never equipped with the MGR (until about 2019, and that version has a 5.2kw power rating) so the inverter is not equipped to control it.
Zombieverter is built to run complete OEM systems, not mix-and-matched parts. With a new control board in the inverter you can run whatever you like.

Prius pack is also lower voltage = lower top speed.
User avatar
daleread
Posts: 49
Joined: Sat Mar 05, 2022 3:59 pm
Location: UK
Contact:

Re: Hyper car hybrid

Post by daleread »

Hi Isaac,
thank you for the info. This is my first EV build so I want to start with low power to learn the systems and progress up the ladder to bigger power and higher voltages. The first car will have a 200bhp petrol engine in the back and the EV in the front that will assist the 4wd aspect. Like a GX450h but the other way around. The advantage of EV is torque rather than power which is what I am looking for. My logic for the MGR + Prius inverter; the resolvers are the 'same' and the 3 phase is the 'same' and both made by Toyota so why not. My logic for using Sync Serial and Zombie VCU is simplicity (maybe). Using the new control board option the FOC looks unstable. I have both boards ready to try.

My biggest ask is "how do I get the regen to charge the batteries" how is this done?"
Where do I need to look to find previous working examples.

I Have more streamlined body options.

Image
Image
evbuilder
Posts: 18
Joined: Mon Feb 21, 2022 4:42 am
Location: New Zealand

Re: Hyper car hybrid

Post by evbuilder »

daleread wrote: โ†‘Sat Mar 05, 2022 4:23 pm I am using a Pruis GEN-3 Inverter ...
I need the regen from the inverter to charge the onboard batteries (only a Prius Pack) and then tell the inverter to use the battery under demand from the engine ECU (Can Bus or Analog).
Had this been done before? I have seen Damien's video running the Prius inverter from the Sync Serial (SPI) comms.
I am an embedded C code software programmer for Texas, Atmel, and Microchip...
I need to find that video...
I was under the impression that Sync Serial for the Gen3 was not fleshed out yet. By the sound of what you want to do with it you'll need to know every bit of information on this interface.

I am planning to build a sniffer using an ESP32. It has two available SPI ports and native WiFI - so should be able to record hi speed and send it to nearby laptop with ease. My problem is Arduino SPI libraries for ESP32 don't support slave mode. I'm struggling with this at the moment - there are third party libraries but they only support one interface, so I need to look at combining the two if I stick with Arduino. The whole point of Arduino is fast spin up of projects so was contemplating building the Espressif tool chain but that went sideways quickly (how may and which version of python is on my machine :? )
I have Gen3 cars available to sniff - both hybrid and PHV (which might have a bigger boost converter? )

Some ideas for you:
1. The Boost converter appears to have no current sensor, so you might be best to run it open loop maintaining 500V on the Motor Bus. Serial connection has both Bus and Battery voltage on it so all the ingredients for a voltage mode compensator for that DCDC.
2. The boost converter is only really designed for the 200Vx100A=20kW hybrid battery (pretty good for ~6Ah!). The motor/generator outputs are capable of more, but they got their power from the engine, not the battery.
3. The Prius box includes a 12V dc-dc so you can eliminate the alternator off your engine to save you some weight and space.

Oh, how is charging battery regen done? You have RPM from the motor drive, so dial up required negative torque (because Power=Torque.RPM). You'll want the boost converter going unfortunately to allow the motor to rev up (needs 500V) unless you plan on adding more battery. I'm interested in Sync Serial too because Toyota has spent a lot more time than I ever could making their motor controller work well.
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 232 times
Contact:

Re: Hyper car hybrid

Post by arber333 »

daleread wrote: โ†‘Sun Mar 06, 2022 10:34 am My biggest ask is "how do I get the regen to charge the batteries" how is this done?"
Where do I need to look to find previous working examples.
Well, regen operates in reverse of the propulsion torque. It is native to PMSM motors. You need a mass with velocity to stop and you apply certain settings in your inverter so it provides negative torque to the wheels. This then is converted to current to the batteries.
In OEM cars the motors are connected with the engine by elaborate gearing or belts or CVT connections.
In your case you will allways have the connection between motor and engine. Ground will provide traction and torque translation. In example if you drive your engine and select regen front motor will fight the rear motor + mass. Also you can have front axle add its torque for starting from standstill or you can just frewheel the engine clutch and drive on electric only...

My logic would be a bit different though... I would install a smaller engine on Lexus gs450h transmission which would operate simillary to OEM and maybe search for another motor like MGR or larger to put in front to have a true sport 4wd.
Sorry didnt notice this car was mid engine...

EDIT: Observe that you can connect motor to smaller battery and it will still provide regen current but it will not be able to accelerate your car to higher speed. This is why MGR is limited in power.
User avatar
daleread
Posts: 49
Joined: Sat Mar 05, 2022 3:59 pm
Location: UK
Contact:

Re: Hyper car hybrid

Post by daleread »

Hi evbuilder,
here is a quick reply to your very helpful post.

The video is here, running the Prius inverter over SPI, from around 35.00mins onwards



A SPI sniffer is here, https://ftdichip.com/products/c232hm-ddhsl-0-2/,
which will allow your PC to have control of the SPI bus or to sniff it at full speed.

The more info I have on the Toyota SPI bus the better. I can code in C on MCU's so writing embedded code is no problem.
I believe the Zombie VCU code for the 450h is a available to Patroen top level members, but again I don't know...
Do you have some info on the Serial Bus that I could start with?

1. A daft question, is the boost converter for charging the battery or running the motor?
2. I only need a minimum battery capacity as it will be used as a boost to the engine power and not continuous running, really only above 75% throttle and between 0 and 70mph. Driving on twisty roads, you are only flat out ~ 10-20% time? the rest of the time is braking, corner then back on the gas. The 80% can be used to charge the battery. Also in cruse, the battery can be charged (optionally) at the drivers discretion from the front wheels.
3. I like the idea of the 12v from the high voltage battery. The engine is the primary in what I am planning. There will be no external battery charging. Will this effect removing the 12v battery?

Why does the battery need 500v to charge? Does a 240v battery need 240v?....
Toyota has done all the hard work. the hard work for us is to unravel their hard work. Bring it on ๐Ÿ‘

In summary then, the SPI control to the Inverter can tell it to run the motor, or, charge the battery via the boost controller?
The SPI command strings are available to do this?

Many Thanks
Dale
User avatar
daleread
Posts: 49
Joined: Sat Mar 05, 2022 3:59 pm
Location: UK
Contact:

Re: Hyper car hybrid

Post by daleread »

Hi arber33,
some excellent information there and that is exactly what I am trying to do.
The primary use for the MGR is to add occasional front wheel assistance to the cars handling and some performance.
Its primary job is to provide 4wd front grip as in the original RS200. The front split varies from 0% to 50% of the total power (the other proportion from the engine), but in reality it is probably around 10% as mechanical 4x4 road car systems that this was based on have an open front differential so the power would be wasted by the spinning wheel. The 4wd on the front adds grip in cornering on the road when it is needed. This can be from 75% throttle or a pre-settable value, or the difference between steering angle and the cars yaw angle (Misti EVO).
The biggest difference with an electric motor is instant torque at any speed? and an electric motor has more torque, x3? because of the gearing from a 18,000 rpm electric motor down to a 3,000 rpm wheel drive speed, which multiplies up the torque above what a petrol engine would give.
At launch the electric motor is only used from 0-60, then the petrol motor (turbo charged) provides all of the power at high speed.
I want to start with a small MGR to prove functionality, then move onto larger MGR (Outlander?) and higher battery voltages.
This is my first EV project.
Many thanks for you help here, it is very much appreciated, all comments ae very welcome.
User avatar
sfk
Posts: 289
Joined: Mon Jan 14, 2019 8:29 pm
Location: Wellington, NZ
Has thanked: 2 times

Re: Hyper car hybrid

Post by sfk »

Is that an original RS200? I would have though it too rare and valuable to modify. No objection mind you.
-< Mazda Eunos JC Cosmo rotary -> EV conversion w/ Lexus GS450H gear >-
evbuilder
Posts: 18
Joined: Mon Feb 21, 2022 4:42 am
Location: New Zealand

Re: Hyper car hybrid

Post by evbuilder »

daleread wrote: โ†‘Sun Mar 06, 2022 4:45 pm The video is here, running the Prius inverter over SPI, from around 35.00mins onwards

A SPI sniffer is here, https://ftdichip.com/products/c232hm-ddhsl-0-2/,
which will allow your PC to have control of the SPI bus or to sniff it at full speed.
Thanks!
daleread wrote: โ†‘Sun Mar 06, 2022 4:45 pm The more info I have on the Toyota SPI bus the better. I can code in C on MCU's so writing embedded code is no problem.
I believe the Zombie VCU code for the 450h is a available to Patroen top level members, but again I don't know...
Do you have some info on the Serial Bus that I could start with?
I'm more comfortable in the electronics than software!
My understanding of the interface is its a memory swapping of around 100bytes.
Simple 16bit checksum of the data at the end is sum of bytes up to the checksum.
SPI signals have been put through CAN transceivers to get them over automotive wiring harness.
I haven't followed up on what CLK edge the bits change on but that must be known around here somewhere!
You put your commands in the SEND array then send them.
What you get back into your RECEIVE array is converter/inverter status from the last command you sent.
SEND array has a different mapping and length to RECEIVE array.
MTH is Motor to Hybrid, HTM is Hybrid to Motor.
REQ line doesn't stay active for the whole transaction. I was planning to use the starting edge only.
The GS450H transaxle has a check that that the Hybrid ECU is getting the Motor data - the Motor ECU expects the sum of MG1 and MG2 speeds it sent in the previous message divided by 113 (going by the code I found on github)

I've found a ToyotaInverters page on the wiki which looks to be intended for this info. So far I added it to Toyota and OEM categories so it is more easily found. I should probably add the above to it to help the next guy! I've only been looking at this for a week or two.
daleread wrote: โ†‘Sun Mar 06, 2022 4:45 pm Is the boost converter for charging the battery or running the motor?
The Box includes 4 stages:
MG2 inverter: (motor controller) ~50kW nominal
MG1 inverter: at about half the power (the IGBTs inside look to be half the size)
Boost converter: to take the ~200V battery voltage up to higher voltage bus that the inverters are powered from.
12V converter: The only isolated stage, that replaces the traditional automotive 12V alternator. Powered from the Hybrid battery 200V bus.

You need a 12V battery to turn on the Hybrid stuff, and to crank your engine over (unless you want to bump start it from the traction motor!).
Permanent Magnet motors develop backEMF related to speed, so Toyota added the boost converter to get higher voltages for higher speeds without adding more series cells. at 1.2V NiMH there needs to be a lot of them!
Toyota hybrid battery will only get you 1km or so. It is intended to make an engine more efficient, nothing more!
evbuilder
Posts: 18
Joined: Mon Feb 21, 2022 4:42 am
Location: New Zealand

Re: Hyper car hybrid

Post by evbuilder »

evbuilder wrote: โ†‘Sun Mar 06, 2022 10:53 am I am planning to build a sniffer using an ESP32
To anyone who happens across this trying to build one of these, stay away from SPI slave with ESP32 or ESP8266. They seem only capable of emulating a memory chip so basically unsuitable for this task. See https://hydraraptor.blogspot.com/2018/0 ... i-spy.html
User avatar
daleread
Posts: 49
Joined: Sat Mar 05, 2022 3:59 pm
Location: UK
Contact:

Re: Hyper car hybrid

Post by daleread »

evbuilder wrote: โ†‘Sun Mar 06, 2022 9:36 pm I've found a ToyotaInverters page on the wiki which looks to be intended for this info. So far I added it to Toyota and OEM categories so it is more easily found. I should probably add the above to it to help the next guy! I've only been looking at this for a week or two.
Thanks for the guidance, now have a gs450h_vcu up and running with source code that I can modify.
It took me a few hours to find all of the pieces and get working.
Here is a link to the whole set for a working example, and a small write up How To for getting it started.

https://www.dropbox.com/sh/1ulm2gir3jfy ... SQgBa?dl=0

The data exchange is indeed a 2 direction array, 80 bytes to the inverter and 100 bytes from the inverter.
The data is in the array is modified to request torque, -3500 to 3500, see DRIVE and REVERSE below.
The data needs to be exchanged at 10mS to keep the Inverter happy

Now I have to link it to a Prius inverter and see what happens then, or doesn't...
Anyone done this yet?
I might need Damien's help there, how do I contact him?

BTW >>> the gs450h_vcu can be reprogrammed to be a SPI sync serial bus sniffer, so there is no need to design your own, or you can borrow Damien's design.

Here are some code snippets

// SPI Data Exchange.
// mth is from the Inverter
// htm is to the Inverter
byte mth_data[100];
byte htm_data_setup[80]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,25,0,0,0,0,0,0,0,128,0,0,0,128,0,0,0,37,1};
byte htm_data[80]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0};

// Get Demand Torque from Throttle Pedal
short get_torque()
{
//accelerator pedal mapping to torque values here
ThrotVal=analogRead(Throt1Pin); //75 to 370
if(ThrotVal<80) ThrotVal=75; //dead zone at start of throttle travel
if(gear==DRIVE) ThrotVal = map(ThrotVal, 75, 370, 0, 3500); //drive torque default
if(gear==REVERSE) ThrotVal = map(ThrotVal, 75, 370, 0, -3500); //reverse torque default
if(gear==PARK) ThrotVal = 0; //no torque in park or neutral
if(gear==NEUTRAL) ThrotVal = 0; //no torque in park or neutral
return ThrotVal; //return torque
}
evbuilder
Posts: 18
Joined: Mon Feb 21, 2022 4:42 am
Location: New Zealand

Re: Hyper car hybrid

Post by evbuilder »

daleread wrote: โ†‘Tue Mar 08, 2022 7:39 am Here is a link to the whole set for a working example, and a small write up How To for getting it started.
100MB? Isn't it just a few hundred lines of code?!
daleread wrote: โ†‘Tue Mar 08, 2022 7:39 am Now I have to link it to a Prius inverter and see what happens then, or doesn't...
Anyone done this yet?
I might need Damien's help there, how do I contact him?
Yes I've helped Woodfie with this. The Gen3 Prius replies with 120bytes (checksum works), but I have no way of knowing what to send to it. He's going to reply soon explaining the various parts he has got going.
daleread wrote: โ†‘Tue Mar 08, 2022 7:39 am BTW >>> the gs450h_vcu can be reprogrammed to be a SPI sync serial bus sniffer, so there is no need to design your own, or you can borrow Damien's design.
Yeah, I got there in the end. I'm using an Arduino Due which has the same ATSAM3X chip on it rather than hack up the gs450h_vcu permanently going into a vehicle.

Arduino doesn't seem to support SPI slave on this device: I'm using USART0 and USART1 (Serial1 and Serial2 in Arduino lingo) and following this thread: https://forum.arduino.cc/t/using-usart0 ... ode/274172
Woodfie
Posts: 179
Joined: Wed Mar 09, 2022 6:53 am
Location: Auckland NZ
Has thanked: 137 times
Been thanked: 65 times

Re: Hyper car hybrid

Post by Woodfie »

An exciting project ....with regard to Q211, have this unit running on the bench, using gs450h vcu, and Lexus inverter....seems to run fine fwd and Rev.

Have been working with evbuilder to use a Prius gen3 inverter to install in a custombuilt hybrid roadster, as a front wheel drive, the rear has a transverse Rover type V8 of 4.5L, from a Leyland P76.
It is connected to prepare for a test run, once we have looked into sniffing a working car, to investigate mth, and htm.
User avatar
daleread
Posts: 49
Joined: Sat Mar 05, 2022 3:59 pm
Location: UK
Contact:

Re: Hyper car hybrid

Post by daleread »

Woodfie wrote: โ†‘Wed Mar 09, 2022 8:01 am An exciting project ....with regard to Q211, have this unit running on the bench, using gs450h vcu, and Lexus inverter....seems to run fine fwd and Rev.
a ha, the Lexus inverter, with the gs450h_vcu, and a Q211 motor?
Perfect.
What wiring did you do for the resolvers and inverter to gs450h_vcu, and which year/model inverter did you use.
This could be a shortcut for me to get stuff up and running and start hacking.
Are you OK to share information going forwards?
Thank you
User avatar
daleread
Posts: 49
Joined: Sat Mar 05, 2022 3:59 pm
Location: UK
Contact:

Re: Hyper car hybrid

Post by daleread »

evbuilder wrote: โ†‘Wed Mar 09, 2022 7:52 am 100MB? Isn't it just a few hundred lines of code?!
I tried to include everything in one place !
evbuilder wrote: โ†‘Wed Mar 09, 2022 7:52 am Arduino doesn't seem to support SPI slave on this device: I'm using USART0 and USART1 (Serial1 and Serial2 in Arduino lingo) and following this thread: https://forum.arduino.cc/t/using-usart0 ... ode/274172
This is already solved in Damiens gs450h_vcu code, could same you some time, look for "gs450h_v7a_D.R.ino" in the 100MB,

Serial1.begin(250000); //Serial1 is Connected to the Sync Serial SPI Inverter Interface, with SDA1 and D22

if(since_last_packet>=4000) //read mth
{
htm_sent=0;
mth_byte=0;
mth_checksum=0;

for(int i=0;i<100;i++)
{
mth_data=0;
}
while(Serial1.available())
{
mth_data[mth_byte]=Serial1.read();
mth_byte++;
}

for(int i=0;i<98;i++)
{
mth_checksum+=mth_data;
}
if(mth_checksum==(mth_data[98]|(mth_data[99]<<8)))
{
mth_good=1;
}
else
{
mth_good=0;
}
last_packet=micros();
digitalWrite(pin_inv_req,0);
}
User avatar
daleread
Posts: 49
Joined: Sat Mar 05, 2022 3:59 pm
Location: UK
Contact:

Re: Hyper car hybrid

Post by daleread »

evbuilder wrote: โ†‘Wed Mar 09, 2022 7:52 am Arduino doesn't seem to support SPI slave on this device: I'm using USART0 and USART1 (Serial1 and Serial2 in Arduino lingo) and following this thread: https://forum.arduino.cc/t/using-usart0 ... ode/274172
Did you have a look here
https://forum.arduino.cc/t/arduino-as-spi-slave/52206/2
evbuilder
Posts: 18
Joined: Mon Feb 21, 2022 4:42 am
Location: New Zealand

Re: Hyper car hybrid

Post by evbuilder »

daleread wrote: โ†‘Wed Mar 09, 2022 8:55 am
evbuilder wrote: โ†‘Wed Mar 09, 2022 7:52 am Arduino doesn't seem to support SPI slave on this device: I'm using USART0 and USART1 (Serial1 and Serial2 in Arduino lingo) and following this thread: https://forum.arduino.cc/t/using-usart0 ... ode/274172
Did you have a look here
https://forum.arduino.cc/t/arduino-as-spi-slave/52206/2
That works for the Atmel MEGA chips, but not the ARM based Due.

I'm attempting to capture the HTM and MTH data at the same time, clocked from the Hybrid ECU in an otherwise unmodified car. The only way I can see to do that is use two SPI ports, and feed the one CLK to them both. I thought I'd use the near identical peripherals USART0 and 1 to do this. It's just a matter of setting the registers, and link above fleshes out what they need to be.

I'm considering spinning up a third SPI slave for a ESP8266 to interrogate to get the data out over WiFi.

It may be for nothing: over at Damiens Github page there are some logic analyser captures that may have all the info required in them. https://github.com/damienmaguire/Prius- ... erial_Logs

If you could get the logic analyser viewer loaded, tell me what SPI mode to expect, clock rate etc that would be awesome!
Woodfie
Posts: 179
Joined: Wed Mar 09, 2022 6:53 am
Location: Auckland NZ
Has thanked: 137 times
Been thanked: 65 times

Re: Hyper car hybrid

Post by Woodfie »

What wiring did you do for the resolvers and inverter to gs450h_vcu, and which year/model inverter did you use.
This could be a shortcut for me to get stuff up and running and start hacking.
Are you OK to share information going forwards?

Yes, happy to share information. Somehow lost reply with details, will see if this posts sends ok, before another attempt.
Woodfie
Posts: 179
Joined: Wed Mar 09, 2022 6:53 am
Location: Auckland NZ
Has thanked: 137 times
Been thanked: 65 times

Re: Hyper car hybrid

Post by Woodfie »

Re Q211 ...Wiring of inverter and resolver.

Had established Damien's gs450h vcu, Lexus inverter and transmission running on bench. I have a 2006 Lexus, which have made into a Phev, and ordered a transmission and inverter of the same model. the numbers off inverter is G9200-30030. This is presently being installed in a well aged Bedford campervan, to operate as a Phev.

The set up now has two separate "throttles" for want of a better word, ( I would normally think of a throttle as a butterfly valve for throttling, an air or gaseous mixture)

MG1 has one throttle input set up to give fwd and rev from a linear potentiometer, with 50% being the null position, and clockwise IC input shaft rotation , when potentiometer is turned up, say above 60% and anti clockwise rotation when turned down below 40%.
MG 2 is operated with Toyota pedal unit .

The Q211 test set up, takes the place of Lexus MG2,
The exciter MRF, and MRFG connected to the forward end of the six pin plug .. the combinations of sin and cos tried, then moved UVW inverter to VWU from Q211, another combination of sin and cos, and rotation was achieved, and fwd , rev when fwd, rev input to the vcu was selected. If a diagram or picture of the Q211 socket pins helps let me know.
User avatar
daleread
Posts: 49
Joined: Sat Mar 05, 2022 3:59 pm
Location: UK
Contact:

Re: Hyper car hybrid

Post by daleread »

Woodfie wrote: โ†‘Wed Mar 09, 2022 8:01 am Have been working with evbuilder to use a Prius gen3 inverter to install in a custombuilt hybrid roadster, as a front wheel drive, the rear has a transverse Rover type V8 of 4.5L, from a Leyland P76.
Any photos of your car? and the wiring, motor and front driveshafts and V8 and gearbox setup.
Sounds really interesting, and very similar to what I am trying to achieve.
User avatar
daleread
Posts: 49
Joined: Sat Mar 05, 2022 3:59 pm
Location: UK
Contact:

Re: Hyper car hybrid

Post by daleread »

evbuilder wrote: โ†‘Wed Mar 09, 2022 9:40 am If you could get the logic analyser viewer loaded, tell me what SPI mode to expect, clock rate etc that would be awesome!
The code in the gs450h_vcu shows a SPI rate of 250000
The Spi in normal 8 bit, nothing special, from what I can see.
The one difference is the additional sync pulse at the start of the SPI transfer, after that its MISO, MOSI and CLK. No /CS.
Why not use Damien's code from the gs450h_vcu and use it to listen to the bi directional data?
All the code is in there, and the Sync Serial hardwired interface to the Inverter.
You wont need to hack the board apart.
To get data back to your logging PC I would remove the Wifi from the gs450h_vcu and make a jumper to a Lantronix X-Port Ethernet module that can run 10x faster than the SPI. The data from the gs450h_vcu can run at 1Mbps.
https://uk.farnell.com/lantronix/xp1001 ... dp/2115259
Then you wont loose any data.
And you don't need to break apart the gs450h_vcu
User avatar
daleread
Posts: 49
Joined: Sat Mar 05, 2022 3:59 pm
Location: UK
Contact:

Re: Hyper car hybrid

Post by daleread »

evbuilder wrote: โ†‘Wed Mar 09, 2022 9:40 am I'm attempting to capture the HTM and MTH data at the same time, clocked from the Hybrid ECU in an otherwise unmodified car. The only way I can see to do that is use two SPI ports, and feed the one CLK to them both. I thought I'd use the near identical peripherals USART0 and 1 to do this. It's just a matter of setting the registers, and link above fleshes out what they need to be.
I don't think you need to do this.
The arrays are different lengths, 80 and 100 or 120, so you know where it has come from.
a single port sniffer will do it for you, np, and make timestamping much easier and accurate.
User avatar
daleread
Posts: 49
Joined: Sat Mar 05, 2022 3:59 pm
Location: UK
Contact:

Re: Hyper car hybrid

Post by daleread »

Woodfie wrote: โ†‘Wed Mar 09, 2022 3:32 pm The Q211 test set up, takes the place of Lexus MG2,
The exciter MRF, and MRFG connected to the forward end of the six pin plug .. the combinations of sin and cos tried, then moved UVW inverter to VWU from Q211, another combination of sin and cos, and rotation was achieved, and fwd , rev when fwd, rev input to the vcu was selected. If a diagram or picture of the Q211 socket pins helps let me know.
That's very clever, a wiring diagram always helps so yes please.
How do you tell each motor separately what throttle (torque) you require?
Did you hack Damien's gs450h_vcu code to do this?
What happens if the inverter cannot see one of the motors, i.e. by unplugging the resolver?
Does the other motor still run, or does the system stop?
What model Lexus inverter did you use, so I can buy the same and create the same setup but with 2 Q211 motors.
Then I can do some serious hacking and sniffing to share.
I like it, a lot. Well done. ๐Ÿ‘๐Ÿ‘
User avatar
daleread
Posts: 49
Joined: Sat Mar 05, 2022 3:59 pm
Location: UK
Contact:

Re: Hyper car hybrid

Post by daleread »

evbuilder wrote: โ†‘Wed Mar 09, 2022 9:40 am If you could get the logic analyser viewer loaded, tell me what SPI mode to expect, clock rate etc that would be awesome!
Download from here. logic 1.2.18 (not logic 2)
https://support.saleae.com/logic-softwa ... load-links
Then you can open Damien's logfiles
It looks like this
Logic 1 Data View 1.jpg
Logic 1 Data View 2.jpg
Woodfie
Posts: 179
Joined: Wed Mar 09, 2022 6:53 am
Location: Auckland NZ
Has thanked: 137 times
Been thanked: 65 times

Re: Hyper car hybrid

Post by Woodfie »

What model Lexus inverter did you use, so I can buy the same and create the same setup but with 2 Q211 motors.
Then I can do some serious hacking and sniffing to share.
I like it, a lot. Well done. ๐Ÿ‘๐Ÿ‘

Still trying to find my way around this forum procedure, not sure how to put pic up yet, work in process.

Will be reconnecting the system in a few days, and then can furnish you with the connections etc.
Post Reply