Prius Gen2 adapter board development thread

Topics concerning the Toyota and Lexus inverter drop in boards
RetroZero
Posts: 720
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 319 times
Been thanked: 40 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Isaac96 wrote: Sun Jul 26, 2020 5:10 pm
RetroZero wrote: Sun Jul 26, 2020 4:40 pm BTW, relaoding the programme can be done with a ST Link V2?
Yes. Careful, there are apparently some fakes floating around -- if you get an STM32 Nucleo board those have an ST-link onboard (and also a spare STM32 chip).

-Isaac
St Nucleo board finally arrived today.....I will attempt to reload firmware this week end. Am I correct in thinking that the firmware is flashed via Nucleo?
RX and TX outputs on Nucleo connect directly to RX and TX of original ESP wifi module pins? Or do I need to flash directly via MCU TMS and TCK?
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Prius Gen2 adapter board development thread

Post by Isaac96 »

RetroZero wrote: Fri Jul 31, 2020 5:11 pm St Nucleo board finally arrived today.....I will attempt to reload firmware this week end. Am I correct in thinking that the firmware is flashed via Nucleo?
RX and TX outputs on Nucleo connect directly to RX and TX of original ESP wifi module pins? Or do I need to flash directly via MCU TMS and TCK?
I hope you're flashing firmware to the STM32 chip?

If so, there is 1 thread and 1 PDF you'll need to use the Nucleo's ST-Link:
viewtopic.php?f=2&t=6
Page 19 or so here: https://www.st.com/resource/en/user_man ... ronics.pdf

-Isaac
RetroZero
Posts: 720
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 319 times
Been thanked: 40 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Thanks for the pointers.. Fingers crossed 🤞
LRBen
Posts: 473
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 102 times

Re: Prius Gen2 adapter board development thread

Post by LRBen »

Had some success getting the Outlander motor spinning with the inverter!

Did the IL1 and IL2 current sensor calibration using a light bulb as a current limiter through the respective phase wires. Set syncoffset to 15000 as starting point from the Outlander motor thread.
With a 3A ID it runs in manual mode as shown on this video. Not sure if that is smooth or not since I have not seen this motor run on manual mode before. I will hook up the throttle tomorrow and hopefully see some smoother starts and stops.
Battery BMS showed a 3.5 amp drain on the battery so it seems pretty similar.

This is running at 48v. I hooked the inverter up to my Quad bike battery so that I could use the precharge system in that. It's also the only battery I have at the moment higher than 12v.

Video

johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Prius Gen2 adapter board development thread

Post by johnspark »

Jack Bauer wrote: Tue Jul 28, 2020 7:49 pm Ok. This ain't working. How about we do a google hangout or similar and I'll talk you all through it.
If you have not had the session yet, i would like to watch this as well thank you
Bram
Posts: 26
Joined: Sun Jun 21, 2020 12:27 pm
Location: Netherlands

Re: Prius Gen2 adapter board development thread

Post by Bram »

LRBen wrote: Sat Aug 01, 2020 8:08 pm Had some success getting the Outlander motor spinning with the inverter!

Did the IL1 and IL2 current sensor calibration using a light bulb as a current limiter through the respective phase wires. Set syncoffset to 15000 as starting point from the Outlander motor thread.
With a 3A ID it runs in manual mode as shown on this video. Not sure if that is smooth or not since I have not seen this motor run on manual mode before. I will hook up the throttle tomorrow and hopefully see some smoother starts and stops.
Battery BMS showed a 3.5 amp drain on the battery so it seems pretty similar.

This is running at 48v. I hooked the inverter up to my Quad bike battery so that I could use the precharge system in that. It's also the only battery I have at the moment higher than 12v.
Great work LRBen!
I have the same plans and equipment (with a 48V test powersupply). you are ahead, paving the way. Thank you.
unfortunate I'm stuck for a few days with the DESAT error. would you mind sharing Parameters, or your IL1 & IL2gain? Perhaps this solved my DESAT issue. Thank you, keep up the good work!
Bram
Posts: 26
Joined: Sun Jun 21, 2020 12:27 pm
Location: Netherlands

