330e Hybrid Transmission

Tell us about the project you do with the open inverter
User avatar
Ev8
Posts: 816
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 43 times
Been thanked: 163 times

Re: 330e Hybrid Transmission

Post by Ev8 »

It’s possible I’m wrong here because I’m not fully read up on the zombieverter but I was under the impression it could only run Toyota/Lexus motors that were matched with their appropriate motor (gearbox transaxle) as it works but sending or torque commands over a serial connection, the chances of your motor being a match for what the Prius inverter is expecting to drive isn’t good and you can’t change parameters to make it suit, your only option is to run the replacement logic board with foc firmware that you have currently, and I’d let it do the contactor contol, if you are dead set on using the zombie for its other vcu features then link the 2 with can mapping

Hopefully someone with real zombie experience will chime in here
andrewjenkins34
Posts: 57
Joined: Thu Dec 17, 2020 1:48 am
Has thanked: 1 time
Been thanked: 2 times

Re: 330e Hybrid Transmission

Post by andrewjenkins34 »

No worries about the Zombie. I'll just use it for other VCU things.
Main concern now is this HICUROFS1/2 error I'm getting. Measured the resistors in the voltage dividers and they're all good but there's definitely a problem somewhere else and I'm not 100% how to track it down. When I measure voltage going into C57 and C59 I get 0.01v. Voltage into C47 and C46 is 5.7v.
Attachments
image_2021-07-24_212103.png
User avatar
Ev8
Posts: 816
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 43 times
Been thanked: 163 times

Re: 330e Hybrid Transmission

Post by Ev8 »

may be worth asking a specific question n the toyota subforum... i dont have any experience with the prius gen3 inverter
timboness1
Posts: 3
Joined: Sat Jan 28, 2023 2:30 pm

Re: 330e Hybrid Transmission

Post by timboness1 »

Hello Andrew, keenly following this; any update?
andrewjenkins34
Posts: 57
Joined: Thu Dec 17, 2020 1:48 am
Has thanked: 1 time
Been thanked: 2 times

Re: 330e Hybrid Transmission

Post by andrewjenkins34 »

No real updates. Had our 4th daughter in October and work has been very busy so haven't had much time for the project.
Still need to diagnose the incorrect voltage at the divider for the current sensors. I did, however, get canbus messages sent to the GCU so I can start mapping them. Once I get RPM, throttle/pedal position mapped I can start initialization so the GCU can control shifting. It uses a closed loop setting so it will continue to learn as i go. I'll also need to send a calculated torque but I'm not sure how. Open to suggestions.
andrewjenkins34
Posts: 57
Joined: Thu Dec 17, 2020 1:48 am
Has thanked: 1 time
Been thanked: 2 times

Re: 330e Hybrid Transmission

Post by andrewjenkins34 »

Well... tested all the resistors in the current sensors. R62, 63, 71, 72, 41, 45, 42, and 46 all measured what they're supposed to. No continuity issues at CONN2 or CONN7, everything doing what it's supposed to.

That's when I decided to take another look at the actual current sensor and I noticed a bulge at the base by the connector. Disassemble and voila, pretty sure I found the reason why this particular Prius was in the junkyard.

Time for another inverter.
Attachments
20230221_180358.jpg
20230221_180414.jpg
timboness1
Posts: 3
Joined: Sat Jan 28, 2023 2:30 pm

Re: 330e Hybrid Transmission

Post by timboness1 »

I assume you can't source that connector board only from somewhere?
andrewjenkins34
Posts: 57
Joined: Thu Dec 17, 2020 1:48 am
Has thanked: 1 time
Been thanked: 2 times

Re: 330e Hybrid Transmission

Post by andrewjenkins34 »

It looks like I can get the current sensor by itself but I think I'd rather get another inverter. Just need to find the time to get to the junkyard.
Attachments
s-l400.jpg
s-l400.jpg (12.03 KiB) Viewed 3428 times
andrewjenkins34
Posts: 57
Joined: Thu Dec 17, 2020 1:48 am
Has thanked: 1 time
Been thanked: 2 times

Re: 330e Hybrid Transmission

Post by andrewjenkins34 »

