hmm...
So while testing my updated stm32-car code, I've realized that the Toyota hybrid control ecu is not sending the can bus information I'm expecting because the ecu/car is not in ready mode.
I knew I would have to deal with this eventually but seems that time is now...
That leads me to two options:-
A) Spoof the inputs to the Toyota hybrid control ecu
B) Implement the functionality from the Toyota hybrid control ecu needed in stm32-car.
Spoof the inputs to the Toyota hybrid control ecu
1) resolver/inverter
2) contactor/precharge charge voltages
3) Toyota BMS
Implement the functionality from the Toyota hybrid control ecu needed in stm32-car.
1) shift leaver
2) key authentication
3) A/C control
4) All the other stuff I don't know I need yet...
I'll start with spoofing resolver/inverter. I've had a go at this in the past, but not successful
see [viewtopic.php?p=44241#p44241]. To trick the Toyota hybrid control ecu to stay in ready mode and drive, it has to get feed back from current sensors and/or resolver.
I've seen in [ Latula EV test his SDU card using a signal generator
I think my options are
I) By any chance is the Toyota hybrid control ecu sending any information over CAN that Open Inverter ecu can use as resolver information to drive the motor
II) Can Open Inverter ecu hw/sw be modified to use the resolver information generated by the Toyota hybrid control ecu
III) Update Open Inverter ecu to create spoof resolver information for the Toyota hybrid control ecu
Attached Toyota resolver information
[FIRST DRIVE] Toyota Prius gen2 plug and play
-
- Posts: 53
- Joined: Wed Dec 26, 2018 1:38 pm
- Location: Greystones Ireland
- Has thanked: 15 times
- Been thanked: 38 times
Re: [FIRST DRIVE] Toyota Prius gen2 plug and play
noI) By any chance is the Toyota hybrid control ecu sending any information over CAN that Open Inverter ecu can use as resolver information to drive the motor
OK, so this is the plan...
First attempt:
Use external excitation from Toyota VH ecu in OI
IO excitation is 9v peek to peek and 4.4 kHz Toyota excitation is 20v peek to peek 10 kHz. Plan is:-
HW:
1) Get Toyota excitation and resolver output down to ~3v peek to peek.
2) Get Toyota excitation in to stm32 (can I use "START" PB6/TIM4_CH1 see [https://github.com/jsphuebner/inverter- ... 2-v1.0.pdf])
SW:
1) Set OI excitation to 10 kHz (can this be done?)
2) Get Toyota excitation edge
2) Compare Toyota and OI excitation edge and add/subtract to resolverSampleDelay [https://github.com/jsphuebner/stm32-sin ... ncoder.cpp]?
20231120 updates removed OI resolver pico scope output (this was old data not OI resolver), both resolver output are kHz.
20231121 got an OI resolver pico scope output confirmed 9v peek to peek
Re: [FIRST DRIVE] Toyota Prius gen2 plug and play
Wow I would imagine trying to keep the oem hv ecu happy while driving with the inverter controlled by OI would be a massive task possibly requiring generating appropriate current and motor position signals possibly proportional to the pwm of the phase driver outputs from the hv ecu, I suspect a fixed set of values would cause errors,
I’m starting to think that taking over contactor contol ect and cutting the hv ecu out of the equation is going to be an easier route,
On a separate note, I’d really appreciate a capture of the a/c comms,
I’m starting to think that taking over contactor contol ect and cutting the hv ecu out of the equation is going to be an easier route,
On a separate note, I’d really appreciate a capture of the a/c comms,
-
- Posts: 53
- Joined: Wed Dec 26, 2018 1:38 pm
- Location: Greystones Ireland
- Has thanked: 15 times
- Been thanked: 38 times
Re: [FIRST DRIVE] Toyota Prius gen2 plug and play
See my options/resoing in post above. Car runs and drives with the hv ecu out of the equation but I ran into probelms to integrate OI with rest of car when not in ready mode e.g hv ecu happy. In the past I've been able to run OI sin software open loop with oem hv ecu connected.Ev8 wrote: ↑Sat Nov 18, 2023 8:24 am Wow I would imagine trying to keep the oem hv ecu happy while driving with the inverter controlled by OI would be a massive task possibly requiring generating appropriate current and motor position signals possibly proportional to the pwm of the phase driver outputs from the hv ecu, I suspect a fixed set of values would cause errors,
I’m starting to think that taking over contactor contol ect and cutting the hv ecu out of the equation is going to be an easier route,
On a separate note, I’d really appreciate a capture of the a/c comms,
Re a/c comms I hope to try johu's idea to use the a/c as changer unmodifed (maybe making sure the gates are permanently low achieves the same)
johu wrote: ↑Tue Sep 05, 2023 7:30 am Yes much agreed. I modded the inverter and controller quite heavily to be able to charge reliably. Of course a controller can't take all of that away but it can be facilitated.
Mods for single phase boost charging:
- Swapped input and output of the buck/boost stage
- Removed 4 IGBTs of the A/C inverter and replaced them with a bridge rectifier (maybe making sure the gates are permanently low achieves the same)
- Fitted a current sensor to the cable going from said A/C inverter into the input of the boost converter to be able to measure charge current
- Disabling that current sensor with a relay while NOT charging
- Connected GSDN to the DC switch signal
It's the Hilux of inverters, virtually invincible unless I start mucking around with it![]()
-
- Posts: 53
- Joined: Wed Dec 26, 2018 1:38 pm
- Location: Greystones Ireland
- Has thanked: 15 times
- Been thanked: 38 times
Re: [FIRST DRIVE] Toyota Prius gen2 plug and play
No luck so far changing the OI resolver excitation frequency.
If I comment out line:
https://github.com/jsphuebner/stm32-sin ... r.cpp#L471
Code: Select all
gpio_set_mode(NORTH_EXC_PORT, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, NORTH_EXC_PIN);
My assumption was that the interrupt frequency that sets the resolver excitation frequency was set some where above in the InitResolverMode function but I haven't figure it out yet.
- johu
- Site Admin
- Posts: 6618
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 341 times
- Been thanked: 1484 times
- Contact:
Re: [FIRST DRIVE] Toyota Prius gen2 plug and play
Changing the excitation frequency is hard as it is indeed half the interrupt frequency of 8.8 kHz.
Not sure what you're trying to achieve on a higher level but if you want only excitation disabled you can switch to SinCos mode
Not sure what you're trying to achieve on a higher level but if you want only excitation disabled you can switch to SinCos mode
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 53
- Joined: Wed Dec 26, 2018 1:38 pm
- Location: Greystones Ireland
- Has thanked: 15 times
- Been thanked: 38 times
Re: [FIRST DRIVE] Toyota Prius gen2 plug and play
I want to use an external resolver exciter from the Toyota HV ECU so both Toyota HV ECU and OI can use the resolver.
-
- Posts: 53
- Joined: Wed Dec 26, 2018 1:38 pm
- Location: Greystones Ireland
- Has thanked: 15 times
- Been thanked: 38 times
Re: [FIRST DRIVE] Toyota Prius gen2 plug and play
Hmm, time for an update to this thread. After getting nowhere with trying to keep the HV ECU happy, I started on implementing/reverse engineering of functionality of the HV ECU. I picked the A/C control, as others on the forum had made some progress on the A/C Denso ES27C.
However, the internet says I cannot use the IGBT K1517 4L2 50SE as a diode/rectifier in reverse because of how IGBT's are constructed.
My other options are:-
1) stack a diode on top of the IGBT
2) not use the A/C Inverter to rectify (use an external rectifier)
Next I want to tackle is trying to charge using the A/C Inverter without modifications and the Buck/Boost converter.
However, the internet says I cannot use the IGBT K1517 4L2 50SE as a diode/rectifier in reverse because of how IGBT's are constructed.
My other options are:-
1) stack a diode on top of the IGBT
2) not use the A/C Inverter to rectify (use an external rectifier)