Re: Prius Gen2 adapter board development thread

Post by Bram »

Great work LRBen!
Have the same combination, willing to share Parameters? I'm stuck for days on my DESAT error
LRBen
Posts: 473
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 102 times

Re: Prius Gen2 adapter board development thread

Post by LRBen »

Bram wrote: Mon Aug 03, 2020 11:30 am Great work LRBen!
I have the same plans and equipment (with a 48V test powersupply). you are ahead, paving the way. Thank you.
unfortunate I'm stuck for a few days with the DESAT error. would you mind sharing Parameters, or your IL1 & IL2gain? Perhaps this solved my DESAT issue. Thank you, keep up the good work!
My IL1 and IL2 gain were around 3.1. I am going to redo the current sensor calibration next weekend with 10 amps and 5 amps as I'm not entirely sure it is accurate enough at the moment. I did hook up the throttle on the Sunday but it wasn't all that successful. On the throttle pedal it does not always move, but when it does it will spin up to the same rpm as running in manual mode and also not stop once I release the pedal. I think it might be something to do with the throttle settings or the Il1/2 gain is off maybe?

Once I get the throttle working well I will share my parameters.
Bram
Posts: 26
Joined: Sun Jun 21, 2020 12:27 pm
Location: Netherlands

Re: Prius Gen2 adapter board development thread

Post by Bram »

LRBen wrote: Mon Aug 03, 2020 5:31 pm
Bram wrote: Mon Aug 03, 2020 11:30 am Great work LRBen!
I have the same plans and equipment (with a 48V test powersupply). you are ahead, paving the way. Thank you.
unfortunate I'm stuck for a few days with the DESAT error. would you mind sharing Parameters, or your IL1 & IL2gain? Perhaps this solved my DESAT issue. Thank you, keep up the good work!
My IL1 and IL2 gain were around 3.1. I am going to redo the current sensor calibration next weekend with 10 amps and 5 amps as I'm not entirely sure it is accurate enough at the moment. I did hook up the throttle on the Sunday but it wasn't all that successful. On the throttle pedal it does not always move, but when it does it will spin up to the same rpm as running in manual mode and also not stop once I release the pedal. I think it might be something to do with the throttle settings or the Il1/2 gain is off maybe?

Once I get the throttle working well I will share my parameters.
Thank you!
Had the same throttle issue with my blue pill set up. the (induction) motor only moved until the test/manual Frequency, and throttle did not moved very linear. still need to figure out what it is, let you know once figured out.
User avatar
johu
Site Admin
Posts: 5769
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1010 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

In general it is hard to control motor speed of an unloaded motor with the throttle. Throttle input controls torque and of course very little torque will spin an unloaded motor up very fast. You can try using the idlespeed parameter for testing as well.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Bram
Posts: 26
Joined: Sun Jun 21, 2020 12:27 pm
Location: Netherlands

Re: Prius Gen2 adapter board development thread

Post by Bram »

johu wrote: Tue Aug 04, 2020 9:33 am In general it is hard to control motor speed of an unloaded motor with the throttle. Throttle input controls torque and of course very little torque will spin an unloaded motor up very fast. You can try using the idlespeed parameter for testing as well.
Thank you. Makes sense.

Something else; I've hooked up my board, and got the Sine firmware running without any error, motor "turns" but is shaking/jumping and dancing. after measuring, it seems that MWU is not active or providing a signal, I checked the darlington array, that is not receiving any signal as well from the STM32. Already tried resoldering the connections on the darlington array, but no change.
Is there something I can do to get this working again, or could this be an manufacturing error?

p.s. (my capacitor C13 also felt off the board shortly after receiving, soldered back on it and got it working)
LRBen
Posts: 473
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 102 times