Trying to figure out how to send CAN messages from OI board to my GCU. I've been trying to learn but it's just not clicking. I'm out of my depth here and hoping someone could help.

The GCU has a built-in sniffer so I can see that it's transmitting information and being received, just not sure how to send it in a way that makes sense.
Attachments
Capture1.PNG
CAN TX OI.PNG
CAN TX OI.PNG (5.79 KiB) Viewed 3393 times
CAN Mapping GCU.PNG
andrewjenkins34
Posts: 57
Joined: Thu Dec 17, 2020 1:48 am
Has thanked: 1 time
Been thanked: 2 times

Re: 330e Hybrid Transmission

Post by andrewjenkins34 »

Just received the new current sensor and I have a working setup with no errors! Could not be happier.

Went ahead an purchased a CAN shield for my Arduino so now maybe I can teach myself how to read what's being sent and get it mapped appropriately. Once that's done, I can finally move on to initializing the gearbox to get that running on closed loop.
andrewjenkins34
Posts: 57
Joined: Thu Dec 17, 2020 1:48 am
Has thanked: 1 time
Been thanked: 2 times

Re: 330e Hybrid Transmission

Post by andrewjenkins34 »

Alright, I've been playing with ChatGPT-4 and having a lot of fun. Since I'm not a programmer and don't want to damage anything, I asked the chat for help. As I've stated before, I need to send torque, rpm, pot, pot2, and tmpm to the GCU and I'm having some challenges. The first is that torque isn't a viewable spot value so I asked it how to add torque as a spot value and this is what it came up with:
I apologize for the confusion. After reviewing the OpenInverter documentation, I understand the context better. Let's revise the steps to add the calculated torque as a spot value.

1. First, create a new parameter for torque in `param.h`:

```c
enum PARAM_NUM
{
...
torque, // Add this line
...
PARAM_LAST
};
```

2. Next, add a default value for the new parameter in `param.c`:

```c
static const Param::Default DEFAULTS[Param::PARAM_LAST] =
{
...
{ Param::torque, 0, 0, 1000, 0 }, // Add this line
...
};
```

3. To calculate the torque, you should edit the `inverter.cpp` file. Locate the `Run()` function, and after the lines where `id` and `iq` currents are computed, calculate the torque using the motor's power equation. The torque equation is as follows:

Torque = 3/2 * Poles * (Id * Ld * Iq + (Ld - Lq) * Iq * Iq)

4. First, we need to retrieve the motor's Ld, Lq, and pole pairs. Add these lines before the torque calculation:

```c
float ld = Param::GetFloat(Param::ld);
float lq = Param::GetFloat(Param::lq);
int pole_pairs = Param::GetInt(Param::polepairs);
```

5. Next, calculate the torque and store it in the `torque` parameter:

```c
float torque = 1.5f * pole_pairs * (id * ld * iq + (ld - lq) * iq * iq);
Param::SetFloat(Param::torque, torque); // Set the calculated torque as a spot value
```

Now, the calculated torque will be available as a spot value and can be accessed using the `torque` parameter.

If anyone wants to review and make suggestions, it would be greatly appreciated. Or suggest a way to test without causing permanent damage...
andrewjenkins34
Posts: 57
Joined: Thu Dec 17, 2020 1:48 am
Has thanked: 1 time
Been thanked: 2 times

Re: 330e Hybrid Transmission

Post by andrewjenkins34 »

Here's what it came up with in order to transmit over CAN to the GCU:
To transmit the torque, rpm, pot, pot2, and tmpm spot values from the OpenInverter to the HTG GCU, you should follow the CAN communication protocol for both devices.

The OpenInverter's CAN communication documentation suggests that the default CAN base ID is 0x400. For the HTG GCU, the documentation suggests that you should use a custom CAN profile with a 0x600 base ID. You can configure the CAN messages and IDs according to the HTG GCU User Guide, specifically the CAN BUS guide section.

Let's create CAN messages for torque, rpm, pot, pot2, and tmpm with unique IDs by following a pattern:

