Motor temperature sensor

Topics concerning the Toyota and Lexus inverter drop in boards
Post Reply
User avatar
bexander
Posts: 835
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Motor temperature sensor

Post by bexander »

To my knowledge there is today no support for the motor temperature sensors used in Toyota/Lexus motors in the inverter firmware.

I have not found any specifications from Toyota but some information can be found on this forum as well as other forums that the sensor used seem to be a 47kohm NTC thermistor with a beta of around 3900K.
According to my own very crude measurements this seem to be the case for the MGR as well.
It makes sens to me that Toyota would use the same sensor in all motors.

To make this sensor useful some hardware is required. To make greatest use of this sensor it should be made accurate at temperatures of 100-170 degree C and not at all important below 50 degree C.
My circuit suggestion:
image_2020-10-12_113746.png
Where R1=3,3kohm and R2=5,6kohm. Th is the sensor.
This gives a non-linear detection but provides accuracy where needed.
Calculations can found here:
Toyota Motor Winding Thermistor Data.ods
(61.33 KiB) Downloaded 98 times
Please comment what your thoughts are. What should be different and why?
When we can agree on a good solution this then can be implemented in the HW and SW.
User avatar
bexander
Posts: 835
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Motor temperature sensor

Post by bexander »

Now added to new firmware but with R1=1,2kohm and R2=2,2kohm.

Will post picture of how I did the mods needed on my Yaris board when it's done.
User avatar
bexander
Posts: 835
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Motor temperature sensor

Post by bexander »

I have now done the mods to my Yaris board and tested with the motor temperature sensor. Seems to give reasonable readings.

A picture of how I did the mod to my board.
IMG_1452.JPG
R20 changed to 1,2kohm.
A resistor of 2,2kohm from MG2_STATOR_T2 (R14) to GND (C11).
A wire from MG2_STATOR_T1 (R20) to MG2_STATOR_T2 (R14).
Connecting temperature sensor from MG2_STATOR_T1 or T2 (J1:24 or J1:23) to GND (any available GND pin will work)
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Motor temperature sensor

Post by arber333 »

Hm..

May i humbly ask for all of your opinions, hijacking this thread?
Several years back i was working with interesting temperature sensor.
It is a serial sensor from Maxim int. DS18S20. https://datasheets.maximintegrated.com/ ... S18S20.pdf
Several sensors, up to 8, can be wired into a string with each of them having its own serial address.
Woulnd that option be a better idea than have various sensors of different values? If we are in a position to work with salvaged equipment we certainly can glue in that a single sensor to keep tabs on the temperature there. See sensor properties in datasheet.
Question now is if a single serial pin can be reserved for this purpose on STM32 chip? Also the option of various sensor addresses would need to be implemented inside code. I am not sure mow much work that would be...
I think i will try this sensor with Lebowski interface since Bas already made a setup in his code. BTW his code is now open source... :twisted:.

A
User avatar
TheSilverBuick
Posts: 187
Joined: Mon Jun 08, 2020 5:01 pm
Location: Nevada, United States
Has thanked: 3 times
Been thanked: 1 time

Re: Motor temperature sensor

Post by TheSilverBuick »

Interesting! I would say knowing the temp of the MGR is useful given it's air cooled nature and number of people attempting to use it as primary propulsion.

I was looking at how the Megasquirt community handled Toyota temp sensors and it looked to me that Toyota was reasonably consistent with their temp sensors.
Need to learn. Starting from the basics.
User avatar
johu
Site Admin
Posts: 5788
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1022 times
Contact:

Re: Motor temperature sensor

Post by johu »

BTW on the Prius Gen2 SMT board "R1" is R21 and "R2" is R16. So R21 must be swapped for 1k2 and R16 swapped for 2k2. And also MTEMP- is shorted to MTEMP+. Sensor connects to there and GND.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5788
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1022 times
Contact:

Re: Motor temperature sensor

Post by johu »

arber333 wrote: Sun Oct 25, 2020 11:46 am It is a serial sensor from Maxim int. DS18S20. https://datasheets.maximintegrated.com/ ... S18S20.pdf
Yes that is also an option but of course we try to use embedded sensors where possible.
It's probably possible to remove the low pass filter of mtemp and run the onewire protocol with just bit-banging. Or run it so slow that the low pass can stay :)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Motor temperature sensor

Post by arber333 »

johu wrote: Mon Oct 26, 2020 9:27 pm
arber333 wrote: Sun Oct 25, 2020 11:46 am It is a serial sensor from Maxim int. DS18S20. https://datasheets.maximintegrated.com/ ... S18S20.pdf
Yes that is also an option but of course we try to use embedded sensors where possible.
It's probably possible to remove the low pass filter of mtemp and run the onewire protocol with just bit-banging. Or run it so slow that the low pass can stay :)
That would be a good option for those that go into serious detail in conversions. With single protocol one could monitor temperature of various modules scattered in the car and bring them to a single point inside inverter. There one could assign significance and alarm threshold to each of the sensor values.

This could also work for BMS, dont you think? And on top of that i saw sensors have a sort of parasitic supply option to run from two wires only.
User avatar
johu
Site Admin
Posts: 5788
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1022 times
Contact:

Re: Motor temperature sensor

Post by johu »

One sensor that just maps to tmpm is all I'd do. Enough parameters already. If people want to go haywire on this they can just deploy some Arduino.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
bexander
Posts: 835
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Motor temperature sensor

Post by bexander »

ZooKeeper wrote: Tue Nov 03, 2020 11:18 pm Much better, maybe some tweaking with sensor ground resistance ;)

4k7 = 75*C (low by 15*)
2k2 = 108*C (nearly dead-on :) )
1k0 = 145*C (high by 15*)
470 = 183*C (high by 17*)
047 = 200*C+ (saturated)
010 = 200*C++ (saturated)
Why do you want to tweak it? To me, there is no need to have a accurate motor temperature reading below 50degC.
Also, be careful as the resistor values are selected to feed less than 3,3V to the STM32, even if no sensor is connected.
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: Motor temperature sensor

Post by ZooKeeper »

I re-drew the VCU diagram I made to incorporate the Toyota Motor Temp Sensor Wiring Option, which I have attached for reference.

Disclaimer: This is NOT for non-Toyota motor temp sensors and has NOT been validated on all Toyota hybrid motors.
Attachments
VCU > Toyota MTemp
VCU > Toyota MTemp
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
Post Reply