Re: Prius Gen2 adapter board development thread

Post by LRBen »

If you are using an outlander motor then you need the foc firmware not the sine.
Bram
Posts: 26
Joined: Sun Jun 21, 2020 12:27 pm
Location: Netherlands

Re: Prius Gen2 adapter board development thread

Post by Bram »

LRBen wrote: Wed Aug 05, 2020 10:08 am If you are using an outlander motor then you need the foc firmware not the sine.
Thank you, correct.
I first try to get my induction motor on the sine software running, once successful I will hook up my outlander motor. want to avoid to destroy my outlander motor.
User avatar
johu
Site Admin
Posts: 5769
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1010 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

Bram wrote: Wed Aug 05, 2020 10:05 am Something else; I've hooked up my board, and got the Sine firmware running without any error, motor "turns" but is shaking/jumping and dancing. after measuring, it seems that MWU is not active or providing a signal, I checked the darlington array, that is not receiving any signal as well from the STM32. Already tried resoldering the connections on the darlington array, but no change.
Is there something I can do to get this working again, or could this be an manufacturing error?
You should certainly see an INPUT to the array when fstat > 0 and amp > 0 e.g. by setting fslipspnt=1 and ampnom=1. Could it be that pwmpol is set to ActiveLow? If you can't see pwmpol type "flag pwmpol ~hidden" into the custom command field and refresh.
The darlington output of course only creates a visible signal when connected to the power stage AND the power stage is enabled via MSDN. So it should be resting at around 15V and pulses pull down to GND.
Bram wrote: Wed Aug 05, 2020 10:05 am p.s. (my capacitor C13 also felt off the board shortly after receiving, soldered back on it and got it working)
Oh, that's embarrassing :? I've seen it happen on other boards, too. Maybe I should aim for an elcap-less design.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Bram
Posts: 26
Joined: Sun Jun 21, 2020 12:27 pm
Location: Netherlands

Re: Prius Gen2 adapter board development thread

Post by Bram »

johu wrote: Wed Aug 05, 2020 11:31 am You should certainly see an INPUT to the array when fstat > 0 and amp > 0 e.g. by setting fslipspnt=1 and ampnom=1. Could it be that pwmpol is set to ActiveLow? If you can't see pwmpol type "flag pwmpol ~hidden" into the custom command field and refresh.
The Darlington output of course only creates a visible signal when connected to the power stage AND the power stage is enabled via MSDN. So it should be resting at around 15V and pulses pull down to GND.
Thank you for your feedback Johu.
I've got it turning (on 2 phases), and then measure the signals from the Darlington array (in & output) 2 are active going down, while MWU stays flat on the input from the darlington compared to the other 2. Correct, Darlington output signal for MWU is always 15V, where the other 2 switching to GND.
PWMPOL is on ACTHIGH, MSDN on 12v, while running Fstat 5Hz and amp 37813(AMPnom 100%).


any other thoughts, or scenario's I can check?
User avatar
johu
Site Admin
Posts: 5769
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1010 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

It looks like you made no mistake here. Write a short email if you want a replacement board.
Meanwhile you can check whether the signals are present on the micro. It is the 3 parallel traces where it says "IC1"

EDIT: since the cap fell off it almost sounds like a mistake during reflow, maybe some pins just haven't made contact.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

greetings members!, I am back after driving to Florida and back to pick up a spare inverter board that I own, and related prius work.
( including installing a leaf motor in a boat on another thread, and another tube vid)

in the meantime parts arrived for the original inverter board
uln2003 now replaced and board is turning a gen2 MG1 motor, and FYI the spare board is also giving the same results.

I dont see any PWM signal coming from the driver,so i assume my testing method is wrong and likely in the parameters

tuning commences tomorrow, here are the parameters I have so far.