1. Torque - CAN ID: 0x600, Position: 0, Bits: 16, Gain: 0.1
2. RPM - CAN ID: 0x601, Position: 0, Bits: 16, Gain: 1
3. Pot - CAN ID: 0x602, Position: 0, Bits: 8, Gain: 1
4. Pot2 - CAN ID: 0x603, Position: 0, Bits: 8, Gain: 1
5. Tmpm - CAN ID: 0x604, Position: 0, Bits: 8, Gain: 1

With the above configuration, you can transmit the desired spot values from the OpenInverter to the HTG GCU. Make sure that you configure both devices to use the same CAN bit rate for communication. The OpenInverter wiki suggests that the default bit rate is 500 kbit/s.

Now, to implement this in the OpenInverter software, you should modify the `can.cpp` file to add the custom CAN messages. Locate the `Can::SendAll()` function and add the following lines:

```c
Send(0x600, (uint32_t)(Param::GetFloat(Param::torque) * 10.0f), -1); // Torque, multiply by 10 for a 0.1 gain
Send(0x601, (uint32_t)Param::GetInt(Param::rpm), -1); // RPM
Send(0x602, (uint32_t)Param::GetInt(Param::pot), -1); // Pot
Send(0x603, (uint32_t)Param::GetInt(Param::pot2), -1); // Pot2
Send(0x604, (uint32_t)Param::GetInt(Param::tmpm), -1); // Tmpm
```

These lines will transmit the torque, rpm, pot, pot2, and tmpm spot values with the configured CAN IDs, positions, bits, and gains. Make sure the HTG GCU is set up to receive these messages according to the custom CAN profile.
andrewjenkins34
Posts: 57
Joined: Thu Dec 17, 2020 1:48 am
Has thanked: 1 time
Been thanked: 2 times

Re: 330e Hybrid Transmission

Post by andrewjenkins34 »

Just wanted to share this because it's fun to watch. No real updates at this point. I'm kind of stuck on a few things.
I can't get any new FOC firmware beyond 5.0 to load successfully but that's ok for now since 5.0 works.
I'm not sure how to add an .ods file to the library so that the motor temp sensor will read correctly.
I'm still struggling to get the Prius and the GCU to talk to each other. I've confirmed the GCU is receiving data, I just can't get it into the right format.

In the meantime, I'm going to work on cleaning up the wiring as well as setting up a coolant reservoir and pump for the inverter.

Anybody in Florida want to come over and offer a hand? I'm open to suggestions.
Attachments
1000000660.gif
330eBMW
Posts: 1
Joined: Mon Jan 08, 2024 11:26 am

Re: 330e Hybrid Transmission

Post by 330eBMW »

Hi Andrew, great project you have, ill be watching progress thanks for sharing.
pekoge7244
Posts: 3
Joined: Tue Nov 12, 2024 3:11 pm

Re: 330e Hybrid Transmission

Post by pekoge7244 »

Hello Andrew, any updates on the project? did you get it up and running, or are you still having difficulties?
andrewjenkins34
Posts: 57
Joined: Thu Dec 17, 2020 1:48 am
Has thanked: 1 time
Been thanked: 2 times

Re: 330e Hybrid Transmission

Post by andrewjenkins34 »

Thanks for reaching out! I have the motor turning under my control with no problem but I'm still having difficulty with the communication between the transmission controller and the inverter. Admitedly, life has gotten in the way of this project and I've not had the opportunity to work on it in quite some time but I certainly haven't given up.
pekoge7244
Posts: 3
Joined: Tue Nov 12, 2024 3:11 pm

Re: 330e Hybrid Transmission

Post by pekoge7244 »

how are you controlling the motor? using a Prius inverter or what exactly?.

the GCU gave a bunch of people using non hybrid Zf8hp trans tuning problems for all those who did not buy tuning service from the company.
check this man destroying his after 3 years of time and effort :
TurboLamik for racing application and CAN TCU for a street application have much better success rate with DIYers

and what are you trying to achieve with the communication between the inverter and transmission? can't you just tune the transmission independently and then control the electric motor with the throttle along with a switch to engage and disengage the clutch pack in the electric motor/ Clutch unit?

thanks for sharing details btw you are the only one in the world doing this
Post Reply