(refresher., what is the goal for the currents with regard to phase and amplitude ?

Attachments
params steve aug52020.json
(1.29 KiB) Downloaded 92 times
20200805_141332.jpg
the priustoric boatcar guy
RetroZero
Posts: 720
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 319 times
Been thanked: 40 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Before I fried my adapter board, my Mg1 motor was running smooth as silk in manual mode from inverter. I didn't test pwm outputs, but definetly wasn't clonking like yours.
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 4 times

Re: Prius Gen2 adapter board development thread

Post by Kevin Sharpe »

imwoody36 wrote: Thu Aug 06, 2020 12:01 am I dont see any PWM signal coming from the driver,so i assume my testing method is wrong and likely in the parameters
What are the three PWM signals doing on the input to the ULN2003 driver chip?

Do you think this is the same issue?
Bram wrote: Wed Aug 05, 2020 1:37 pm
johu wrote: Wed Aug 05, 2020 11:31 am You should certainly see an INPUT to the array when fstat > 0 and amp > 0 e.g. by setting fslipspnt=1 and ampnom=1. Could it be that pwmpol is set to ActiveLow? If you can't see pwmpol type "flag pwmpol ~hidden" into the custom command field and refresh.
The Darlington output of course only creates a visible signal when connected to the power stage AND the power stage is enabled via MSDN. So it should be resting at around 15V and pulses pull down to GND.
Thank you for your feedback Johu.
I've got it turning (on 2 phases), and then measure the signals from the Darlington array (in & output) 2 are active going down, while MWU stays flat on the input from the darlington compared to the other 2. Correct, Darlington output signal for MWU is always 15V, where the other 2 switching to GND.
PWMPOL is on ACTHIGH, MSDN on 12v, while running Fstat 5Hz and amp 37813(AMPnom 100%).
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 4 times

Re: Prius Gen2 adapter board development thread

Post by Kevin Sharpe »

Probably a good time to remind people that when you're stuck in a loop and the community can't solve your problems, both Johannes and Damien are available for hire**;

https://openinverter.org/shop/index.php ... duct_id=61

https://www.evbmw.com/index.php/evbmw-w ... evbmw-serv

**Note that both guys are extremely busy and therefore I'd recommend booking this help early if your development is on a critical path. Note also that New Electric will have some one day online courses in the future that focus on specific technical topics such as the Gen 2 adapter board 8-)
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
User avatar
johu
Site Admin
Posts: 5769
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1010 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

Well guys, I think I made a mistake in the documentation. I realized when testing one of my own boards. So in fact inverter PWM is on pins 28, 29 and 30 (per my documentation sheet) or 8, 9, 10 when looking at the 12-pin connector only. On the input of the ULN chip this would be pins 5, 6, 7.
Please try this and report back.

Likewise CPWM signal is found on Pin 31/11 and pin 4 of the ULN

Attached is a corrected documentation sheet.
Attachments
Info Prius Package.pdf
(44.91 KiB) Downloaded 139 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Bram
Posts: 26
Joined: Sun Jun 21, 2020 12:27 pm
Location: Netherlands

Re: Prius Gen2 adapter board development thread

Post by Bram »

Hi Johu,

it works!!
Thanks, I've got it running (on sine) smooth without any errors. with 3 similar amp, nothing abnormal or weird. Thank you for checking Johu
RetroZero
Posts: 720
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 319 times
Been thanked: 40 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by RetroZero »

Champagne 🥂! Thanks Johu 👍
User avatar
johu
Site Admin
Posts: 5769
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1010 times
Contact:

Re: Prius Gen2 adapter board development thread

Post by johu »

Nice, great relief :)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
imwoody36
Posts: 91
Joined: Fri May 01, 2020 2:20 pm
Location: Scottsburg Indiana
Contact:

Re: Prius Gen2 adapter board development thread

Post by imwoody36 »

I have 3 pwm signals now as well.
now tuning commences... will check current again.
the priustoric boatcar guy
Post Reply