# BMW 330ci conversion



## hitchhikingmike (Mar 20, 2014)

subscribe!


----------



## eldis (Sep 3, 2013)

Looks like a nice conversion, good luck!

As I've done a lot of experiments with Toyota (and therefore Lexus) components, maybe there will be a few tips to help you get on the road faster.
First the battery voltage - The Lexus GS450h has 288V pack, so parts of the inverter will be designed to operate on this voltage (400V would be no-no). Basically to get this up and running, you will have to remove the Boost IGBT and the inductor, also the DC/DC circuit that was charging 12V battery in Lexus (it would burn on your pack voltage). The final stage (two IGBT motor bridges) you can keep, they will be happy with these voltages. Not sure what voltage outputs the original boost, it will be around 500V, so fine there.

Lexus inverter was designed at the same time/ by the same people as Prius 3rd Gen inverter, so you can expect to find something like this:


----------



## bigmouse (Sep 28, 2008)

Thanks for the info eldis.

I've actually already started tearing in to my inverter (mine is from an 07, the one you attached photos of is from a later model). My inverter is identical to the Camry Hybrid inverter, with the exception of a larger HV capacitor, some of the LV connectors are different, and mine has an extra set of parallel IGBTs and diodes for MG1.

The original boost converter outputs 650vdc. The capacitor is rated to 750vdc. I may lower my voltage a little bit (at the expense of range) to give myself a bit more overhead for voltage overshoot at IGBT turn-off.

The plan is to connect the batteries directly to the IGBT module bus bars rather than going through the converter. I will retain the converter for reasons to be described in later updates.


----------



## favguy (May 2, 2008)

I'm looking forward to watching this with interest 

Are you using a main motor mated to the transmission in place of the engine as well? or just the integral transmission mounted motors?


----------



## bigmouse (Sep 28, 2008)

favguy said:


> I'm looking forward to watching this with interest
> 
> Are you using a main motor mated to the transmission in place of the engine as well? or just the integral transmission mounted motors?


Just the motors inside the transmission. The input shaft will be locked (I need to design some sort of fixture to hold it). This will allow MG1 to act as a motor through a fix reduction. The speed rating of MG1 is the same as MG2 in the Camry hybrid (14k rpm), so this configuration will limit me to 110mph due to MG1 speed. MG2 has two speeds, controlled by clutches and a gearset in the transmission. There's an electric oil pump that allows EV mode in the original transmission. I'm hoping that this pump feeds the same oil circuit as the mechanical pump inside. The mechanical one will never turn as it's coupled to the input shaft. I'll need to make sure that the clutches/solenoids get hydraulic pressure as well as the oil cooling for the stators and lubrication of the bearings. I'm trying to get a second transmission that I can tear down to confirm the operation of the oil pump, but if I have to, I'll tear this one down to make sure. If I need to drive the internal oil pump as well as the electric one, I'll rig up a BLDC motor to drive the pump shaft. But I'm really hoping I can avoid that.


----------



## tylerwatts (Feb 9, 2012)

Hi bigmouse
Fascinating conversion and I follow with great interest and hope for your success. Do you have any schematic for the transmission? Can you explain why you want the motors to run at different speeds and even use 2 speeds. My personal preference would be discard the input and lock MG1 to MG2 so that you effectively have only 1 motor. You could still drive them independently similar to a dual ac35 setup for safety and redundancy but would have a simpler and in my opinion stronger setup. 
I'm fascinated as this would make a brilliant transmission tunnel drive arrangement without being direct drive in the sense of attaching straight to the differential, and allows significant battery space in the engine bay. 

I look forward to your reply and progress. Forgive me if I'm hijacking your thread somewhat. 
Regards
Tyler


----------



## bigmouse (Sep 28, 2008)

Here's a schematic of the transmission:








The "ICE" shaft will be locked. The two clutches will be retained and used to control the speed of MG2. The LS600h has the transfer case. The GS450 (mine) goes directly to the output flange.

If I'm going to be driving the two motors independently anyway, I might as well take advantage of that ability. It's not really any harder to control them independently at different speeds than it would be if they were locked together. Still need two inverters, still needs two resolvers. I think Toyota's setup will be the strongest setup. As soon as I start welding on gearing, I'm making it weaker.

The biggest complication to my method will be the two-speed system for MG2. Having the motors separate means that MG1 can continue to provide torque while MG2's gearing is changed.

The biggest reason I'm going with my method is performance. Locking the two motors together and with one gear ratio would cripple the performance of this transmission. MG1 doesn't develop a lot of torque, maybe 150Nm. So it relies on the gearing for that to use its full potential. Similarly with MG2. In the low-speed gear, MG2 will be on a higher ratio than in the high-speed gear. If I lock it in the high-speed one, I lose the acceleration advantage of that gearing. If I lock it in the low-speed one, I'd be speed limited to 45mph. It's a beast of a machine, and I want to take full advantage of that.


----------



## tylerwatts (Feb 9, 2012)

Ok thanks, that makes sense. I don't follow the schematic though, I'll google a bit on it. I wish you every success and am following with interest.


----------



## bigmouse (Sep 28, 2008)

tylerwatts said:


> Ok thanks, that makes sense. I don't follow the schematic though, I'll google a bit on it. I wish you every success and am following with interest.


Here's a link to the paper that describes the transmission (mine is the same minus the transfer case). The GS450h inverter from this same generation is identical to the Camry hybrid inverter. There's also a detailed teardown of that from the same folks.

Transmission: http://www.osti.gov/scitech/biblio/947393/
Inverter: http://www.osti.gov/scitech/biblio/928684


----------



## tylerwatts (Feb 9, 2012)

Oh cool thanks. Very useful! Is the LS600 the same motors in the transmission as yours? Or what is the transfer case for? I just clicked it must be a 4wd...


----------



## bigmouse (Sep 28, 2008)

As far as I can tell from the transfer case to the back of the bellhousing the two transmissions are identical. I haven't confirmed it though. The transfer case is because the LS600h is AWD. The difference in power between the two models probably comes from the different engines, power electronics, and battery.


----------



## tylerwatts (Feb 9, 2012)

Oh great. That means the motors are capable of more than they are tuned for in the gs450h. It should be an excellent system when you have it running. I like the 2 speed option also.


----------



## bigmouse (Sep 28, 2008)

I put the converter IGBT module on a semiconductor analyzer the other day to determine its properties, mainly the breakdown voltage. The results are below. The VF and VCE values range from 1 to 100 amps.

*T 1; BVCES = 594.1 V
T 2; VF = 470.0MV
T 3; VF = 501.0MV
T 4; VF = 554.0MV
T 5; VF = 606.0MV
T 6; VF = 673.0MV
T 7; VF = 811.0MV
T 8; VF = 980.0MV
T 9; VF = 1.121 V
T10; VF = 1.253 V
T11; VF = 1.493 V
T12; VF = 1.716 V
*T13; VF = 2.141 V
*T14; VF = 2.547 V
*T15; VF = 3.110 V
T16; VCEON = 441.0MV
T17; VCEON = 474.0MV
T18; VCEON = 531.0MV
T19; VCEON = 590.0MV
T20; VCEON = 664.0MV
T21; VCEON = 808.0MV
T22; VCEON = 970.0MV
T23; VCEON = 1.104 V
T24; VCEON = 1.221 V
T25; VCEON = 1.441 V
T26; VCEON = 1.643 V
*T27; VCEON = 2.038 V
*T28; VCEON = 2.416 V
*T29; VCEON = 2.790 V
T30; VGETH = 6.257 V
T31; VGETH = 6.342 V

So it's a 600v rated part, which was the most important thing I wanted to find from the test. I'll have to measure the range of the voltage sense circuit to see where it saturates in order to find the maximum useful voltage I can run on that bus.


----------



## bigmouse (Sep 28, 2008)

Managed to get the pinouts for the internal connectors figured out. I'm able to drive the inverter with my own signals! I threw together some very simple open-loop code on an Arduino, put 12v on the DC bus, and connected one of the motors on the transmission. The result is seen in the video. It spins!
It spins slowly, but it spins. That's 12v with no real control. 650v with closed loop control will be a very different story.
Very exciting.
I also figured out how to drive the gates on the converter section, but that's not as interesting to show in video.
Moving forward!

Doesn't look like the youtube embed is working. Any advice?


----------



## Moltenmetal (Mar 20, 2014)

Fascinating- watching with interest!


----------



## jddcircuit (Mar 18, 2010)

bigmouse

Nice project. 
I am also working on using Toyota components in my conversion with custom ECU circuits. You can search for some of my postings if you are interested. I also have some youtube videos at jddcircuit channel.

I am still a bit a way from being on the road but I have made some progress getting things to spin. High rpm levels are going to be challenge for me I expect. I think I will have to switch from my Field Oriented Control producing sinusoidal voltages to a more BLDC type commutation at high rpms. My plan is at high rpms the six step communtation will be frequency modulated instead of pulse width modulated. Hopefully the torque ripple will be minimal at these speeds. IIRC there is simply not enough resolution in my digital control loop and my 16kHz PWM (actually 8kHz center aligned) at high rpms.

You may already know this but I didn't at first, BLDC commutation does not work at lower speeds with these motors. Too much torque ripple. These motors are Interior Permanent Magnet motors which have a reluctance torque vector on top of the permanent magnetic torque vector.

I have also developed a way to use the two motors and two inverters as my battery charger. My charger idea is patent pending but I am using it in my DIY project and hopefully other DIYers will also. You can download my feasibility paper for my charger at www.vehilectric.com if you are interested.

BTW, I live in Florida but I may be in San Jose on business this month. Let me know if you want to get together and talk shop.

Good Luck
Jeff


----------



## bigmouse (Sep 28, 2008)

Hi Jeff,

I have been following your progress! I was tempted to do a conversion very similar to yours (MR2 with either Prius or Camry transmission), but decided to go this route instead due to the performance available from the Lexus transmission.

I'm using vector control for mine (manually for now at least). I haven't connected the current sensors yet so I'm just adjusting the angle of the voltage vector relative to the rotor manually. It's good enough for low speeds and the 12v that I'm testing with.

Regarding switching to BLDC-type commutation, the changeover from FOC to 6-step might not need to be an actual change. If you let your current-control loops saturate at high speed (attempting to achieve current that is not possible due to field weakening), they will go in to overmodulation. This causes the sine waves to transition to square waves. Resolution also shouldn't be much of a problem since at high speeds, distortion in the voltage waveform is filtered by the stator inductance in to a sine wave (or something close enough) anyway. I don't think I'll need to go that route myself, since my pack voltage will be so high. Time will tell though.

I have my own idea for charging, which is different from yours.

Send me a PM before you get here and we'll arrange something!

-Vincent


----------



## jddcircuit (Mar 18, 2010)

bigmouse said:


> Hi Jeff,
> 
> I have been following your progress! I was tempted to do a conversion very similar to yours (MR2 with either Prius or Camry transmission), but decided to go this route instead due to the performance available from the Lexus transmission.
> 
> ...


Very good

When I first spun the motor with no load everything seemed fine. When I put it under a load things were very different. In this first attempt I was reading the resolver and commutating relative to the rotor position. I didn't have the current sensor working at this time.

Now, I am using the AD7609 chip to capture the current sensors coming out of the inverter and doing a simple FOC based on the rotor position and the Id and Iq values. It seems to work pretty well.

I am not sure what the max torque per amp is exactly for this motor. Pretty soon I should be back on the motor control portion and will try to run the two motors against each other to see if I can optimize the efficiency of the control. Having two motors is like having a built in dyno.

Jeff


----------



## bigmouse (Sep 28, 2008)

Yeah, the voltage vector and the current vector are not in alignment at high speeds or under load. That's why FOC uses current controllers to set the current vector angle.

The torque per amp and torque variation with angle should be in the DOE documents.

I plan on using the motors against each other as a dyno (as you mentioned) to determine the optimal Id/Iq values for speeds. Can't measure torque directly, but I have some ideas on how to make it useful.


----------



## mira9_cz (Feb 27, 2013)

Hi Bigmouse. What an impressive idea with the Lexus hybrid gearbox! I spend last two days reading everything I found about your gearbox, they are motivationally inexpensive and available to buy. I can see that controlling motors independently will be quite a pickle. When they made the gearbox, they did not know that one day somebody removes ICE and fix input shaft 

By locking ICE input shaft of the transmission you will fix the generator (MG1) with ravigneaux gear system output through primary output shaft. So If I understand correctly, RPM of MG1 will be proportional to vehicle speed in some ratio of locked power split planetery gearbox. 
On the other hand motor MG2 is connected with rear wheels indirectly using two "gears" of ravigneaux system. I found that these gears can be MG2_RPM/1.9 or MG2_MAX/3.9. Does the MG1 ratio of locked Power split planetary cover both those gears of MG2 fully? Isn't there a "gap" at the beginning caused by locked input shaft from ICE? 

I also wondered how gears of ravigneaux gear system are really shifted? You say that hydraulically by external electric oil pump. But how do you activate them? Simply by rising hydraulic pressure, or is there some CANBus line running between transmission and transmission ECU which operates some valves? Also it makes me wonder how Neutral and Reverse gears are shifted.

From what I understand up to this point, you can make clutches to move actuators by some manual input from driver. In the best case you will have to shift "MG2 LOW" gear only for burnouts, if MG1 will cover normal acceleration power-needs up to the point when MG2_RPM/3.9 are not too low to make the difference. Or you could make MG2 to shift HIGH and LOW gear automatically I guess based on realtime MG1 current, RPM and throttle inputs calculations. In both ways the gear changing issue is crucial for your MG2 motor controller programming. What is your approach here? At least is seems that recuperation braking for MG2 is not necessary to be considered


----------



## bigmouse (Sep 28, 2008)

Hi Mira,

You are correct that locking the input shaft gives MG1 a fixed ratio (2.6:1) to the output shaft. There is no shifting of MG1. According to the LS600h ORNL report, MG1's rotor stampings are identical to MG2 in the Camry hybrid. The top speed of MG2 in the Camry is 14,000rpm, so I am assuming MG1 in the Lexus has the same top speed. It covers the entire speed range of the car and is, in fact, the limiting factor for the top speed of the car.

MG2 gears are switched by controlling solenoids in the transmission with 12v/PWM directly to the solenoids. No CAN in that part. I'll have to control those with my controller myself.

Neutral is achieved by turning off PWM (or applying 0v/50% duty cycle) to both motors. Reverse is achieved by spinning the motors backwards. I'll probably use MG1 alone for reverse.

MG2 gear change will be based on RPM. I have modeled the optimum shift point for maximum performance and will shift MG2 at that point when accelerating. On the way down, it'll shift depending on load.


----------



## mira9_cz (Feb 27, 2013)

Thank you for reply! There is so many possibilities how to drive two motors most efficiently added by MG2 gears. Splitting the braking power depending on load makes sense. I imagine this will feel nice in the car, sensing the braking force being distributed between the motors.



bigmouse said:


> MG2 gear change will be based on RPM. I have modeled the optimum shift point for maximum performance and will shift MG2 at that point when accelerating.


I understand that MG2 will be commanded to supply power when you need big acceleration. And HI/LOW of MG2 will be shifted automatically by your controller based on MG1 RPM. This RPM point might be smart to not make it fixed, to prevent unnecessary big load to shifting mechanism in case you would pressed the throttle pedal right at the shifting point. I know it is made to handle it, but neither the shifting itself is necessary to be experienced, right? 

Sorry for hijacking your thread with my ideas, you made me very excited about those hybrid transmissions and how much possibilities they provide.


----------



## bigmouse (Sep 28, 2008)

mira9_cz said:


> I understand that MG2 will be commanded to supply power when you need big acceleration. And HI/LOW of MG2 will be shifted automatically by your controller based on MG1 RPM. This RPM point might be smart to not make it fixed, to prevent unnecessary big load to shifting mechanism in case you would pressed the throttle pedal right at the shifting point. I know it is made to handle it, but neither the shifting itself is necessary to be experienced, right?


Since the gear shifting will be performed by the same controller that controls the motors, I will be performing the shift in the least jarring and gentlest on the clutches way possible. The flow is this:

Shift is initiated.
MG2 torque command to zero
Clutch opens
MG2 speed after the shift is calculated based on MG1 speed
MG2 speed lowered to the correct speed using speed control loop
Clutch for 2nd gear closes when speed matches
MG2 torque is restored to current throttle setting

This will be felt in the car as a brief "gap" in acceleration, but MG1 can provide some amount of "torque fill" during the shift.

The speed of the shift will depend on how fast the clutches operate and how effectively I can change the speed of MG2.


----------



## tylerwatts (Feb 9, 2012)

That sounds excellent and should provide a rapid change


----------



## mira9_cz (Feb 27, 2013)

bigmouse said:


> Since the gear shifting will be performed by the same controller that controls the motors, I will be performing the shift in the least jarring and gentlest on the clutches way possible. The flow is this:
> 
> Shift is initiated.
> MG2 torque command to zero
> ...


Thank you for explanation. It is far better then I could imagine. It really sounds very nice. Good luck and keep us informed about your progress!


----------



## joekitch (Sep 13, 2013)

using the hybrid transmission from a lexus that has the motor built in? that's legitimately brilliant.....and has a more interesting possibility; parallel hybrid conversions

i'm a complete newbie to this scene but, transmission swaps are not particularly difficult, all things considered. 

i have (or, will have) a bmw 540i touring, and this may be a way to make a relatively simple build parallel non-plug-in hybrid setup._ you can code a 540i to pretend it has a manual transmission _and it'll basically ignore whatever the transmission does in terms of the original transmission control modules....

...if this thing could basically just act as electric assist on acceleration you'd get pretty *substantial* improvements in city mileage 

but does the lexus transmission have its own internal programming for its behavior? would you need some kind of frankenstein transmission control setup where the lexus transmission ECU operates in its own little world oblivious to the rest of the drivetrain? 

i'm just super exited about this because it solves _a lot_ of packaging problems with a parallel hybrid build and its essentially off-the-shelf.


----------



## bigmouse (Sep 28, 2008)

The transmission doesn't have any "programming" in the sense that other automatic transmissions can operate without any ECU input. This one needs to be told what to do by an ECU. That's part of the board that I'm designing for my inverter.

I'd thought about keeping the 3.0L engine that's in my BMW now, as it's a very nice engine. It wouldn't be terribly difficult to mount this transmission to it. But I want a pure EV so I'm not going that route.


----------



## joekitch (Sep 13, 2013)

bigmouse said:


> The transmission doesn't have any "programming" in the sense that other automatic transmissions can operate without any ECU input. This one needs to be told what to do by an ECU. That's part of the board that I'm designing for my inverter.
> 
> I'd thought about keeping the 3.0L engine that's in my BMW now, as it's a very nice engine. It wouldn't be terribly difficult to mount this transmission to it. But I want a pure EV so I'm not going that route.



hmm, so would programming the transmission to act as an "electric assist" like how the old prius did it be feasible? take some strain off the drivetrain during acceleration, it'd seriously increase city mileage


----------



## bigmouse (Sep 28, 2008)

joekitch said:


> hmm, so would programming the transmission to act as an "electric assist" like how the old prius did it be feasible? take some strain off the drivetrain during acceleration, it'd seriously increase city mileage


Sounds like you're describing this transmission's intended purpose. This is a hybrid transmission. That's what it was made to do. The difficulty of getting it to do that with a different engine in a different car with a different battery is the only unknown.


----------



## joekitch (Sep 13, 2013)

bigmouse said:


> Sounds like you're describing this transmission's intended purpose. This is a hybrid transmission. That's what it was made to do. The difficulty of getting it to do that with a different engine in a different car with a different battery is the only unknown.


hmm, could that motor in the transmission also act as the regen braking mechanism during deceleration? or is that better left as a system inside the wheels themselves?


----------



## bigmouse (Sep 28, 2008)

Okay, something more exciting to show. I got the charger out of a Chevy Volt working so I quickly hooked it up to my inverter as a power supply to try it out. I set it to its lowest setting (200v). The inverter is still running on the breadboard and Arduino with no current sensing but it does have motor position sensing. If you saw my video from back on the 2nd of this running on 12v, 200v will look a bit more impressive. Again, the final voltage will be 650v.

The LEDs that light up are connected to the oil pressure sensors in the transmission. The input shaft isn't locked yet so it spins with the motor and turns the internal pump. Once the input shaft is locked, I'll have to use the electric oil pump. Interesting fact, the transmission defaults to the high speed gear unless I drive the solenoids to get it do downshift to the low speed gear. This is so that if a solenoid or pump fails at high speed, the transmission won't downshift and overspeed the motor.


----------



## eldis (Sep 3, 2013)

bigmouse said:


> Okay, something more exciting to show. I got the charger out of a Chevy Volt working so I quickly hooked it up to my inverter as a power supply to try it out. I set it to its lowest setting (200v). The inverter is still running on the breadboard and Arduino with no current sensing but it does have motor position sensing. If you saw my video from back on the 2nd of this running on 12v, 200v will look a bit more impressive. Again, the final voltage will be 650v.


Congratulations. I'm also using the Chevy Volt charger for some HV tests - beware that the charger is not a battery, therefore once you start playing with field weakening and regen in general, your motor EMF voltage will exceed your bus voltage (it will try to push current in your charger). As the charger cannot absorb it, one of two things will happen. Either you burn your charger, or the Vbus will go way up high and might damage your inverter.

Good luck!


----------



## mira9_cz (Feb 27, 2013)

Nice progress, thanks for sharing! You say final voltage will be 650V. I wondered how this work? Motor voltage = battery voltage, so you are going for 650V battery pack? Or there is some step-up from original 288V voltage battery pack to 650V in all cases?

Also I suppose that if you would now hold output shaft by hand, torque would found the way out through gearbox input shaft. Now the torque splits between input and output shaft, so fixing the input shaft is a must. Your output shaft is really rotating at the video only because it has less resistance then the input shaft. Is this correct?


----------



## bigmouse (Sep 28, 2008)

mira9_cz said:


> Nice progress, thanks for sharing! You say final voltage will be 650V. I wondered how this work? Motor voltage = battery voltage, so you are going for 650V battery pack? Or there is some step-up from original 288V voltage battery pack to 650V in all cases?
> 
> Also I suppose that if you would now hold output shaft by hand, torque would found the way out through gearbox input shaft. Now the torque splits between input and output shaft, so fixing the input shaft is a must. Your output shaft is really rotating at the video only because it has less resistance then the input shaft. Is this correct?


Hi there. Yes, I'll be using a ~650v battery pack. I have 3 Chevy Volt batteries. I'll be using two of them in series (minus a couple of the small modules to bring the voltage down a bit). The third pack plus the removed modules may end up in a range extending trailer or as stationary storage (or I might sell them). 

You are partially correct about the gearing. Only MG1's torque is split between the input and output shafts. In the video, only MG2 is running. If I held the output shaft, the input shaft would not turn because MG2 would not turn. If I was driving MG1 only, then it would work as you describe. In my case, the input shaft IS turning due to friction in the geartrain between the output shaft and MG1. I can hold the input shaft still (like it will be in the car) and MG1 will spin a 2.6x the output shaft speed.


----------



## bigmouse (Sep 28, 2008)

eldis said:


> Congratulations. I'm also using the Chevy Volt charger for some HV tests - beware that the charger is not a battery, therefore once you start playing with field weakening and regen in general, your motor EMF voltage will exceed your bus voltage (it will try to push current in your charger). As the charger cannot absorb it, one of two things will happen. Either you burn your charger, or the Vbus will go way up high and might damage your inverter.
> 
> Good luck!


Thanks for pointing that out. You are correct, regen would not be good with a power supply as the only source. The reason I wasn't worried about doing it for this run is because the way I have the code running it's always driving a positive Vq vector. The torque/speed is controlled by changing the magnitude of that vector, so even if I brought the potentiometer all the way to zero quickly, it would just zero out the voltage and never regen. Once I get my control board design done and fabricated, I'll be able to actually use the phase currents for proper FOC. Then I'll switch over to my batteries as a source.


----------



## bigmouse (Sep 28, 2008)

Bit of a thrill, my project showed up on Hackaday today: http://hackaday.com/2015/05/27/hack...utm_campaign=Feed:+hackaday/LgoM+(Hack+a+Day)

Also, finished doing the layout for the new inverter control board. Just have to lay out the silk screen designators and I'll be ready to send it off to Seeed to be made. Hopefully things will start moving more quickly once I have a proper PCB made.

Before:








After:


----------



## IchibahnSLC (May 22, 2015)

bigmouse said:


> Bit of a thrill, my project showed up on Hackaday today: http://hackaday.com/2015/05/27/hack...utm_campaign=Feed:+hackaday/LgoM+(Hack+a+Day)
> 
> Also, finished doing the layout for the new inverter control board. Just have to lay out the silk screen designators and I'll be ready to send it off to Seeed to be made. Hopefully things will start moving more quickly once I have a proper PCB made.
> 
> ...


Nice board! I do PCB design sometimes and this image made me itch for some work lol


----------



## bigmouse (Sep 28, 2008)

IchibahnSLC said:


> Nice board! I do PCB design sometimes and this image made me itch for some work lol


Thanks 

PCB design is probably my least favorite thing to do on any of my projects. So tedious. But once I get started and get in the groove I usually enjoy it. It's like solving a puzzle. This one took me 3 solid days of work.

Here's the final version with silk screen.










I'll print it out to scale at work on Monday and verify that the custom footprints I made are actually the right size, then send it off to be made. This version uses a "Teensy 3.1" as the main controller (for ease of programming so I can make quick changes for development), with two smaller ARM microcontrollers to drive each motor. If it works well and I decide to make more, I'll redo the "Teensy" part to be on-board. I'll also change to solderless programming headers at that time. Then the only SMD solder joints will be the connectors.


----------



## bigmouse (Sep 28, 2008)

Finished populating the new board today. It's sitting on my bench right now with a blinking LED, so that's a good sign! Still got a lot of testing and verification to do, but it's looking good so far. I need to do some programming to really test out the board, so that's where I'm at now.


Pictured below is the new board next to the original Toyota/Lexus board









Here's the new board installed in the inverter. Everything plugs in just like it's supposed to!


----------



## Tomdb (Jan 28, 2013)

damm that is some nice pcb work there. 

Did you hand lay the components on the board?


----------



## bigmouse (Sep 28, 2008)

Tomdb said:


> damm that is some nice pcb work there.
> 
> Did you hand lay the components on the board?


Thanks! Yeah, I did the soldering myself too. Solder paste, tweezers, and a hot-air soldering gun.


----------



## bigmouse (Sep 28, 2008)

First spins on the new control board happened today. Getting the code tuned in. The motors are making some very fun sounds!

The slow ramp-rate of the motor here is due to the current limited of the charger I'm using as a power supply. I've got it set to 1A @200v for safety. I certainly have to be careful with regen here. I managed to get the bus up over 700v a few times while actively spinning it down to a stop. That'll be fine when there are batteries powering it, but not so good with the charger that's only rated to 430v.

Here's a quick teaser video of it spinning on up one of the motors. Have to hook up the electric oil pump to keep things lubricated and close the clutches, then I can spin MG2 up and have it play along (or against) MG1.







After that, it's just a matter of software tweaking and tuning. Will have to generate a look-up table for each motor at various operating points. Handy that the transmission will work as a dyno by driving the motors against each other.

I've ordered a radiator and some hose so I can get cooling set up, then I'm good to go. That should be ready by next weekend. Good thing too, since it's a long one.


----------



## bigmouse (Sep 28, 2008)

Had a friend help me fabricate the piece that I'll use to lock the input shaft of the transmission.










The splines are from the center piece of a clutch for an old Toyota Celica. It's a 21-tooth 28mm diameter spline. A google search of the spline dimensions brought up the clutch alignment tool for a 70's Celica. You could probably go backward from the clutch alignment tool to find other cars with the same spline. Apparently Toyota used the same size splines on several other vehicles including the Rav4. I find it quite amusing that the clutch from an old Toyota fits perfectly on the input shaft of a 2007 Lexus Hybrid.

The clutch hub was welded to a piece of 3" exhaust pipe which was then welded to a circular plate. I'll drill holes in the plate this weekend and bolt it to a sheet of 6mm aluminum which will also bolt to the bellhousing to lock the shaft from spinning.

All up, it cost me about $30 plus dinner for my friend for the welding and some scrap steel he had laying around.


----------



## bigmouse (Sep 28, 2008)

Input shaft: LOCKED!











I'm now able to lock the two motors together and drive them against each other as a dyno. Did this briefly today and it worked nicely.
This is an important ability as it lets me tune the offset angle for different speed and torque settings. The IPM motors used in the transmission aren't like simple PMAC or BLDC motors. The IPM motors have a magnetic torque component and a reluctance torque component. This means that I can't just set the current vector to 90 degrees from the rotor magnetic field for maximum torque. I have to set it somewhere in between. I'm not really sure yet whether the optimum angle changes much with speed or torque, but that's what I can find out using this as a dyno.
The tuning process is this:
1. With one of the motors set to zero torque, set the other motor to a certain speed using a speed control loop (torque-producing current as the output).
2. Set a non-zero current setpoint for the first motor.
3. Sweep the offset angle through the expected range and plot the output of the speed control loop.
4. The angle which requires the highest torque from the speed control loop is the optimum angle for that speed and torque operating point.
5. Repeat that for a handful of strategically selected operating points and plot the relationships.
I'll start with a constant offset value for the unknown motor while tuning the other one. Once I've done that for both motors, I just have to put them in to a look-up table that is used while driving so I always have the optimum offset angle for every pedal position.
I'm really looking forward to getting this tuning done so that I can then write the code that implements "throttle" control of the motor torque. This will be fun because it's where I'll set up the framework for tuning the pedal feel. It will also be when I program the gear change required for MG2. That will be an interesting challenge.


----------



## jddcircuit (Mar 18, 2010)

bigmouse

excellent progress. thanks for posting

I didn't follow your experiment logic completely but I gather that you are looking for the Max Torque per Amp relationship for these motors at different speeds and loads. I look forward to your findings. The ORNL reports seem to only show the locked rotor torque per angle at different currents.

I wish I had my Prius setup at the same point you are at to offer some collaboration on this phase. I also want to characterize my motors and control algorithm. I expect them to be somewhat similar. Maybe soon.

Best regards
Jeff


----------



## eldis (Sep 3, 2013)

bigmouse said:


> I'm now able to lock the two motors together and drive them against each other as a dyno. Did this briefly today and it worked nicely.
> This is an important ability as it lets me tune the offset angle for different speed and torque settings. The IPM motors used in the transmission aren't like simple PMAC or BLDC motors. The IPM motors have a magnetic torque component and a reluctance torque component. This means that I can't just set the current vector to 90 degrees from the rotor magnetic field for maximum torque. I have to set it somewhere in between. I'm not really sure yet whether the optimum angle changes much with speed or torque, but that's what I can find out using this as a dyno.


Good luck. I'm also very interested what you will find out - I'm working on a control scheme (Direct Torque Control) that would eliminate the need for such lookup table for IPM motors. All you need is a properly identified motor (especially Ld and Lq inductances). Once you have your numbers, we can compare them with my approach. The lookup table is probably the best solution in terms of pushing the motor to the max, but maybe it is possible to be "good enough" without the need for creating such table.

Sorry if you have mentioned it already - what is your plan with the controller? I presume you are aiming for a purely commercial product?


----------



## jddcircuit (Mar 18, 2010)

Here is a snippet from a ORNL report for a 2004 Prius drive train evaluation and a link to the document.

They state the Ld and Lq for the motor and the associated Torque equation.

I presume this equation is what someone would use to maximize the torque per amp once the Ld and Lq are known? If this is correct then determining the Ld and Lq is the experimental goal.









http://www.osti.gov/scitech/servlets/purl/890029


----------



## eldis (Sep 3, 2013)

jddcircuit said:


> Here is a snippet from a ORNL report for a 2004 Prius drive train evaluation and a link to the document.
> 
> They state the Ld and Lq for the motor and the associated Torque equation.


Yes! I don't have my notes here with me, but in principle this is it. It's all about redistributing the torque command into Id and Iq, depending on the load (and speed?), by using an equation (or a table). There have been several papers written on this topic.


----------



## jddcircuit (Mar 18, 2010)

eldis said:


> Yes! I don't have my notes here with me, but in principle this is it. It's all about redistributing the torque command into Id and Iq, depending on the load (and speed?), by using an equation (or a table). There have been several papers written on this topic.


Ok
I am not a motor expert but here is my simple approach at the moment in case it applies to the Lexus motors that bigmouse is using.

By studying the locked rotor test that ORNL did (see below), it appears that if I keep Id = -Iq*tan(30) (approximately) then I will be getting max torque for a given current level.








I assume this will hold true all the way up to flux weakening where I would increase the magnitude of Id at that point.

With this simple fixed angle approach my throttle basically commands a target Iq which determines a proportional Id target. My FOC then tries to achieve those current values. I seem to remember that my control loop was unstable with no load. Id =0 worked best on the bench with no load.

Note: The graph is confusing. I assume that the mechanical degrees are 1/4 the electrical degrees since it is an 8 pole motor. With this assumption the Id=0 happens at 112.5 mechanical degrees in the graph. The max torque happens at approximately 120deg so I calculate my Id angle to be (120-112.5)*4 = 30

Regards
Jeff


----------



## bigmouse (Sep 28, 2008)

eldis said:


> Sorry if you have mentioned it already - what is your plan with the controller? I presume you are aiming for a purely commercial product?


I've designed a new control board that drives the original Toyota/Lexus inverter. Once this project is complete, I'll be doing the same for the Prius inverter.

The discussion about FOC is very interesting, but I'm at work at the moment so I can't properly digest it. Will have a closer look tonight!

Another quick note, I got the buck/boost converter programming sorted over the weekend as well. All this progress is addictive and is taking up all my free time (and I'm loving it!).


----------



## bigmouse (Sep 28, 2008)

jddcircuit said:


> I presume this equation is what someone would use to maximize the torque per amp once the Ld and Lq are known? If this is correct then determining the Ld and Lq is the experimental goal.


My goal is to maximize torque per amp, yes. My experiment is designed to do so by varying the offset angle and effectively measuring the torque to find the "sweet spot".

I ran one test with an arbitrary load setpoint and the speed set to 1400rpm. This was running on only 200v so I was probably right up against field weakening at this point. Below is a quick plot of the results.










The blue line is the Iq value driven by the speed control loop of the motor acting at the load. As the torque of the driving motor increases, the Iq of the load must increase as well in order to maintain the speed setpoint. 

The red line is the offset angle of the opposing (driving) motor.

Instead of using Iq and Id decoupled, Id always has a setpoint of zero and Iq is the only current setpoint used. The offset angle is the value (4095 = 360 degrees) which the dq axis is offset from being aligned with the motor angle (a-axis).

For the example plot above, the sweet spot falls at about -50 (only 4 degrees or so). A small number which makes sense for the low speed and low current conditions (<15A).

Note that the driving motor was actually set to negative torque (trying to slow the load down). This is why the offset of the driving motor is negative (representing positive Id) and the Iq current of the load is positive (representing positive torque). This condition simulates regenerative braking.

My experiments will extract the offset angle appropriate for a given Iq and speed. This will go in to a 2D look-up table. So all I have to do to control torque is convert the throttle input to an Iq setpoint, then that pull the associated offset angle from the LUT. This eliminates a whole set of trig operations that would need to be done in the microcontroller.



eldis said:


> The lookup table is probably the best solution in terms of pushing the motor to the max, but maybe it is possible to be "good enough" without the need for creating such table.
> 
> Sorry if you have mentioned it already - what is your plan with the controller? I presume you are aiming for a purely commercial product?


I'm going to maximum performance in this conversion. "good enough" isn't good enough ;-)

I answered your second question in my previous post earlier today.



jddcircuit said:


> By studying the locked rotor test that ORNL did (see below), it appears that if I keep Id = -Iq*tan(30) (approximately) then I will be getting max torque for a given current level.
> (...)
> 
> With this simple fixed angle approach my throttle basically commands a target Iq which determines a proportional Id target. My FOC then tries to achieve those current values. I seem to remember that my control loop was unstable with no load. Id =0 worked best on the bench with no load.
> ...


Your "fixed angle" approach is similar to what I'm doing I think. Using an angle and one vector rather than the sum of two vectors. The difference is that my angle changes. I still have two current control loops in my FOC, but the split between the two vectors is simplified by using the motor angle as a reference. It's only an add or subtract operation in the code.

I haven't run in to any stability problems with my control loops I started with P and I gains based on a model of the motor I made in excel. It worked pretty well and I haven't had to do much tuning on them other than to implement a gain scaling based on bus voltage.

The angles given in the graphs in your ORNL report are 1/4 of the electrical angle, yes. The graph you posted corresponds with 180 degrees electrical. For the Lexus and Camry reports that I'm using, they don't refer at all to mechanical degrees. This makes it a lot easier to work with. My resolver decoder results are scaled and offset so that resolver position = electrical position.


----------



## jddcircuit (Mar 18, 2010)

very cool

So you will be able to map the optimum Id at much lower currents than I can project from the locked rotor test which starts at 50amps. I was not reducing my angle properly at lower currents which is probably why my bench testing wasn't optimal with no load.

I have so much to learn. I think I just realized something that was probably obvious to others.

I am going to attempt your same experiment.

Thanks
Jeff


----------



## jwiger (Oct 18, 2014)

Are you looking for an 80% or 100% solution with this? I think bench testing will get you a great starting point. However, I feel optimum tuning would be had in car, spinning the wheels, and sagging th voltage on your battery pack.


----------



## bigmouse (Sep 28, 2008)

jddcircuit said:


> So you will be able to map the optimum Id at much lower currents than I can project from the locked rotor test which starts at 50amps.


I'll have to do the testing at a range of currents, including rated current. Hopefully I can get away with only a few points for each speed and interpolate (even better if it's a linear relationship, though not likely)



jwiger said:


> Are you looking for an 80% or 100% solution with this? I think bench testing will get you a great starting point. However, I feel optimum tuning would be had in car, spinning the wheels, and sagging th voltage on your battery pack.


This experiment is intended to get the confidence I need that it's all going to work before committing to tearing in to my car and doing the conversion. It should give me enough to make it driveable and give me most of the performance it'll be capable of. I might fine-tune it on a vehicle dyno someday depending on what operating points I can hit with the transmission alone. I'll be limited to the capability of MG1 which is somewhere around half of MG2. So I won't be able to fully characterize MG2 with this method, but hopefully I can extrapolate based on MG1's results. Time will tell.


----------



## jwiger (Oct 18, 2014)

I was wondering if a large, conventional DIY EV motor with adapter plate bolted in place of the original ICE would be better in the long run than a just the transmission's motors alone. Managing three throttles would be a chore though.


----------



## jddcircuit (Mar 18, 2010)

bigmouse said:


> I'll have to do the testing at a range of currents, including rated current. Hopefully I can get away with only a few points for each speed and interpolate (even better if it's a linear relationship, though not likely)
> 
> 
> 
> This experiment is intended to get the confidence I need that it's all going to work before committing to tearing in to my car and doing the conversion. It should give me enough to make it driveable and give me most of the performance it'll be capable of. I might fine-tune it on a vehicle dyno someday depending on what operating points I can hit with the transmission alone. I'll be limited to the capability of MG1 which is somewhere around half of MG2. So I won't be able to fully characterize MG2 with this method, but hopefully I can extrapolate based on MG1's results. Time will tell.



bigmouse,

I was playing around with the conventional Torque equation that was mentioned previously.
simple form: T = K1*Iq + K2*Iq*Id
K1 is related to the PM flux linkage
K2 is < 0 and is related to the Ld-Lq and reluctance torque

I was just guessing values for PM flux and the Ld-Lq to see what effects it has on the id and iq relationship.

I made an spreadsheet that calculated the Max Torque angle for a given current. I seeded the flux coefficients so the curve of the angle sort of matched the locked rotor test in the ORNL document. Basically a 30 degree offset at 50amps and a 40 degree offset at 200amps.

The interesting thing that this produced is that there does seem to be a linear relationship between Id and Iq above a certain current value. If this is true then it might only require a few angle seed points to get the model to fit.







It might not matter too much if the torque is not optimal at low current levels.

Before you get the confidence to put it in the car perhaps you will want to attempt the through motor boost charging that we discussed a while back. I think this charging scheme will work very well with your 600V+ battery. It might also be a cool feature for you to offer with your future kits since it is primarily just software.

Regards
Jeff


----------



## bigmouse (Sep 28, 2008)

jddcircuit said:


> bigmouse,The interesting thing that this produced is that there does seem to be a linear relationship between Id and Iq above a certain current value. If this is true then it might only require a few angle seed points to get the model to fit.
> 
> (...)
> 
> Before you get the confidence to put it in the car perhaps you will want to attempt the through motor boost charging that we discussed a while back. I think this charging scheme will work very well with your 600V+ battery. It might also be a cool feature for you to offer with your future kits since it is primarily just software.


That linear relationship would be very handy. Will be interesting to see if your calculations line up with my measurements. A straight line equation is much easier to work with in code than a LUT. No division!

I've already got my charging strategy figured out. If I remember right, your charger idea needed some sort of contactors on the phase outputs to work in my application?


----------



## jddcircuit (Mar 18, 2010)

bigmouse said:


> That linear relationship would be very handy. Will be interesting to see if your calculations line up with my measurements. A straight line equation is much easier to work with in code than a LUT. No division!
> 
> I've already got my charging strategy figured out. If I remember right, your charger idea needed some sort of contactors on the phase outputs to work in my application?


Yes there are AC relays (inexpensive) to connect line voltage to one phase terminal of each motor. There is also some filtering and fault detection circuitry that I am working on that goes in between. This added hardware is of course in lieu of a separate charger. If you are happy with your charging solution then stick with that. If it doesn't give you the efficiency or power levels you want then you may want to review this integrated method as an upgrade possibility down the road.

My integrated method is not fully developed. Once I have the complete integrated package fully functional on my conversion, I will be able to better present the kit and how to for those of us that are using similar drive trains.

Regards
Jeff


----------



## bigmouse (Sep 28, 2008)

Looks like I"m not the first person to come up with the "current angle" method of motor control. This paper describes it being used to find the maximum torque per amp. Described under "7.5 TORQUE PRODUCTION TEST"

https://www.vutbr.cz/www_base/zav_prace_soubor_verejne.php?file_id=32556


----------



## jddcircuit (Mar 18, 2010)

I am planning to duplicate your experiment so I will explain your setup so you can let me know if I am understanding correctly.

Given a load motor and a test motor. 
Set the load motor to constant velocity control and Id=0.
Set the test motor to constant current control.
Sweep the stator flux angle of the test motor keeping a constant current magnitude I = sqrt(Iq^2 + Id^2)
Plot the I = Iq (since Id = 0) of the load motor vs the stator angle of the test motor.
The maximum load motor current gives the angle that the test motor is producing the most torque.

My question is why not set the velocity of the load motor to zero?

Thanks
Jeff


----------



## bigmouse (Sep 28, 2008)

jddcircuit said:


> I am planning to duplicate your experiment so I will explain your setup so you can let me know if I am understanding correctly.
> 
> Given a load motor and a test motor.
> Set the load motor to constant velocity control and Id=0.
> ...


You've got it. Zero is one of many possible test speeds. I'm operating under the expectation that the optimum angle will vary with speed. If it varies only with torque, then I can get away with a 2-row LUT. If it does vary with speed, then I'll need a more square-ish table.


----------



## bigmouse (Sep 28, 2008)

Nothing new to show about the inverter/transmission at the moment. Still working on tuning the control loops and figuring out how to properly generate torque with an IPM. These are tricky beasts, but I'm getting there. I think once I figure out how to handle field weakening (when it should start and how to implement it effectively), I'll be ready to move to the next step.
I spent a little bit of time today weighing the major components that I have. I bought a load-cell based crane scale for this task.
Here's one of my battery modules being weighed, with its future home watching the process.










The 7kWh module weighs 65.4kg. That's 9.3kg/kWh. So and entire Volt pack worth of cells weighs ~150kg (330lbs) without the enclosure or front BMS/contactor section. So my 29kWh pack should weigh 270kg (595lbs). Better than I was expecting! 
This, of course, doesn't include the weight of the battery enclosure/supports I'll have to build.
The Lexus transmission weighs 132kg (290lbs). It's a heavy chunk of metal.
I'll be weighing the major components that come out of the car as I remove them (engine, transmission, exhaust). This, combined with the corner weights I got for the car a few weeks back, will allow me to calculate the battery placements/distribution to ensure that I maintain the same front/rear balance. The Volt packs are somewhat reconfigurable, so I'll be able to fine-tune the weight by moving sub-modules around. The only constraint there is that I'm using the original BMS so need to ensure that that can move with the modules. I don't want to be running high voltage wires through the car other than the two big ones that go to the inverter.


----------



## jddcircuit (Mar 18, 2010)

bigmouse,
You mentioned that you were tuning your motor control loop.
I am doing the same. I recently made a new control board using a different Resolver to Digital converter and some new driver ICs. I have my motor and battery out of the car and back on the test bench.

This time I am taking a much closer look at the behavior of the phase currents and voltages and noticed some interesting things that may or may not be obvious.

I am using a basic FOC modulation scheme. With slow PI gain my phase voltages are very sinusoidal but then my phase current is not so much. This is most obvious at low currents and low speeds. I gather this is because the BEMF of these motors is not exactly sinusoidal.

At higher PI gains in my Idq to Vdq regulation I can get the phase current to look more sinusoidal and I can see where the phase voltage is deviating from sinusoid to keep the Idq sinusoidal.

At low speeds there is some growling I can hear that I suspect is from the non sinusoidal torque ripple.

I was just curious if this is something that you also observed and if it was something that doesn't matter since the motors will primarily be running at high speeds and currents so the sinusoidal distortion gets washed out.

Regards
Jeff


----------



## bigmouse (Sep 28, 2008)

jddcircuit said:


> bigmouse,
> At higher PI gains in my Idq to Vdq regulation I can get the phase current to look more sinusoidal and I can see where the phase voltage is deviating from sinusoid to keep the Idq sinusoidal.


In short, if your current waveform isn't the same shape as your reference (sinusoidal for FOC/SVM), then your control loops are not tuned properly.

Whether the sinusoidal reference is appropriate or not is another question. You should be able to tell from the shape of the BEMF waveform. SVM is going to be sinusoidal anyway though, not much you can do about that (easily).

I've heard growling at high speeds before, but I think that's due to me not using the correct method of field weakening. The growl comes from the PI loops attempting to make a sinusoid out of a triangle wave. The error input to the controllers takes on the same of a sine minus a triangle because there's not enough voltage to counter the field anymore and the current waveform turns triangular. A pull-back of the integral gain would probably help with that. My integral gain is a very small fraction of my proportional gain with the control loop frequency I'm using. My Ki is on the order of 1/100th of Kp and it seems to be working nicely for me. The trickyness is that Ki needs to go down as control loop frequency goes up. My control loop runs at around 19Khz. Kp is not time dependent, so it doesn't care how often the loop runs.

Overall, my Kp is between 1 and 5 and my Ki is less than 0.01.

Remember, you have different inductances on the I and Q axes, so you'll need different gains for each axis and each MG. That's 8 gains to tune! Not to mention the voltage dependency of the gains. It's tricky business.


----------



## jddcircuit (Mar 18, 2010)

bigmouse said:


> In short, if your current waveform isn't the same shape as your reference (sinusoidal for FOC/SVM), then your control loops are not tuned properly.
> 
> Whether the sinusoidal reference is appropriate or not is another question. You should be able to tell from the shape of the BEMF waveform. SVM is going to be sinusoidal anyway though, not much you can do about that (easily).
> 
> ...


ok

I think I will increase my loop frequency. I am at 16kHz right now. I think I can go to 20kHz.

I am not using different gains for Q and D axis. I will try that out.

I now have both motors spinning together with the planetary gear welded. Both motors are spinning at the same speed. I can load one of the motors with other. My MG2 current waveform is quite a bit different from MG1. I have not been able to make MG2 current very sinusoidal so far.

I will post some oscilloscope pictures.

With 200V bus voltage I can get the rotors up to about 1500rpm. At this speed my MG2 modulation is tapped out (plus some over modulation) but the MG1 duty cycle is only about half way. I am hoping that MG1 will be able to provide additional torque when MG2 is at it's speed limit on the highway.

I will save the SVM for later. I believe SVM will give me a little extra voltage headroom for additional speed.

What modulation are you using?

Thanks


----------



## bigmouse (Sep 28, 2008)

I made my control loop run at 2x my switching frequency, and synchronized to it. Before they were synced, I was running my switching at a bit over 8kHz and my FOC at 10Khz. I ended up with a low beat frequency as the FOC and the switching passed in and out of sync with eachother. It's possible that your growling could be coming from something like this?

I found this paper very helpful in determining the Id and Iq inductances: https://www.google.com/url?sa=t&rct...=bcNmgSB2CiPhA4mHKoRaAg&bvm=bv.99804247,d.cGU

In case the link ever stops working, a search for Freescale AN4680 should bring it up.

I measured my inductances and put the values in to a simulation I built in a spreadsheet. This allowed me to tune the loops based on voltage, switching speed, FOC loop frequency, BEMF, and scaled for the ADC and PWM compare register sizes. This let me predict the rise times, phase offsets, and errors ahead of time and set my gains in the right ballpark right away. It took a few iterations to get the simulation right, but the values I get out of it now seem to work nicely. I can even simulate the current waveform as I approach field weakening speeds, though I haven't included magnetics in it so I can't simulate field weakening itself (yet). I think I'll need something more powerful than Excel for that ;-)

I'm using FOC and SVM libraries on my Freescale ARM Cortex M0+ devices. They provide a few libraries related to motor control that helped lay down the framework. The sped things up because I didn't need to write my PI controllers, Clark/Park transforms functions, or SVM from scratch. I still need to specify the parameters though, and that's plenty tricky on its own.


----------



## joekitch (Sep 13, 2013)

this is one hell of an interesting project, with some pretty important implications.

once you make these modifications to the inverter, including whatever custom boards you need, will you be offering up the designs and possibly selling pre-assembled mod kits?

these lexus transmission, volt batteries, and that inverter are pretty damn inexpensive from junkyards, this particular combo could become the "LS swap" of Ev conversions. Plentiful parts, relatively easy, and well documented.


----------



## bigmouse (Sep 28, 2008)

Yes, the plan is to provide "refurbished" inverters which are ready to plug in to the transmission and go. There are also two other modules which I am designing to compliment the inverter. One is a "gateway" ECU which will be the primary connection to the rest of the car. This will include the throttle pedal, gauge drivers (CAN in my case), gear selector, ignition/start inputs from the key, etc. I've also figured out the Volt battery internal CAN bus and am designing a BMS ECU that will communicate with the stock Volt BMS boards on the modules. It will have two CAN busses for the packs to support two strings of batteries. It will also handle charger control (up to two Volt or Elcon chargers), charge port J1772 interface, precharge and contactor control, and state of charge monitoring.

So the complete kit would be the inverter with my control board in it, the gateway ECU to connect to the car, and the BMS ECU to talk to the batteries and chargers.


----------



## tylerwatts (Feb 9, 2012)

Wow bigmouse that sounds like the perfect conversion kit. Would it run any lexus or Toyota hybrid drivetrain?


----------



## joekitch (Sep 13, 2013)

sounds like a plan sta-bigmouse..
I would strongly encourage a minimum of stuff necessary on your end, because people would save a lot of money by sourcing parts themselves then adding your bits onto them.

I can understand needing to rebuild the inverter yourself though


----------



## jddcircuit (Mar 18, 2010)

bigmouse
I made a video which includes some oscilloscope captures showing my progress so far with trying to make my motor currents sinusoidal. Let me know if you have any feedback or comments.






I love your projects. I am not in the business of making kits but if there is anything I can share to help that's great.

Thanks
Jeff


----------



## bigmouse (Sep 28, 2008)

tylerwatts said:


> Wow bigmouse that sounds like the perfect conversion kit. Would it run any lexus or Toyota hybrid drivetrain?


It'll depend on the specific drivetrain. Some of them can't work with the motor input shaft locked because of the gear ratio to MG1. It overspeeds at modest road speed. The Lexus transmission is lucky that it doesn't have that same limitation. It can go up to about 90-100mph before reaching its rated speed. I think the Camry might be similar, possibly the later Prius as well. Of course, each of those will have a step-down in performance.

In short, yes, I'm planning to offer a range of drivetrain options. I just want to get this one sorted out and working properly first. Once I do, porting to others should be fairly easy.


----------



## bigmouse (Sep 28, 2008)

joekitch said:


> sounds like a plan sta-bigmouse..
> I would strongly encourage a minimum of stuff necessary on your end, because people would save a lot of money by sourcing parts themselves then adding your bits onto them.
> 
> I can understand needing to rebuild the inverter yourself though


My parts will be plug and play with eachother, and to an extent with what people can find themselves. In particular, the Chevy Volt batteries. Remove the modules, keep the internal harness, and a few wire from that connected to my BMS ECU will be all that's needed for the Volt battery to work. No rewiring of the an aftermarket BMS to the cells. I've figured out the internal CAN so there's no need to spend the $1000+ on a new BMS for these packs.

Otherwise, people will be providing their own transmissions, batteries, and chargers. I'll provide the ECUs, inverter, and connector pinouts. Even though I don't need gauge drivers on my car since the E46 does it al over CAN (except the fuel gauge), I'm building a Tachometer driver and two digital pots in to it for driving any instrument cluster.

There's still plenty of DIY to be done


----------



## bigmouse (Sep 28, 2008)

jddcircuit said:


> bigmouse
> I made a video which includes some oscilloscope captures showing my progress so far with trying to make my motor currents sinusoidal. Let me know if you have any feedback or comments.


You're making good progress as well!

If your control loop is fast enough and well tuned, you should be able to make a sinusoidal current waveform regardless of the BEMF waveform shape (within reason). It looks like you have something happening at the zero crossings that is less than ideal. It sort of flattens out for a bit at each zero crossing. Your BEMF looked the same. It would be interesting to see a real-time representation of the control loop error. You should see it spike anywhere that the current waveform diverges from the sinusoidal reference. This can also be used to tune your control loops. Rather than trying to get the waveform to look sinusoidal, you can do it with a bit more fidelity by attempting to minimize the error.

BEMF should be measured with no load on the motor. As you were measuring it, it was still connected to the inverter. This means it was still rectified through the inverter. I'm not sure what "off" means in your setup. Is this 0v/50% duty cycle? All high side switches on? All low side on? The power stage is still powered for the other motor so the switches will be driven according to their inputs from your controller. Regardless, there is a load on the motor during that test. I would disconnect all three phase connections from the inverter and measure across two of them.


----------



## jddcircuit (Mar 18, 2010)

bigmouse said:


> You're making good progress as well!
> 
> If your control loop is fast enough and well tuned, you should be able to make a sinusoidal current waveform regardless of the BEMF waveform shape (within reason). It looks like you have something happening at the zero crossings that is less than ideal. It sort of flattens out for a bit at each zero crossing. Your BEMF looked the same. It would be interesting to see a real-time representation of the control loop error. You should see it spike anywhere that the current waveform diverges from the sinusoidal reference. This can also be used to tune your control loops. Rather than trying to get the waveform to look sinusoidal, you can do it with a bit more fidelity by attempting to minimize the error.
> 
> BEMF should be measured with no load on the motor. As you were measuring it, it was still connected to the inverter. This means it was still rectified through the inverter. I'm not sure what "off" means in your setup. Is this 0v/50% duty cycle? All high side switches on? All low side on? The power stage is still powered for the other motor so the switches will be driven according to their inputs from your controller. Regardless, there is a load on the motor during that test. I would disconnect all three phase connections from the inverter and measure across two of them.


Thanks for the feedback.

I am still working on the tuning and confirming that I have my axis oriented correctly.

I showed the phase currents in the video but I am using the IdIq signals during tuning for better fidelity as you say. My d axis is giving me the most instability or error. I won't be surprised if I have a software bug or something.

The BEMF measurement is made across two terminals with the motor disconnected essentially. When I said I was turning it off, I was asserting the ShutDown pin that opens all the IGBTs for that inverter. As long as the BEMF peak voltage does not exceed the DC bus voltage there is not rectification and the BEMF waveform is unaffected (I think).

One of my concerns with my control loop (20kHz now) is that I have to do my angle and current query during one cycle and then apply the compensation the next loop due to conversion time and processing time. I am updating angle and currents each cycle but compensation PWM register updates is always one loop behind the ADC sample event. This lag could be a problem perhaps?

Regards
Jeff


----------



## jddcircuit (Mar 18, 2010)

sorry to hijack your thread
i think i am making some progress with the tuning
the currents are becoming progressively more sinusoidal


----------



## bigmouse (Sep 28, 2008)

jddcircuit said:


> One of my concerns with my control loop (20kHz now) is that I have to do my angle and current query during one cycle and then apply the compensation the next loop due to conversion time and processing time. I am updating angle and currents each cycle but compensation PWM register updates is always one loop behind the ADC sample event. This lag could be a problem perhaps?


What is your PWM frequency? If you're updating your FOC at 20kHz but only updating your PWM compare registers at 10kHz, you're only affecting the output for every other run of your FOC loop. This can mess with your integrators. It might not be precisely accurate, but I think you can think of it as effectively doubling the integrator gain from what you think it is.

If you're updating the PWM at the top and bottom of the counter, then this doesn't apply. This is why my FOC algorithm runs at exactly double my switching frequency.


----------



## jddcircuit (Mar 18, 2010)

bigmouse said:


> What is your PWM frequency? If you're updating your FOC at 20kHz but only updating your PWM compare registers at 10kHz, you're only affecting the output for every other run of your FOC loop. This can mess with your integrators. It might not be precisely accurate, but I think you can think of it as effectively doubling the integrator gain from what you think it is.
> 
> If you're updating the PWM at the top and bottom of the counter, then this doesn't apply. This is why my FOC algorithm runs at exactly double my switching frequency.


My PWM was 8kHz center aligned. I have my PWM interrupt happening at the center and end of pulse so 16kHz interrupt handler. Each PWM interrupt I measure currents, calculate error and compensation and update the duty cycle registers for the next interrupt.

I then switched to 10kHz PWM and 20kHz interrupt. I ran out of time to wait for the ADC and then do the loop control so now my loop control is using the measured current values from the previous sample but I am still doing a sample and update each 20kHz interrupt.

You are making me think by asking. I need to double check that my duty cycle updates are happening the way I think they are. I may be updating the buffer registers at 20kHz but PWM controller may only updating at 10kHz and be ignoring one of my buffer writes. If this is the case then I have could have some unsymmetrical things happening.

I will investigate further. 

Thanks
Jeff


----------



## jddcircuit (Mar 18, 2010)

bigmouse said:


> What is your PWM frequency? If you're updating your FOC at 20kHz but only updating your PWM compare registers at 10kHz, you're only affecting the output for every other run of your FOC loop. This can mess with your integrators. It might not be precisely accurate, but I think you can think of it as effectively doubling the integrator gain from what you think it is.
> 
> If you're updating the PWM at the top and bottom of the counter, then this doesn't apply. This is why my FOC algorithm runs at exactly double my switching frequency.


It looks like my duty cycle is only getting updated at 10kHz even though I was trying to update it at 20kHz. I seem to agree that this may only be doubling the integration gains. I don't think I can get it to update at top and bottom of the counter with this CPU.


----------



## jackbauer (Jan 12, 2008)

Very nice work! I'm also working with the GS450h gearbox. How is the hybrid pump plumbed to the casing? Mine came without the pump and I'm trying to work out how to blank off the oil passages. Thanks


----------



## bigmouse (Sep 28, 2008)

jddcircuit said:


> It looks like my duty cycle is only getting updated at 10kHz even though I was trying to update it at 20kHz. I seem to agree that this may only be doubling the integration gains. I don't think I can get it to update at top and bottom of the counter with this CPU.


Most PWM peripherals have two modes. There's a normal unlocked PWM update that will update regardless of the counter position. The risk here is that you'll update the compare register to a value lower than the current counter value (if counting up) and it'll overflow. Many also have either a buffer that updates to the compare registers synchronously triggered by hardware or an ability to lock the compare registers while they're updated, then unlock them to apply the changes. You should be able to make it work, but it might require some trickery.



jackbauer said:


> Very nice work! I'm also working with the GS450h gearbox. How is the hybrid pump plumbed to the casing? Mine came without the pump and I'm trying to work out how to blank off the oil passages. Thanks


I haven't explored the pump plumbing much. I just use the one that's on mine. It's easier than trying to adapt another pump to it. Shame they're so expensive to buy if they didn't come with the transmission. The pumps I've seen for sale cost more than I paid for the transmission itself.


----------



## bigmouse (Sep 28, 2008)

A quick update. Sorry, no new pictures or video. I finished the schematic for the BMS ECU over the weekend. I need to prototype and test a few circuits, decide on what sort of enclosure I want to put it in, and lay out the PCB. Hopefully I'll finisht he PCB layout by the end of this coming long weekend. This will allow me to safely use my batteries for testing.

Next in line, all these same things for the "gateway" ECU. Stay tuned!


----------



## milen (Sep 4, 2015)

I have to thank you for the efforts you have put in writing this website. I am hoping to see the same high-grade content from you in the future as well. It is really helpful for me, because i am a professional writer in uk dissertation writing service


----------



## bigmouse (Sep 28, 2008)

Spent some time over the past week or so developing the BMS ECU. This is the second of three PCBs I'm making for this project. Basically, it handles everything having to do with the battery.
The feature list is:


6 CAN busses
Powertrain CAN (to talk to the inverter and other nodes which will utilize high voltage)
Pack 1 CAN (for talking to one of the two strings of batteries
Pack 2 CAN (for talking to the other one)
Charger 1 CAN (for controlling one charger)
Charger 2 CAN (for controller the other one)
Range Extender CAN (Just in case)

Battery current sensing (for state of charge calculation)
Contactor control
Welded contactor detection
Automatic Precharge

J1772 (EVSE) Interface for use of public charging stations
Charge port RGB LED driver
HV safety interlock loop
HV isolation monitoring
Individual CAN busses are required for each battery and each charger because each identical item is an identical node and cannot share a bus. Additionally, the chargers and batteries have different speed CAN busses. It makes for a complex product, but it will do the job. Everything will come together and be controlled over the vehicle CAN bus.

The third board I need to design will be the "gateway" ECU. This will be the bridge between the powertrain CAN bus and the rest of the car (gauges, throttle pedal, key switch, etc). The gateway source code will be open source to allow the system to work with other projects in other platforms. It can be a simple Arduino with a CAN shield and a proto shield, or the ECU I will design.
All three ECUs will be based on the Teensy 3.1. I'm really loving this little device!


----------



## Tomdb (Jan 28, 2013)

Looks very nice the teensy is a powerful little unit. 

Which canbus controllers are you using? 
Also mind telling us what the 4 pin smd package by the top left connector are?


----------



## bigmouse (Sep 28, 2008)

Tomdb said:


> Looks very nice the teensy is a powerful little unit.
> 
> Which canbus controllers are you using?
> Also mind telling us what the 4 pin smd package by the top left connector are?


Using the MCP2515 and its complementary transceiver.

The 4-pin parts are common-mode chokes. I use them on all differential signals and sensor power leaving or coming in.


----------



## Tomdb (Jan 28, 2013)

so dual sided loading of smd parts? I can see some faint shadows so that must be it.


----------



## bigmouse (Sep 28, 2008)

Tomdb said:


> so dual sided loading of smd parts? I can see some faint shadows so that must be it.


Yeah, it has SMD on both sides. Pretty common.


----------



## Tomdb (Jan 28, 2013)

yes, alittle harder for DIY though. 

Bett this is a costly project.


----------



## bigmouse (Sep 28, 2008)

I think I have an addiction __


Picked up yet another battery.











In the photo I have three Chevy Volt battery packs and a disassembled Nissan Leaf pack. Going to have a go at reverse engineering the Nissan Leaf BMS like I did with the Chevy Volt one.


Once I'm done with that, I'll probably list the cells for sale. Either that or put them in a trailer and use them as a range extender.


----------



## z_power (Dec 17, 2011)

Does your method of reverse engineering involve sniffing data from working system i.e. car or did you manage to do it another way? I'm dreaming of using factory BMS from VW e-Up, maybe it'd be possible with your methods.


----------



## bigmouse (Sep 28, 2008)

z_power said:


> Does your method of reverse engineering involve sniffing data from working system i.e. car or did you manage to do it another way? I'm dreaming of using factory BMS from VW e-Up, maybe it'd be possible with your methods.


I was able to do the Volt BMS without a car, but the Leaf will be different. I'll do my best without a car, but it might be tricky. I might be able to get access to a car though.

Thankfully, I have access to some pretty awesome CAN tools through work. Makes it much easier than it otherwise would be.


----------



## z_power (Dec 17, 2011)

Good luck, I'll keep my fingers crossed!


----------



## jddcircuit (Mar 18, 2010)

bigmouse said:


> I think I have an addiction __
> 
> 
> Picked up yet another battery.
> ...


that is awesome
thanks for sharing


----------



## bigmouse (Sep 28, 2008)

Got my boards from Seeed Studio. They apparently had an issue with my drill file and replaced the slots with pads. That's the OPPOSITE of what I wanted for HV creepage distance. A dremel makes it so that I can at least use the board as a prototype. Assembly has begun. The power supply works and the Teensy LED blinks. Now to populate the other 90% of the components!​


----------



## bigmouse (Sep 28, 2008)

The BMS ECU is populated and coding has begun! So far, so good. It even fits in the enclosure I bought for it! If only I still had my CNC Mill (I left it in Australia), I could cut out the holes in the end covers for the connectors to pass through.


Coding this is going to be "fun". I've built most of the framework for it already. I'm using a series of "metro" timers and a state machine. The state machine will call the correct functions at set intervals depending on the state it's in (charging, driving, standby, etc). I've set up the CAN messages to be staggered to help even out CPU load. For example, I have two CAN busses that I need to send a message to at 200ms intervals. I've set the timer to call these functions every 100ms, but it alternates between each of the two busses with each call. Sending the messages is easy, it's the responses that take time. Have to receive and parse up to 96 cells voltages per bus, plus the temperatures. Should be no sweat on these time scales for the Teensy that's doing the work, but I still like to have things staggered.


Here are a few photos:


----------



## bigmouse (Sep 28, 2008)

The engine is out! Along with the fuel tank, exhaust, and all the emissions equipment. Now the REAL work begins.


----------



## Tomdb (Jan 28, 2013)

so much space for activities

How are you planning on dividing the volt packs in the car?

The pcb turned out very nice. Looking forward to some of your mechanical work.


----------



## bigmouse (Sep 28, 2008)

Tomdb said:


> so much space for activities
> 
> How are you planning on dividing the volt packs in the car?
> 
> The pcb turned out very nice. Looking forward to some of your mechanical work.


The battery will be essentially two complete packs in series. I'll be removing 2kWh from the overall pack to keep the voltage within the rating of the inverter. About 12kWh will go under the hood. The other 18kWh will go where the back seat used to be.

The mechanical work is going to be collaborative. I'm getting help from a friend who is very handy with metal. I'll probably do much of the design, he'll do the fabrication. It should be a good partnership!


----------



## Moltenmetal (Mar 20, 2014)

Lucky to have handy friends! Man, there were a lot of tasks on my build that I would have happily dumped on a friend! 

That's a nice big hole to work with- I see good things happening in there!


----------



## bigmouse (Sep 28, 2008)

Gotta make the one on the left fit in the space left by the one on the right. This might be more difficult that I originally thought. The Lexus transmission is a fair bit bulkier (bigger diameter) than the BMW one.


----------



## Tomdb (Jan 28, 2013)

Nothing a good hammer/plasmacutte/sawzall cant fix. 

Else just scoot it forward in the tunnel a little. You have to adapt the shaft/gearbox flange anyway.


----------



## bigmouse (Sep 28, 2008)

I needn't have worried! It fits fine, with about 10mm to spare at the tightest spot. Much more everywhere else. Got the transmission roughed in and weighed the car again to help settle on the battery distribution.










Below is the driveshaft adapter. This will allow me to bolt the output of the Lexus transmission to my BMW driveshaft. Milled out the shape from 3/4" 6061 Aluminum. Got most of the way through with my cheapie CNC router before I broke both of my two bits. I finished it by hand. Came out nicely, looking forward to installing it!


----------



## mira9_cz (Feb 27, 2013)

Nice job, I'm happy to see the gearbox fill fit into the car. Drive shaft adapter is good job, much more elegant then welding lexus and bmw drive shafts together as I would done it


----------



## TimPG (Jun 26, 2015)

I am converting a BMW Z3. I love this idea. I assume my drive shaft would have the same connector. Where could I get an adaptor like this one you had made? What do you plan to use to hold the new transmission in place? Where is a good place to look for a hybrid transmission like this?


----------



## bigmouse (Sep 28, 2008)

The transmission is mounted in the car, fully supported on rubber mounts! I don't have any pictures of it completely mounted, but here's a few snaps of today's progress.

I bought some engine mounts from a Mitsubishi Outlander to support the front of my transmission. They're mounted on either side of the transmission and bolt directly to a plate that bolts to the bellhousing and holds the shaft locking piece.

These pictures were taken before it was all welded together. The welds came out beautifully thanks to my metalworking guru friend. I'll take photos of the finished welded parts and the transmission plate all mounted in next time I work on it (probably Thanksgiving weekend).

















The driveshaft adapter has been installed and fits very nicely. Everything slides on nice and smooth. A few notes about the transmission output flange though:



The protruding shaft is 16mm dia. The protruding shaft on the BMW transmission was 14mm diameter. The hole it goes in to is rubber and I was able to get it to fit with some lube and by pulling it together with the bolts. No modification was needed.
The output flange has holes recessed in to it. This prevents me from fully tightening the bolts to these flanges as the inner bushing pushes out in to the hole when I try to tighten the bolt. I'll have to either put a washer between the output flange and the adapter plate, adding the thickness of the washer to the length of the transmission, or find washers that will fit in to the recessed hole and drill the middle of them out to 12mm. I'm leaning towards the latter.










For anyone who wants it, the I've attached the DXF file for the transmission adapter. This adapts the 96mm bolt-circle flange of the BMW driveshaft to the 105mm bolt-circle flange of the Lexus transmission. It's designed to use these bushings (http://www.revshift.com/product-p/pfx-frk.htm) and be milled out of 3/4" aluminum.


----------



## csuich (May 20, 2014)

@bigmouse
Very impressive work so far.
I converted a MINI Cooper to all electric, but mostly using off the shelf components. Very easy compared to your undertaking.

On your drive shaft adapter, do you not have to worry about a change in angle between the drive shaft and the tranny output shaft? 

Chris


----------



## bigmouse (Sep 28, 2008)

csuich said:


> On your drive shaft adapter, do you not have to worry about a change in angle between the drive shaft and the tranny output shaft?


The adapter is based on a commercially available solid "flex" disk for BMWs. I even used the bushings from one of these. Vibration is a concern, yes. I've taken great care to ensure that the shaft and transmission are aligned. With this plate installed, the forward portion of the driveshaft is basically an extension of the transmission output. There is a universal joint at the center support bearing and a CV joint at the differential input. The only forces applied to the transmission are torsional, so hopefully when it does move it'll be slight rotation about the axis of the output shaft. I've set up the front mounts to be slightly rotated so that these rotational forces are applied at the correct orientation in the mounts. We'll see how well this works once I get the wheels spinning. If this method doesn't work, there isn't really any other easy option. No flex disk is made in the right size, or I'd have bought one. The fix would be to somehow replace the flex disk with another CV or universal joint and a custom drive shaft (likely one piece).


----------



## 67BGTEV (Nov 1, 2013)

This is an awesome conversion and you would enjoy driving the 330ciE after the conversion. 
I need a favor from you. I've a Remy HVH250 and would like to bring it to your garage to hook it up and test if the Lexus controller works with HVH250.


----------



## 67BGTEV (Nov 1, 2013)

I'm assuming you are keeping the TMS from the Volt, which is what makes the Volt pack hold up its capacity after nearly 300K miles with 100K EV miles.

I think its wise to use 60% of the the total pack energy, which is what Chevy does its Volt. Out of 16 kWh, it doesn't use top 20% and bottom 20%. I'm sure you know all these, but just wanted to call it out.


----------



## bigmouse (Sep 28, 2008)

67BGTEV said:


> I'm assuming you are keeping the TMS from the Volt, which is what makes the Volt pack hold up its capacity after nearly 300K miles with 100K EV miles.
> 
> I think its wise to use 60% of the the total pack energy, which is what Chevy does its Volt. Out of 16 kWh, it doesn't use top 20% and bottom 20%. I'm sure you know all these, but just wanted to call it out.


I will probably use up to 80% of the pack capacity on long trips. On a daily basis, I'm unlikely to ever use more than about 10-15% of the pack for my commute.



67BGTEV said:


> This is an awesome conversion and you would enjoy driving the 330ciE after the conversion.
> I need a favor from you. I've a Remy HVH250 and would like to bring it to your garage to hook it up and test if the Lexus controller works with HVH250.


I'm confident that the Lexus controller would be a great match to the HVH250. I've always thought it would be, particularly the high-voltage variant of it. There's not much use in bringing it to my garage though. Spinning the motor is the easy part (any inverter will be able to spin it), and I don't have anything to load it with.


----------



## bigmouse (Sep 28, 2008)

Below are a few photos of the transmission mounted. The beautiful welding is not my work, sadly.
















The welded areas have since been painted as well. It looks stock!
The rear subframe has been removed so that reinforcement plates can be installed. This addresses a weak point in the E46 body. If my setup makes anywhere near the torque I'm expecting from it, the reinforcements will be necessary!
I have also taken the plunge and made the most irreversible modification to the car yet. I'm well and truly committed to this now!








The holes I've cut out allow room for part of the rear battery pack. Each of these holes will get a 4kWh block of cells. Then a 8-10kWh pack will lay across the top of them, spanning the width of the car. The rest of the pack will live up front under the hood.
We got the shift linkage connected as well. The stock Lexus linkage arm was modified. The BMW arm was cut to the correct length and mounted roughly 90 degrees  from the stock arm. Then the stock arm was cut off. A convenient flat spot on the transmission was used to mount the cable assembly. I can now shift the transmission in to park from the original gear selector inside the car. P engages the parking pawl. Every other position simply engages a switch so that the ECU can detect which gear is selected. There is no mechanical influence inside the transmission in any position aside from park. I got lucky since both the Lexus and the BMW had roughly twice the travel between P and R than they do between R, N, and D. A little bit of adjustment once it was installed was all that was required to make it work.
The arm is shown only tack welded here. It was properly welded once we were sure everything lined up the way it needed to.









I also put my CNC router to work again to cut out the mounting plate for the charge port. It fits so nicely it's almost a shame nobody will ever see it once it's installed.
















More updates coming in the next few days!


----------



## jackbauer (Jan 12, 2008)

Watching with great interest


----------



## jwiger (Oct 18, 2014)

Great progress! I hope you are planning battery pack space a little larger than the pack you have. It will give you more options when you upgrade in the future.

I'm planning on similar holes in my floor, giving up the back seat and all. Gotta do what we can to lower the C.G. and improve yaw capability!

Are you doing anything with your breaks? It seems like you're moving a lot of mass off of the nose. You may want an adjustable proportioning valve in there to retune the rear brakes.


----------



## bigmouse (Sep 28, 2008)

jwiger said:


> Great progress! I hope you are planning battery pack space a little larger than the pack you have. It will give you more options when you upgrade in the future.
> 
> I'm planning on similar holes in my floor, giving up the back seat and all. Gotta do what we can to lower the C.G. and improve yaw capability!
> 
> Are you doing anything with your breaks? It seems like you're moving a lot of mass off of the nose. You may want an adjustable proportioning valve in there to retune the rear brakes.


The pack is going to be 32kWh. That's pretty sizable for any EV these days (except Teslas). I'm not likely to ever upgrade it.

Only a bit over half the pack is going in the back seat area. The rest is going in the front of the car. I've weighed the car as it sits now and each of the large components going in to it. They're being distributed to give very close to 50/50 weight distribution (calculates to 49/51, F/R with driver). It'll end up being a bit heavier than stock (about 200lbs) overall, but not enough to need a brake upgrade.

Here's a plot from my spreadsheet-o-calculations. Shown on the axis is the location of each mass added (or modified in the case of the 12v battery and seats). The axles are also on the plot.









It was a 330ci to start with so it already has decent brakes. I'm expecting to someday swap an M3 rear end in to it in order to get an LSD. I'm waiting to see how it performs in general before I spend the money on it. No point in buying a performance upgrade if the drivetrain doesn't perform how I expect. If I do end up doing the M3 rear end swap though, the M3 brakes come with it as well, but only in the rear.


----------



## jwiger (Oct 18, 2014)

Very thoroughly planed, excellent! My concern was just the F/R bias. It gets scary if the fronts lock up before the rears. Kudos on all of the planning.


----------



## 67BGTEV (Nov 1, 2013)

bigmouse said:


> I'm confident that the Lexus controller would be a great match to the HVH250.


Vincent, Thanks for confirming. I'm going to get Lexus Controller this week. While it is in transit, could you please let me know where can I get 

the Encoder Cable?
HV Cable connector?

Would you suggest if I need to do anything before I connect the Motor and HV?

Do you have a part number for these? 
Anything else to get the controller going?
Do I need to modify anything?


----------



## Duncan (Dec 8, 2008)

jwiger said:


> Very thoroughly planed, excellent! My concern was just the F/R bias. It gets scary if the fronts lock up before the rears. Kudos on all of the planning.



Not nearly as scary as it gets if the rears lock up first!!!!


----------



## bigmouse (Sep 28, 2008)

67BGTEV said:


> Vincent, Thanks for confirming. I'm going to get Lexus Controller this week. While it is in transit, could you please let me know where can I get
> 
> the Encoder Cable?
> HV Cable connector?
> ...


I think it's important to point out that the Lexus inverter won't work on its own without a bunch of custom electronics and some modification.

In order to get the controller working, you need a control board for it, or figure out how to control the stock one. I designed the control board I'm using and I don't plan on selling them separately. 

There are more modifications required for the inverter to get it to work on its own. Specifically, the HV input needs to go directly to the inverter block rather than the converter block.

Since this system uses upwards of 600vdc, I'm very hesitant to provide anything for sale. The inverter is only part of the system anyway. You need a BMS that works with a 600+v battery. At these voltages, you need to be extremely careful with precharge, safety interlocks, leakage detection, etc. I've designed all of these functions in to my own BMS. This is a whole different ball game from a 144v DC conversion.

Depending on which version of the motor you have, you may be able to use one of Eldis's UMC boards and a Chevy Volt inverter to drive it with a standard EV battery. I'm using the full voltage to ensure that I get the most performance out of it that I can. That would work on the lower voltage version of the HVH-250.

If you have the high voltage version of the motor, the Lexus inverter would be a very good candidate to drive it, but you still need to get it to run.

I've heard that the original Prius inverters are easy to control. You might be able to match one of those up with Eldis's UMC and use both inverters in parallel with similar results as you would get with the Lexus inverter.

Sorry if I misled you about how easy it might be to use the Lexus inverter.



Duncan said:


> Not nearly as scary as it gets if the rears lock up first!!!!


Rears locking up is fine as long as you're going in a straight line. Fronts locking up is bad no matter what, you lose all steering control.


----------



## Duncan (Dec 8, 2008)

Hi Bigmouse

If you lock the rears then you won't be going in a straight line!!!

You should always set a car up to lock the fronts BEFORE the rears, locking the fronts is not too scary

locking the rears is very very scary

The reason is - 
If you lock the fronts you lose front grip, you tend to plough straight on, letting the brakes off immediately restores front grip

Locking the rears drops the rear friction and the rear starts to overtake the front,
Even if you immediately let the brakes off you are now not pointing in the direction of motion and the car is massively unstable

All cars are set up to lock the fronts first
(motorbikes are a different issue)


----------



## bigmouse (Sep 28, 2008)

Duncan said:


> Hi Bigmouse
> 
> If you lock the rears then you won't be going in a straight line!!!
> 
> ...


My understanding of car brake systems is that when you first apply the brake, the rears get the pressure first to stabilize the car, then as you press harder, the fronts get more pressure. This is because the weight is transferred more to the front wheels when braking so they do more of the work (they're also physically bigger for this reason).

If the rears lock up (for example, pulling the handbrake or the transmission or diff locking up in a straight line), with no braking on the front, they act like the feathers on an arrow. If the fronts are braking as well when the rears lock up, then they have more friction than the rears (as you said) and will want to trade places with the back.

Regardless, if you're in a corner and lock up either axle, you're having a bad day ;-)


----------



## bigmouse (Sep 28, 2008)

When I took the sawzall to the floor of the back seat of my car, I was sweating a bit more than would have been justified considering the temperature. That was the most visible indication of the scale of what I'm doing to this poor BMW. The holes that were left when I finished were jagged and uneven.
And they still are! But now there are the beginnings of battery boxes sitting in those holes. And those battery boxes actually hold batteries!
















We only dropped the cells in to test-fit. The next steps are to fill in the gaps in the sheet metal around the boxes, paint them, and install panels in them to make them water tight. We'll also make some passages for the HV cables and coolant lines as well. Once that's complete, a rack for the upper portion of the rear battery will be built on top. 

​ Here's a photo of the rear battery that will sit on top. It's actually the rear module of the Chevy Volt pack with part of another module attached to it. It's 10kWh all up and about 1200mm (4ft) long.








I also spent some time getting the charge port installed. Here it is before painting. It's held in with pop rivets. It will get a coat of sealant, a drain hole drilled at the lowest point, and some black paint.


----------



## eldis (Sep 3, 2013)

bigmouse said:


> ...
> I've heard that the original Prius inverters are easy to control. You might be able to match one of those up with Eldis's UMC and use both inverters in parallel with similar results as you would get with the Lexus inverter.
> 
> Sorry if I misled you about how easy it might be to use the Lexus inverter.
> ...


Bigmouse is right. Prius inverter (2nd gen!) is quite easy to interface with custom controllers, as it was designed with motor controller being outside of the inverter (old automotive guys and their weird ideas..) Just like there are many Prius inverters, there are also many Lexus inverters. The oldest versions (can't remember the name), followed the Prius 2nd gen logic and had compatible interface, accessible from the outside. Those would be possible to reuse. The new ones (like the one bigmouse has) are not supported from my side and probably never will.

Anyway, UMC Drive is not ready yet to be shipped as plug&play solution. There is a big step between making few units run on your table/in one car, and being user-proof, with a PDF showing wires here and there. With high voltage (even if lower than 600V) being the main concern.

Bigmouse, who makes that white data connector on Lexus inverter? The same one is on 3rd gen Prius. The closest thing I could find was this
http://www.jst-mfg.com/product/detail_e.php?series=234


----------



## ETO (Jan 5, 2016)

Hi *bigmouse *, did you plan to connect additional motor to this transmission in future, and use like double motor?
If its possible to convert original Lexus?
I understand should be same voltage and synchronized controllers work, but just like idea to share the load.
because your project amazing, but just cover on engine space make looks empty.


----------



## 67BGTEV (Nov 1, 2013)

bigmouse said:


> I think it's important to point out that the Lexus inverter won't work on its own without a bunch of custom electronics and some modification.
> 
> In order to get the controller working, you need a control board for it, or figure out how to control the stock one. I designed the control board I'm using and I don't plan on selling them separately.
> 
> ...


I've picked up a several tips from the forum - one of them is Honda Insight DC-DC converter, which has worked great for me. 
Before I placed an order for GS450H Controller, I did read the Controller tear down articles. Due to a lack of my knowledge about power electronics, I failed to realize the complexity of using this controller. Now that I received my controller, time to see how to make it work. May be  GEVCU

or a Raspberry Pi may work. I'll start a different thread. Appreciate if you guys can share the knowledge.


----------



## Karter2 (Nov 17, 2011)

bigmouse said:


> If the rears lock up (for example, pulling the handbrake or the transmission or diff locking up in a straight line), with no braking on the front, they act like the feathers on an arrow. If the fronts are braking as well when the rears lock up, then they have more friction than the rears (as you said) and will want to trade places with the back.


 Ahh..No !
once the rears lock, by definition they have lost grip and can do nothing for directional stability. ( the very essence of a handbrake turn , and how Rally drivers and Drift racers set a car up sideways for a corner)
As Duncan says, if anything is going to lock, you always want the fronts to lock first....
Very noticeable with F1 cars...and i think they know a bit about how to set up braking .


----------



## bigmouse (Sep 28, 2008)

ETO said:


> Hi *bigmouse *, did you plan to connect additional motor to this transmission in future, and use like double motor?
> If its possible to convert original Lexus?
> I understand should be same voltage and synchronized controllers work, but just like idea to share the load.
> because your project amazing, but just cover on engine space make looks empty.


It doesn't make much sense to add another motor to the front of the transmission as the torque that motor can transmit is limited by MG1 anyway. It would have no advantage over using MG1 as a motor on its own. The only reason it works in the original car is because the engine is gas driven, so it adds power to the system.



Karter2 said:


> Ahh..No !
> once the rears lock, by definition they have lost grip and can do nothing for directional stability. ( the very essence of a handbrake turn , and how Rally drivers and Drift racers set a car up sideways for a corner)
> As Duncan says, if anything is going to lock, you always want the fronts to lock first....
> Very noticeable with F1 cars...and i think they know a bit about how to set up braking .


Those examples are all in corners, which I agreed with. Notice in the example I gate I specifically stated "in a straight line" and "no braking on the front". Locked up rears will have more drag than free-wheeling fronts. As soon as you enter a corner, or the fronts begin braking, that doesn't apply anymore and what you're describing is true. I'm approaching this question from the point of view of what happens if my rears lock up from regen while I'm not on the brakes (single-pedal driving).


----------



## Karter2 (Nov 17, 2011)

bigmouse said:


> ...
> Those examples are all in corners, which I agreed with. Notice in the example I gate I specifically stated "in a straight line" and "no braking on the front". Locked up rears will have more drag than free-wheeling fronts. As soon as you enter a corner, or the fronts begin braking, that doesn't apply anymore and what you're describing is true. I'm approaching this question from the point of view of what happens if my rears lock up from regen while I'm not on the brakes (single-pedal driving).


Well, unless you are in a perfect straight line, on a perfectly even level surface, with no side wind, etc etc, I can assure you from experience ...(I used to be a "hoon" in my youth, and specialised in use of the handbrake for no good reason other than to scare people !) ...that the back end will step out on you at the slightest oportunity once those rears are locked up.
The only way to keep control is to have a front drive car and apply more power.
Watch some go karts, the one with rear brakes only, if those rears are locked
For more than a second, it will spin ...even on a straight, ..unless the driver is ready to catch it !


----------



## tylerwatts (Feb 9, 2012)

Karter

This statement of yours is physically impossible and you are not mentioning a few variables that would also be involved to make this happen. Even locked brakes have drag and unless the vehicle mass is experiencing a sideways force (turning) or greater drag on the front axle (braking or force elements of steering) the back will not kick out. On a fwd car your engine braking can be greater drag than locked rear wheels and weight distribution and transfer also alter the physics involved but for a typical rwd sports car you need to be aggressive (steer hard or sharp or swerve) or have poor traction to lose sufficient rear drag to cause a spin from only locking the rear wheels whilst coasting on the front.

I agree with the circumstance and outcome you describe and I believe bigmouse does also. But your cause is incomplete. No need to argue over it though, lesson is be mindful of the slowing force on the rear wheels as locking up is bad.


----------



## Duncan (Dec 8, 2008)

Hi Tyler
I agree with Karter on this - locking up the backs is awful 
And YES you can swap ends so fast it makes your eyeball spin!

The problem is any tiny imbalance goes straight into positive feedback and becomes a major imbalance,

I have also seen (and been driving) karts that spin on a straight - both from an excess of power and an excess of brakes


----------



## F20A2-t (Nov 12, 2014)

Here in The Netherlands, a car that locks up the rears before the fronts, fails its mandatory yearly road-worthiness test. 
If you just lock up the rear wheels, without braking force on the front, the car will continue in a straight line as long as the road surface is flat and level, the car's suspension / wheel geometry is set-up properly and you were already driving perfectly straight.
If the car is already braking with the fronts and weight has been tranfered (nose dive), the car will try to turn when the rears lock up. This is also due to the brake force never being perfectly devided 50/50 between the front brakes and having less weight on the rear axle.

You could take a FWD car and put two plastic trays under the rear wheels to see what happens


----------



## wujekptack (Jan 13, 2016)

do you have a full schematic of the inverter including driver chips IGBT?

I would also need pin input and output descriptions. I'm building a vehicle based on a Prius. I have a gearbox from a prius, I have some stuff from Aigo.

Love your work, please help me out.

Thanks

Ptack


----------



## bigmouse (Sep 28, 2008)

Sorry for the long delay since my last update! Work has been continuing, though was a bit slow through January as I had a lot of other things taking up my weekends. While the car is at a friend's place for the mechanical work, I can only work on it one day a week.

That doesn't stop me from working on things at home though. I've been getting a lot of questions about my Chevy Volt battery BMS ECU. I'm still working on it, and it's been getting a bit more of my attention recently as it'll be one of the first electrical systems to go in to the car once the mechanical work is done. So I want to have it as far along as possible by that time. I spent a full day last weekend coding on it. It's going to be very nice. So far I've got the J1172 interface working and tested. Precharge and contactor weld detection coding is done. The framework for the main state machine is in place as well.

Mechanically, the rear lower battery boxes are still coming together. The sheet metal cut from the car is all closed in now, so all that's left to make it water tight again is to skin the flat sides of the boxes. That will be the last thing that gets done before painting, once the structure for the rear upper battery is complete.

Here's a photo of one of the rear lower batteries in its home.










The tubes mounted above it will have feet which press it down in to the box, securing it in place. There's a channel in the bottom that fits with the stock clamping point on the battery to keep it from sliding rearward. The top battery will rest on top of the structure, also on its side, with a channel on the rearward steel box section serving the same purpose as in the lower batteries. The top battery will be held down by a strap/frame which uses the same mounting points as the lower battery tie-down.

Here's the assembled rear upper battery.


















It's a lengthened module, 10kWh total. I used threaded rod to clamp the batteries in the lower section and pallet strapping to clamp the top of the module.

At the front of the car, the hard points for the front battery are coming together. I'm using the front sway bar mount to secure the front of the front battery. These mounting points are the same points used to mount the front subframe on AWD versions of the car, so it should be plenty beefy to support the battery. The rear of the front battery will be supported by a bar which will be installed bridging the original motor mounts.

The inverter, charger(s), heater, and DC-DC will all mount to the front battery enclosure. The power steering pump and air conditioning compressor will mount to the same bars that the front of the battery will rest on. The vacuum pump (and reservior) will live in the cubby behind the passenger side strut tower.

The water pumps will mount along the bottom of the radiator.

I had some blanking plates printed for my battery coolant ports.










These will be used in the front battery as I'll be paralleling the coolant circuit with T-pieces rather than passing through one battery to the other. I have the STL files for these parts if anyone is interested. I had them printed at Seeed studio and they came out very nicely, though expensive for what they are.

This weekend we'll hopefully get the rear battery mounting structures completed so that I can start on some wiring/plumbing.

I wouldn't say it's getting close, but progress is being made! Registration for this car is due in July, so I want to have the conversion done before then so I can get the DMV to verify it doesn't need SMOG testing in time to not have to register it as non-op.


----------



## gileadgarage (Feb 26, 2016)

Holy crap! Beautiful!


----------



## mfox (Feb 3, 2013)

Great , 
How did you solve problems with error blinks, when you took OEM engine out? 
Odometar will work after gearbox replacement ?


----------



## bigmouse (Sep 28, 2008)

mfox said:


> Great ,
> How did you solve problems with error blinks, when you took OEM engine out?
> Odometar will work after gearbox replacement ?


I haven't connected the 12V battery since the engine came out. With the DME removed, I'm hoping the cluster will only light the CEL if told to, and I know the CAN message for that. Will wait and see. Worst case scenario, I remove the light/LED.

The odometer will still work since the speedometer signal comes from the rear diff.


----------



## bigmouse (Sep 28, 2008)

Wow, another month has gone by already!? A quick update,: we're still working on getting the rear battery installed. The mounting/clamping parts are proving to be very fiddly. The rear upper battery has been put in place and the rest for that to lay down on is being built. Then the tie-down for that as well.
The platform for the front batteries has been installed. I used some pieces of metal left over from a couple Nissan Leaf batteries that I tore down for the forward support and welded a piece of box section across the original engine mount locations for the rear support. Here's a photo of the front batteries sitting in place. You can also see the mounted power steering pump on the same supports.

For some reason, I can't get the pump to power up. I've used this same model pump before without trouble, so I think I might have gotten a broken one from the yard.


And with the front of the car on. If I play my cards right, I might have room left over in front for a "frunk", Tesla-style!

The cardboard mockup on top of the batteries behind the strut bar represents the inverter.
I've been playing with the HV cable routing. There's a photo from under the car of the HV battery cables, the AC cable from the charge port, and the beginnings of the coolant pipes visible. Don't worry, the cables will be much better supported and protected when the final routing is done. This was just a mock-up to check lengths. The coolant pipes are fairly large diameter so as not to restrict the coolant flow to the rear battery over such a long run.


I picked up a mini-lathe from Harbor Freight as well to turn up some copper spacers to bring the HV bus in to the inverter. I can't use the original connectors because the internal high voltage bus (650V nominal) was never brought out of the inverter in the original application. The photos show the copper spacers with the threaded rod installed and how the cables will connect.



I have some HDPE plastic that I intend to machine up to insulate and support these connections.

I've also still been poking at the BMS code. Spent several hours on it last night and got the CAN communications on the "powertrain" bus working. I can now monitor the BMS over CAN, request changes of state from the state machine (so I can ask it to go in to "drive" mode for example).

Still to do on the BMS:
Implement SoC monitoring
Implement isolation monitoring
Hook up to a real battery and start testing!


----------



## bigmouse (Sep 28, 2008)

Bonus photo of the rear batteries in their homes and clamped in place. The upper battery will lay on top.


----------



## mfox (Feb 3, 2013)

Nice. You are not afraid of such big voltage. ?? What charger and dc-dc you are using?


----------



## bigmouse (Sep 28, 2008)

mfox said:


> Nice. You are not afraid of such big voltage. ?? What charger and dc-dc you are using?


The voltage is a bit scary, yeah. That's the main reason I'm putting so much effort in to my BMS (including isolation monitoring).

As for the DC-DC, charger, etc, let's just say I figured out a way. I don't remember if I've described it in this thread already or not, but if not, I'll go in to more details once it's up and running.


----------



## bigmouse (Sep 28, 2008)

More progress on the rear battery installation this week. All the aluminum metalwork in the rear is done! All that's left is to put the skins on the lower battery boxes, seal it up, prime and paint. Then the batteries can finally start going in and getting bolted down in their final homes (in the back at least). Here's a photo of the rear battery support/clamping structure completed (sans batteries). I had the upper battery installed with this at one point and it's very secure. The straps bolt down along the rear edge, wrap over the top of the battery, then get cinched down by 4 bolts along the forward edge. The lower batteries are held in place by the double "A-frame" structure in between. All very tidy.










Under the car, the pass-throughs for the coolant to the rear battery and the high voltage cables has been cut and fitted. The coolant hoses pass through rubber grommets and the HV cables pass through glands. There will be nipples coming off the main tubes at an angle to meet the hoses. Inside the car, the hoses will be split 3 ways, run through the three batteries, then rejoin before passing through the sheet metal to the return pipe. There will be a service disconnect mounted to this box as well. BMS communications will be routed inside the car as it's all low-voltage.










The goal for next weekend is to get the battery boxes skinned and painted, maybe some of the work under the car routing the coolant and HV cabling. The batteries will finally be installed the weekend following that.

The goal right now is to have the car running before its registration is due in July. It feels like we're on track to hit that goal, if things keep progressing as they have been.

Bonus photo from under the car, looking forward. Still lots of stuff to pin in place.


----------



## bigmouse (Sep 28, 2008)

This weekend had a bit of a milestone on the EV project. The rear battery boxes are now closed in and mechanically complete. A coat a primer has been applied, and some seam sealer and a coat of paint will be going on it over the next few days so that it's ready to accept the batteries this coming weekend! Here are some photos:


















Aside from the front battery box, the major fabrication work is now complete. Lots of little things still to do, but this rear box has been a slog and I'm glad it's done. Hopefully from here on out progress will feel more steady and frequent. Little things will go by in quick succession.


----------



## jackbauer (Jan 12, 2008)

Great work. Am still plugging away at the GS450h gearbox. Such a pity we're not allowed to cut into the chassis of the car in Ireland. Would solve so many problems!


----------



## jetpax (Oct 28, 2013)

Great project, I've been inspired by your work bigmouse.

I was trying to calculate the performance of the LS600h drive in your application to see if it would be a good basis for my own project.

Launch, acceleration and top speed look OK, but it seems that the hill climb performance at 60mph is only about 6%, or 3 degrees, (see attached, using Lex303Ci profile). Although this seems inline with US freeway standards, it is a bit on the edge.

Obviously my spreadsheet could be wrong, so I was wondering if you had made any estimates?


----------



## bigmouse (Sep 28, 2008)

jetpax said:


> Great project, I've been inspired by your work bigmouse.
> 
> I was trying to calculate the performance of the LS600h drive in your application to see if it would be a good basis for my own project.
> 
> ...


I haven't looked at your spreadsheet, but I did a quick calculation for my conversion to figured this number out.

At 60mph, MG2 in my car is spinning 5365rpm in the high gear (0.31m tire radius, 3.38:1 final drive ratio, 1.9:1 gear ratio).
Judging from the ORNL paper, MG2 alone has a continuous (>20min) power rating at at this speed of around 50kW. At that speed, 50kW equates to 89Nm at the motor.
At 60mph, I plan to be in the high gear (1.9:1) so the continuous torque available from MG2 at the driveshaft is 169Nm.
The drag (Aero + Rolling) on a level surface at that speed will be 530N
This translates to about 50Nm of torque at the driveshaft.
This leaves 119Nm of continuous torque available at the driveshaft.
That torque is enough to climb a 4.47 degree (7.8%) slope at speed.

That seems to agree somewhat with your number, assuming you also ignored MG1, which will probably add another 50% of that torque continuously.


----------



## jetpax (Oct 28, 2013)

OK, I was using only power numbers as ORNL specs those for both LS600h and Camry motors at about [email protected] for continuous use, (though as you say 50kW for 10mins, and 140deg stator temp,which sounds pretty high to me).

The 100km/h cruise power is about 18kW, so that leaves 32kW (cont) to provide climb, so 

32kw=100km/h*m*g*sin(climb_angle)

That's how I get 4 degrees or 8%.

Anyhow sounds as if we are about in the same ballpark, many thanks


----------



## bigmouse (Sep 28, 2008)

jetpax said:


> (though as you say 50kW for 10mins, and 140deg stator temp,which sounds pretty high to me).


I'm assuming that these have class H insulation in the stators. I'm not sure how safe an assumption that is, but it would make sense for an automotive application. Class H insulation is rated to 180C.


----------



## eldis (Sep 3, 2013)

bigmouse said:


> I'm assuming that these have class H insulation in the stators. I'm not sure how safe an assumption that is, but it would make sense for an automotive application. Class H insulation is rated to 180C.


I wonder what the neodymium magnets have to say about that. Most types are long dead at 180C. But Lexus/Toyota is probably/hopefully using very high-temp types.


----------



## bigmouse (Sep 28, 2008)

eldis said:


> I wonder what the neodymium magnets have to say about that. Most types are long dead at 180C. But Lexus/Toyota is probably/hopefully using very high-temp types.


The magnets are buried in the rotor. They should be somewhat insulated from the stator temperature. I would imagine that PM rotors run cooler than induction motor rotors since there's no current flowing through them. But that's just an educated guess.


----------



## eldis (Sep 3, 2013)

bigmouse said:


> The magnets are buried in the rotor. They should be somewhat insulated from the stator temperature. I would imagine that PM rotors run cooler than induction motor rotors since there's no current flowing through them. But that's just an educated guess.


Interesting question. BLDC motors for sure, IPM rotors should run cooler than induction, but how much? I'll try to investigate a bit into this topic.


----------



## bigmouse (Sep 28, 2008)

​Made some good progress on packaging the BMS PCBA today. Putting my CNC mill to good use!
Machined the end plates for the extruded aluminum case for the BMS. If I had some engraving bits handy, I'd have done some engraving as well. I'll be using the same case for the gateway ECU as well.​







​







​ I also cut a piece of plastic out for the low voltage pass-through on the inverter. I can't use the original connector because couldn't get ahold of the connectors from the original control board. The inverter will have pigtails bringing out the LV connections from the control board to some waterproof connectors on the other end. I cut the plate from some cutting board material with inset hexagons to hold the nuts on the back side of the cable glands. They snap in place with a satisfying click. How did I ever live without one of these machines?








​







​







​
More updates to come tomorrow!


----------



## mfox (Feb 3, 2013)

great work


----------



## Moltenmetal (Mar 20, 2014)

Great attention to detail...something my build does not display!


----------



## 67BGTEV (Nov 1, 2013)

Wow, this is looking great. I wish I had the time and skills to do this good of a job. 

Sent from my SM-N900T using Tapatalk


----------



## jetpax (Oct 28, 2013)

Beautiful work, what software/toolchain do you use for your CNC?


----------



## bigmouse (Sep 28, 2008)

Thanks everyone. The toolchain is SolidWorks -> CamBam -> Pronterface. My CNC runs from a 3D printer controller so I use a 3D printer interface to drive it. Works very well with only minor tweaks to the firmware.


----------



## bigmouse (Sep 28, 2008)

The rear lower batteries are mounted and bolted in place. The upper battery has been test-fit and seems to fit nicely.

The lower battery boxes have been sealed and painted. I applied some sound deadening material to the broad panels to keep them from vibrating. The before and after "knock" test of the sound is quite profound. I think it will work nicely.


















Once that was done, the lower batteries were lowered in place (with hoses attached) and bolted in. Very tidy! (pictured here without the clamping braces).










I started routing the coolant lines for the lower batteries. Will need to buy/make some couplers to join the two upper hoses to the tee piece. The lower hoses are already connected (the ones with the hose clamps).










Below is a test fit of the upper battery and its securing structure. It's not bolted down in this photo, but is shows what the final configuration will be. The coolant ports are at the top in this configuration. Long hoses will loop around to meet the tee pieces that will attach to the hoses coming in through the grommets just behind the battery.










The BMS wiring is dead easy! I just have to hack up the original low voltage harness and extend it to reach the main BMS ECU (see previous update) which will be inside the front battery box. I've already stripped most of the tape and loom from the harness where required. The hardest part will be running the extended harness wiring up under the hood.


----------



## Yabert (Feb 7, 2010)

Cooling loop in parallel? Same diameter for the parallel tubes and the main tube... I'm not sure it's a good idea.
If it's easier for the coolant to pass on one side the temperature between each side could be different.

Hope you will monitor cells temperature at different places.
You will let us know.


----------



## bigmouse (Sep 28, 2008)

Yabert said:


> Cooling loop in parallel? Same diameter for the parallel tubes and the main tube... I'm not sure it's a good idea.
> If it's easier for the coolant to pass on one side the temperature between each side could be different.
> 
> Hope you will monitor cells temperature at different places.
> You will let us know.


The batteries were originally plumbed in parallel in the Volt. I'm paying attention to the orientation of the tee-adapters to ensure that each pack gets the pressure that I want. The top battery will get half the incoming pressure, and each of the lower batteries will share the remaining half evening (a quarter each). This is obviously assuming idealized flows/pressures which may not be the case. I'm crossing my fingers that the non-idealities will be roughly the same for each module. The coolant passages under the car are very large diameter relative to the hoses, so the flow to the rear should be relatively unrestricted relative to the front (it will have its own pump anyway).

My BMS does monitor the temperatures from the original Volt BMS, so I'll be aware of any imbalance that occurs.


----------



## Moltenmetal (Mar 20, 2014)

To clarify: what do the flow channels look like in the packs?

If the flow channels are narrow planar spaces, flow is likely laminar and dP varies linearly with velocity (i.e. flowrate in a constant geometry).

If the flow channels are circular, flow is likely turbulent and dP varies as V^2.

That might help with figuring out the balancing, but having some pressure gauge taps might help even more.


----------



## mons2b (Nov 17, 2015)

Moltenmetal said:


> To clarify: what do the flow channels look like in the packs?
> 
> If the flow channels are narrow planar spaces, flow is likely laminar and dP varies linearly with velocity (i.e. flowrate in a constant geometry).
> 
> ...


how would these batteries go with air force fed down the channels instead of water? and or air blown over the external face of the battery?


----------



## bigmouse (Sep 28, 2008)

Moltenmetal said:


> To clarify: what do the flow channels look like in the packs?
> 
> If the flow channels are narrow planar spaces, flow is likely laminar and dP varies linearly with velocity (i.e. flowrate in a constant geometry).
> 
> ...


The passages that the hoses connect to are long manifolds that run the length of the battery on either side. The coolant flows from those manifolds through the cooling plates via an array of small passages stamped in to the plate itself. The photo below shows these passages and their tiny entry holes. (photo not mine, from: http://www.schultzengineering.us/volt9.jpg)










Part of me wants to think that those passages are going to present a large pressure drop. That pressure drop, on either side of the entire pack assembly regardless of hose routing, will result in fairly even flow through each plate. The other part of me thinks there are a LOT of these channels and that the pressure drop will be smaller than I expect.

I suppose I'll know once I have real-time temperature data from my BMS under load.


----------



## mons2b (Nov 17, 2015)

bigmouse said:


> The passages that the hoses connect to are long manifolds that run the length of the battery on either side. The coolant flows from those manifolds through the cooling plates via an array of small passages stamped in to the plate itself. The photo below shows these passages and their tiny entry holes. (photo not mine, from: http://www.schultzengineering.us/volt9.jpg)
> 
> 
> 
> ...


Could you please tell me what BMS you are using and the settings you have configured to use on these batteries?


----------



## bigmouse (Sep 28, 2008)

mons2b said:


> Could you please tell me what BMS you are using and the settings you have configured to use on these batteries?


I've designed a BMS master to control and read data from the OEM slave units that come with the battery. See post #84 in this thread for details.


----------



## mons2b (Nov 17, 2015)

bigmouse said:


> Spent some time over the past week or so developing the BMS ECU. This is the second of three PCBs I'm making for this project. Basically, it handles everything having to do with the battery.
> The feature list is:
> 
> 
> ...


Looks very complex. Would this work on a car that didnt have a canbus and I guess the main point is how much would you sell duplicates for? Thanks.


----------



## Moltenmetal (Mar 20, 2014)

OK: the flow in the plates between the batteries will definitely be laminar. Good for you, because at a constant viscosity in laminar flow, dP = kV and the hydraulic -electric analogy works. dP is voltage difference, velocity (or flow in a channel of constant cross-section) is current, and resistance is just dP/V.

The headers in the original Volt pack were sized so that their resistance to flow was a small fraction of the resistance across each plate- the plate resistance being the controlling resistance- thereby ensuring that the flow across each plate was more or less constant. If you keep your header pressure drop low enough throughout your flow distribution network, you'll maintain that even flow distribution where it's important, i.e. on each cell. I would imagine that allowing some cells to get hotter than others could result in imbalance and may affect cell life.

One important point: the design isn't inherently self-venting. You will need to do some work to ensure that all the flow channels are free of air and full of liquid- not something you have to worry about with electrons, but a very real consideration for fluid systems. If your pump is anemic relative to the one Chevy designed for these circuits in flowrate terms, it might still be capable of enough flow to do adequate heat removal but you could end up with unfilled passageways and uneven cooling. You could ensure the channels would fill completely if you could pull some vacuum first, but just hooking the whole works up to a larger pump briefly would also be effective in flushing out the air if you don't let it drain afterward.

To the other poster: I don't think using air as a coolant is going to be anywhere near as effective as using water/glycol. Air has a lower heat capacity and thermal conductivity (both a LOT lower) although it also has a lower viscosity. Even at equal MASS flows, air is going to be the poorer coolant, and you're not going to get anywhere nearly equal mass flows of air and water through plates of those dimensions.


----------



## mons2b (Nov 17, 2015)

Moltenmetal said:


> OK: the flow in the plates between the batteries will definitely be laminar. Good for you, because at a constant viscosity in laminar flow, dP = kV and the hydraulic -electric analogy works. dP is voltage difference, velocity (or flow in a channel of constant cross-section) is current, and resistance is just dP/V.
> 
> The headers in the original Volt pack were sized so that their resistance to flow was a small fraction of the resistance across each plate- the plate resistance being the controlling resistance- thereby ensuring that the flow across each plate was more or less constant. If you keep your header pressure drop low enough throughout your flow distribution network, you'll maintain that even flow distribution where it's important, i.e. on each cell. I would imagine that allowing some cells to get hotter than others could result in imbalance and may affect cell life.
> 
> ...


Thanks Molten. Where i live is probably cool enough (and the distance short) to give air cooling a try. I can monitor it and if they get too warm then can rethink on it. Im thinking of high speed mini fans blowing down the channel and external fans blowing over the surface linked to a temperature sensor.


----------



## Hugh-Falls (Aug 9, 2010)

The mass and high specific heat of even a small amount of standing water in the passages could have a beneficial effect by helping moderate the fluctuations in temperature of the cells, or not.


----------



## bigmouse (Sep 28, 2008)

mons2b said:


> Looks very complex. Would this work on a car that didnt have a canbus and I guess the main point is how much would you sell duplicates for? Thanks.


The CAN bus can be restricted only the battery, if that's all you have. You won't be able to have the BMS limit drive power if you don't have a CAN-enabled controller unless you come up with something special. Worst case, the BMS can open the contactor if the minimum cell voltage gets too low, but this would very likely happen under load, which is not a good time to open the contactor. I would recommend at the very least having an Android tablet with the Torque app installed to view state of charge. That way you know when you're getting low, but it's still ultimately on the driver to work with the information provided.



Moltenmetal said:


> OK: the flow in the plates between the batteries will definitely be laminar. Good for you, because at a constant viscosity in laminar flow, dP = kV and the hydraulic -electric analogy works. (..)
> The headers in the original Volt pack were sized so that their resistance to flow was a small fraction of the resistance across each plate- the plate resistance being the controlling resistance- thereby ensuring that the flow across each plate was more or less constant.(...)
> 
> You will need to do some work to ensure that all the flow channels are free of air and full of liquid-


Thanks for the info! It's basically what I was counting on. I've got some pumps from a Ford Focus EV. From what I can tell, these are the same pumps used in the Volt. There will be one pump per battery (front and rear), so I should have plenty of flow. My gateway controller will also control the pumps through the built-in PWM control signal on the pumps. If things start heating up, the flow can be increased.

I bought a vacuum coolant fill kit for exactly this purpose. I have coolant lines running everywhere in this car and I'm sure it would be near impossible to fill the system without it. The Chevy Volt manual specifies using a vacuum fill tool for the battery as well.

Here's the full diagram of my cooling system as it is currently planned. The heater part allows for slight heating of the batteries whenever the heater in the car is running (or when charging). Not enough to get them hot, but enough to keep them from getting too cold.


----------



## Duncan (Dec 8, 2008)

Hi Bigmouse

If your fancy CAN BMS system could open the main contactor it could easily light an "Oil Pressure Warning" light on the dash

Then the driver would know to stop and do something - just like the oil light on an IC car

Any idea about timeframe and costs???


----------



## Moltenmetal (Mar 20, 2014)

Bigmouse: wow, that's a lot of complexity, but I'm sure it will do the job! Unlike the Volt though, you don't have a refrigerant cooler on the battery loop, so your radiator will need to have a lot of area to keep the temperature rise above ambient to the minimum practical. On hot days you'll likely be a little hot, but I'm sure your rad is huge for the heatload. You can always do a "swamp cooler" arrangement on your rad for the hottest days, evaporating water sprayed from a separate reservoir off the fins to drop the temperature further, with the effectiveness of that strategy depending (greatly) on your climate.

Mons2B: if you want to use air cooling, you'll need to make those flow passages wider. I think someone else here was thinking of opening up the stack and inserting something like the corrugated polycarbonate material that is used for glazing in greenhouses (think corrugated cardboard only made of clear polycarbonate). Then you'd have a flow channel wide enough to make a fan at all effective. Otherwise you'd need a compressor, because even a blower won't discharge enough air through those channels to matter. But consider that the discharge of your typical forced blower (one capable of any significant discharge head) is above ambient temperature by a significant amount already- twenty degrees C above ambient isn't unusual. Some of the work of compression goes into heat rather than just raising the pressure.

I don't have one of these packs and have only seen pictures, so I don't remember how exactly they're configured. Is there a channel between each cell, including between cells that have their current collectors welded together? Or is there a channel only on one side of each cell, with no channel between cells in pairs?


----------



## evforme? (Jul 23, 2015)

Cool project, subscribed. Do you see any problem with your design running 1 or more highlander MGR's?




Moltenmetal said:


> I think someone else here was thinking of opening up the stack and inserting something like the corrugated polycarbonate material that is used for glazing in greenhouses (think corrugated cardboard only made of clear polycarbonate).


Its known as "multi-wall polycarbonate" and its not a bad idea. Good chemical and heat resistances, lost of thickness's and wall configurations, relatively cheap, toolable and weldable.


----------



## bigmouse (Sep 28, 2008)

Duncan said:


> Hi Bigmouse
> 
> If your fancy CAN BMS system could open the main contactor it could easily light an "Oil Pressure Warning" light on the dash
> 
> ...


The BMS has 6 contactor drivers (5 of which support PWM for economizing). The can be used to drive anything within their ratings, including lights.

Timeframe will be determined by my own project, since I'm my own alpha tester. Once it's to a state where it's reliable and robust in my application, I will consider offering them for sale. Price is TBD, but less than a 96 cell BMS with the same functionality as the Volt BMS, and with only 5 low-votlage wires to connect. Price will also depend on options installed (not everyone needs 6 CAN busses and 6 contactor drivers).


----------



## bigmouse (Sep 28, 2008)

I spent some time today figuring out how to use a couple of the supporting components for my build. These include the power steering pump, DC-DC converter, and coolant heater.
​








​
I used a Chevy Spark charger (same as the Volt's) as a high voltage power supply and powered up the components. The DC-DC is from a Ford Focus EV. It powers up its output immediately upon application of high voltage. This is extremely convenient for me, though I imagine it could cause trouble with precharge in other conversions. This isn't a concern for me though. The low voltage wiring is 3 wires. Two wires are a differential data pair and the third seems to be floating. I thought it might be a disable line but it doesn't seem to respond to having 12V put on it, though I was using a 10k resistor and it appeared to clamp to a bit over 5V. I wasn't game to try a lower value resistor, so I just left it be, happy that it works anyway.
The coolant heater is also from the Focus EV. Super simple PWM input to drive that. The charger wasn't up to the task of driving it (which is good, since I clearly didn't have any coolant in it!). It did seem to react to the input signal I fed it, so I'll play with it more once it's in the car. This is used for the cabin heater and battery heating, when required during charging.
The power steering pump is from an Astra. I had to buy another one since the one I installed in the car wouldn't power up. I tested this one on its own and it spins up happily, so I'll swap them tomorrow.


----------



## bigmouse (Sep 28, 2008)

This weekend the securing fixture for the front battery was fabricated. It's a fairly simple arrangement, holding the batteries side by side in contact with each other. A "C" channel on either side holds the outboard edges of the batteries and a strap down the middle holds the inboard edges. The whole thing bolts down to the cross-beams I installed. All bolted down, it seems quite secure. The entire assembly is removable, which will allow a tray to be fabricated out of aluminum sheet metal for the batteries to sit in. A cover will be installed over the top (probably made from fiberglass and/or carbon fiber) to seal the front battery box. The BMS, contactors, and current sensor will all live in the space between the front batteries.
















​ The power steering pump had to be replaced. For some reason, the first one I bought was dead. This one works fine. we powered it up and loaded it for the first time with no issues. Turned the wheel against the lock and the pump draws more current just as expected.
I also finished up the coolant routing for the lower battery (just waiting on some clamps to arrive) and installed the first high voltage connection. The flat orange connection cable-tied to the bar is made from one of the original bus bars from the Volt battery. It was folded to the right shape, cut, and stripped. A quick bead formed on the cut corners with the TIG keeps the laminations from separating. The stack is then drilled to size. Very handy stuff, Much neater than heavy gauge cable I think.








​


----------



## mons2b (Nov 17, 2015)

Duncan said:


> Hi Bigmouse
> 
> If your fancy CAN BMS system could open the main contactor it could easily light an "Oil Pressure Warning" light on the dash
> 
> ...


+1 on what Duncan said.


----------



## bigmouse (Sep 28, 2008)

And there goes another month! ​We got sidetracked by some reinforcement that was needed to the rear battery tie-down. That's sorted out now. Also lost a weekend to a out-of-town trip.
The charge port cabling and HV cables between the front and rear battery pack are done and in place. The coolant tubes are also installed and used as support for some of the cabling.
















Moving to the front of the car, we've started enclosing the front of the battery box. The bottom of the box is a tray which the structural portion is installed in to. The batteries go in on top of the tray and mount to the beams in the front of the car, then a box formed from sheet metal is placed over the top. The top will be held on by a rack which will span the frame rails and support the inverter, chargers, DC-DC converter, and heater.








The front of the box isn't installed yet in this photo. The coolant ports will not be covered by the lid, instead a panel will be installed which will seal against the front of the box and allow the hoses to protrude through.
The contactors, current sensor, and BMS ECU will be installed in the space between the batteries. I've already started this, though I didn't take any photos.
Still to do:
Wire the LV BMS circuits
Wire the HV BMS circuits
Install inverter, chargers, DC-DC, heater
Finish cooling plumbing and wire pumps/temperature sensing
Leak-check the cooling system then fill and test
Install brake vacuum pump, reservoir, and tubing.
Precharge relay and resistors
HV wiring to chargers, DC-DC, inverter, heater
LV wiring to chargers, DC-DC, inverter, heater​
Build Arduino-based "gateway" ECU and connect to things like the accelerator pedal, gear selector, and gauge cluster (not as big a job as it might sound).
FIRMWARE!!!! (a bigger job than it might sound).
Finish up charge port LEDs and door sensing.
Wire up the power steering pump to 12V and ignition
Start putting interior back together
Make a cover for the rear battery (carbon fiber?)
Fabricate and install undertray (optional)
I'm sure there are a ton of other little things I'm forgetting.
We have to get all the heavy-duty mechanical stuff (cutting, welding, fabrication) done by the end of June as the guy that's helping me with it wants his lift and garage back. The car will then come home to me where it will be finished off with electrical stuff and firmware stuff that doesn't get done on the lift.


----------



## tylerwatts (Feb 9, 2012)

Looks to be going very well. Congratulations so far bigmouse.


Tyler


----------



## bigmouse (Sep 28, 2008)

A few quick photos of the mid-voltage (~350V) distribution box. This will distribute power between the battery, chargers, DC-DC converter, and heater. There's a current sensor in there as well. Once I've tested it, I'll fill the enclosure with silicone to make sure it's sealed up as it will live under the hood.


























I just love how much some nice connectors and heat shrink tubing can add a touch a professionalism to a project.


----------



## dedenumar (Jun 19, 2016)

good job guys


----------



## KillahBee (May 30, 2016)

Looks amazing, very cool project to follow and very professionally done!


----------



## bigmouse (Sep 28, 2008)

The mechanical fabrication is very close to being complete! So close in fact that the car came home with me this weekend (though on a trailer, not under it's own power). All that's left for the mechanical work is to finish the frame that straddles the front battery and to which the inverter, charger, DC-DC converter, and coolant heater mount to. And a return manifold for the coolant loops.
Look how dirty it is! The only clean spots are the door windows (since they were rolled down since October) and the trunk lid (since it was open that whole time). The car was in a garage the whole time. This is all dust that collected on it in there.










The brake vacuum pump (from a Ford F150) is mounted in the empty cubby behind the front passenger side strut tower. The tank is an aluminum pipe with its ends capped. There's a GM manifold pressure sensor to monitor the vacuum level and help control the pump (same method I used on my previous EV conversion).










The front battery box cover is in place. I have to finish the wiring inside it and terminate it all in to the connectors on top. There are 4 glands for HV cables as well. Two coming from the rear battery, and two heading to the inverter. The charger will mount to the left in this photo, DC-DC and coolant heater will mount on the right (above the steering pump). The inverter is mounted to the frame already, so that's where it will live. The small box in the far left of the frame is the  transmission oil pump controller. I need to shorten the wiring going to that and mount it somewhere with good airflow.


----------



## bigmouse (Sep 28, 2008)

Got the BMS hardware mostly sorted out over the past couple days. All the wiring to the batteries and contactors is complete. Still have to sort out the wiring for the charge port (LEDs, Proximity, and Pilot).

With the BMS CAN wiring complete I was finally able to get the BMS talking to the entire pack at once. Here's a quick screen capture of some of the distilled data from the Volt battery OEM BMS modules.








For packs from two different cars and sitting for 8 months (I balanced them back in September), the voltage difference between the highest and lowest cell is very tight. I'm quite pleased!
I made a quick video showing the BMS controlling the contactors, including precharge and welded contactor detection.






Not much to see other than the voltage coming up. Most of the interesting stuff can be heard.
During the closing sequence, there are 5 clicks. They are (in order):
Battery negative contactor closing
Battery pack split contactor closing
Precharge relay closing
Battery positive contactor closing
Precharge relay opening.
During discharge, you can hear 3 clicks:
Battery positive contactor opening
(Delay while it waits for voltage to drop, showing it actually opened and isn't welded)
Battery negative contactor opening
Battery pack split contactor opening
The pack split contactor separates the rear battery pack from the front to keep voltages in the battery box at a lower level while sitting idle. When closed, it places both packs in series.
​Once that was sorted out, I put the battery cover on and am ready to finish wiring in the inverter. That should take a handful of hours, after which I may be ready to do the first spin of the motors in the car and on the actual battery pack!








It's starting to feel like it's getting close now!


----------



## bigmouse (Sep 28, 2008)

The wheels spin!






Not going to say much here except that this is a huge milestone for this project! The first wheel spin of an EV project is a special event. Very excited to get this thing wrapped up and on the road! Not far now.


----------



## Moltenmetal (Mar 20, 2014)

Congratulations! A huge milestone for sure!


----------



## piotrsko (Dec 9, 2007)

Dumb question: why the positive battery connection first. Power electronics prefer negative first to prevent arcing


----------



## mfox (Feb 3, 2013)

WOW Congratulations!
Can't wait to see video of driving and accelerating


----------



## bigmouse (Sep 28, 2008)

Thanks everyone. Going to work on the cooling system this weekend and hopefully after that I'll be able to start pulling real current.



piotrsko said:


> Dumb question: why the positive battery connection first. Power electronics prefer negative first to prevent arcing


I close the positive contactor last and open it first. This allows me to check for welded contactors. Arcing shouldn't be a concern since there's no current flowing. If contactors have to open with current flowing, then they'll all open at once in an "emergency" open command.


----------



## bigmouse (Sep 28, 2008)

​I'm in to the details now. Lots of small things to get sorted out in preparation for the first drive. The down side is that there's a LOT of small things to do. The up side is that it really feels like I'm making good progress since I can get so many things done in a single day. The last two weekends have been extremely productive.

Here's a quick video of the charge port LEDs reacting to the plug being inserted. The light comes on when the door is opened to illuminate the port. Once plugged in, the light "breathes" with the color ranging from red to green depending on the state of charge.






The car is really coming together. I've managed to make enough torque to fight the parking brake and pull the hanging suspension back up in to the wheel wells. Getting some details wrapped up with hopes of moving the car under its own power next weekend.

All the components mounted and the cooling system plumbed up. The clear tube is there to be able to confirm flow through the inverter and other power electronics and verify that bleeding of air is complete.

This photo is before any tidying. The wiring is much more organized now, with well defined harnesses routed around the various components.










I made a nice little panel for the top of the front battery. It holds the HV cables as well as the LV logic connections. It makes installing the cover for the front battery much easier than it used to be.


----------



## nedfunnell (Aug 13, 2013)

Any update?


----------



## bigmouse (Sep 28, 2008)

nedfunnell said:


> Any update?


The mechanical work is basically complete! I've been running in to trouble with the inverter. Reliable motor control is evading me, as it effective hardware protection. I've blown a few inverters at this point and am taking a step back to reconsider my plan for this final (and most important) piece of the puzzle.

Instead of continuing forward with my own control board, I've decided to try my hand at reveres engineering the communications between the stock inverter and the hybrid controller. I figure that the engineers at Lexus/Toyota, with all the resources and expertise at their disposal, will have tuned the motor control far better that I could ever hope to in my garage. The hardware protections would also be as designed so the risk of blowing an inverter should be much lower than with my amateur attempts at stable IPM motor control. The only way for this project to be reliable enough to act as my daily driver with the occasional thrashing is to leverage the effort already put in to the powertrain in Japan.

To that end, I spend last weekend with a borrowed 2007 Camry Hybrid. This car uses a very similar inverter (same control board inside, right down to the part number!), so I set up my Saleae logic analyzer and recorded the communication between the inverter and hybrid controller while performing a number of maneuvers and taking careful notes.

There is a LOT of data to sift through, but I've managed to isolate the pieces of data which contain the torque commands for each MG, as well as some parts which look like "modes" or "states". I will spend some more time this coming weekend with one of my spare inverters to see if I can manage to get the hardware to respond to these commands. Hopefully I can get away with feeding it the same data I recorded, only varying the torque commands, and have it respond.

If anyone on here lives in the SF Bay area and has a Toyota or Lexus hybrid they wouldn't mind me poking around at, please let me know. I managed to spend the whole weekend probing at the Camry without even a check engine light ;-)


----------



## bigmouse (Sep 28, 2008)

The car moved under its own power for the first time today! I still have some hacking to do on the Lexus inverter communications as it seems that I'm stuck in some sort of limp mode, but it's enough to move the car. Check out the video:


----------



## Tomdb (Jan 28, 2013)

Nice, how did you get the lexus codes? And how much control do you have over what it will do? Are there any fixed firmware limits that you are aware of?

Great progress


----------



## bigmouse (Sep 28, 2008)

Tomdb said:


> Nice, how did you get the lexus codes? And how much control do you have over what it will do? Are there any fixed firmware limits that you are aware of?


The Lexus communication was reverse engineered by renting and instrumenting a Camry Hybrid (basically the same inverter). Lots of digging through the raw traces that I captured to pick out the important pieces of information. I got enough to make the motors spin in the direction I want and some basic torque control, but I'm either in limp mode or not sending it a large enough range for torque request. My guess is that I'm not sending it something that it's looking for, or not performing an intialization properly at start-up. Will take some more work to figure out the last details and get full performance out of it.

The best piece of information that I've figured out for anyone wanting to use these is that there doesn't sem to be a minimum voltage. The inverter won't trip on undervoltage and I've had motors spinning on less than 12V. I've also had over 660v on it which it didn't seem to mind either.

There's even reason to think that all the limits exist in the hybrid controller ECU, not the inverter, but that I'm less confident about. I'll hopefully find out more once I figure out how to get it out of limp mode.


----------



## Tomdb (Jan 28, 2013)

Thats some good findings, but why would an inverter be more complicated then needed. If those inverters work like you are expecting they could be a goldmine, so many cars with those in them.


----------



## skeyes (Dec 3, 2016)

Really cool build using all these OEM components. Any luck getting out of the limp mode yet?


----------



## bigmouse (Sep 28, 2008)

skeyes said:


> Really cool build using all these OEM components. Any luck getting out of the limp mode yet?


I've been busy with work and out of the country, but I have some experiments I want to try this weekend after I return. Fingers crossed!


----------



## bigmouse (Sep 28, 2008)

Sorted out the power limit on the Lexus inverter today. Two words: Holy Crap!

This thing has so much torque I can barely touch the pedal and spin the tires (well, the left one at least). I'm going to have to get an M3 rear end and some better tires very promptly.

It's just finishing touches at this point! So excited.

(sorry for the vertical video. Obviously I wasn't the one recording the video).


----------



## skeyes (Dec 3, 2016)

Yes! The dream is real! Congrats. What was the secret to getting past the limiter? This drivetrain seems to have so much potential, and you just tapped it. Excellent!!


----------



## Tomdb (Jan 28, 2013)

Did you end up doing any hardware mods to the lexus inverter or is it now just hooking up the wiring and throwing the can messages on the bus?

Great progress.


----------



## mfox (Feb 3, 2013)

Congrats! ! Great job !


----------



## maclaren (Dec 9, 2016)

Greetings from Mountain View.  Glad to see the latest progress! Considering a BMW or Mercedes Benz build now, so this is inspiring.


----------



## N-zo (Feb 14, 2012)

Great Job!!!

Total weight of the car and top speed tested yet?


----------



## bigmouse (Sep 28, 2008)

Tomdb said:


> Did you end up doing any hardware mods to the lexus inverter or is it now just hooking up the wiring and throwing the can messages on the bus?
> 
> Great progress.


I ended up piggy-backing an Arduino Pro Mini on the original Lexus control board inside to steal control of the converter for my application. It makes a 330V rail by bucking the HV battery down to power the DC-DC converter (and future heater and air conditioning. It also boosts the output of a Volt charger to charge the HV battery. Allows me to have a 650V battery and still use readily available accessories.


----------



## bigmouse (Sep 28, 2008)

maclaren said:


> Greetings from Mountain View.  Glad to see the latest progress! Considering a BMW or Mercedes Benz build now, so this is inspiring.


Hello from West San Jose! I'm so glad that these Lexus hybrid transmissions are so incredible capable. I imagine this could be a game changer for the DIY crowd. Total drivetrain cost (Batteries, transmission, inverter) around $8000.



N-zo said:


> Total weight of the car and top speed tested yet?


Once I'm comfortable driving it on the freeway I'll ask my friend with scales to help do a post-conversion weight. Got a few final touches to make, but nothing that should affect the weight at all.

Had it up to just over 50mph. It's locked in the low-speed (high torque) gear at the moment. Need to write code to make it shift gears before I go faster since MG2 hits its speed limit at around 60mph. I could lock it in the high speed gear instead and lose the tire-smoking torque to see what it's like on the freeway. Spreadsheet says it'll max out (MG1 speed limit) at 110mph, which also happens to be my expected 1/4mi speed.


----------



## bigmouse (Sep 28, 2008)

skeyes said:


> Yes! The dream is real! Congrats. What was the secret to getting past the limiter? This drivetrain seems to have so much potential, and you just tapped it. Excellent!!


It was just a matter of finding the right messages to send. The inverter doesn't use CAN, so decoding was extra challenging as there was no standard message format to follow. I had to decipher it one byte at a time.

This drivetrain is amazing. From what I learned from doing this conversion, I could do the same with a Camry hybrid as well. With access to a car, I could also make Prius and other Toyota hybrid transmission/inverter pairs useful for pure EV conversions.

What really excites me is that I could pull the engine from a Camry (or Altima) hybrid, replace it with batteries, and have a pure EV.

There's also huge potential to hack/tune full hybrid drivetrains, engine and all. I wouldn't be surprised if my next project car is a hybrid track car.


----------



## maclaren (Dec 9, 2016)

bigmouse said:


> Hello from West San Jose! I'm so glad that these Lexus hybrid transmissions are so incredible capable. I imagine this could be a game changer for the DIY crowd. Total drivetrain cost (Batteries, transmission, inverter) around $8000.


Noob question... Do you have a separate electric motor connected to the drivetrain like most EV conversions or does the Lexus (Toyota) drivetrain include the motor?


----------



## bigmouse (Sep 28, 2008)

maclaren said:


> Noob question... Do you have a separate electric motor connected to the drivetrain like most EV conversions or does the Lexus (Toyota) drivetrain include the motor?


Just the two internal motors in the transmission. The front of the transmission just has a plate bolted to the bell housing and a locking mechanism for the input shaft.


----------



## mfox (Feb 3, 2013)

bigmouse said:


> It was just a matter of finding the right messages to send. The inverter doesn't use CAN, so decoding was extra challenging as there was no standard message format to follow. I had to decipher it one byte at a time.
> 
> This drivetrain is amazing. From what I learned from doing this conversion, I could do the same with a Camry hybrid as well. With access to a car, I could also make Prius and other Toyota hybrid transmission/inverter pairs useful for pure EV conversions.


That is amazing. Will you make in the future interface like your for selling it for controling inverter? I would like also do conversion whit this drivetrain. I' allready bought Zeva 1000 an find some motor from forklift for my next project. I didn't pay lot money for that.. But now I'm thinking to go in your direction. Only thing I don't like is such high voltage. It's not for playing...


----------



## Moltenmetal (Mar 20, 2014)

Absolutely awesome achievement! Very much looking forward to seeing OEM EV components like this re-purposed in conversions!


----------



## sprocketman (Jan 14, 2014)

Congratulations on your success. Did you connect your ardunio directly to the lexus inverter. 

Sent from my ALE-L21 using Tapatalk


----------



## bigmouse (Sep 28, 2008)

mfox said:


> That is amazing. Will you make in the future interface like your for selling it for controling inverter? I would like also do conversion whit this drivetrain. I' allready bought Zeva 1000 an find some motor from forklift for my next project. I didn't pay lot money for that.. But now I'm thinking to go in your direction. Only thing I don't like is such high voltage. It's not for playing...


As you said, this sort of voltage isn't something I'd like to encourage most people to play with. Providing a means to drive these inverters would do just that. They will work on more reasonable voltages, but you'd certainly want to be over 300V, and even there you wouldn't be able to achieve full performance. That's getting well past most people's comfort/skill levels. At these voltages, lots of extra care needs to be taken to ensure safety. Not many parts are rated to 600+ volts DC.



sprocketman said:


> Congratulations on your success. Did you connect your ardunio directly to the lexus inverter.


It's a bit more complicated than that ;-)

The arduino is piggybacked on the control board inside the inverter. I've intercepted a few signals and use the arduino to respond to them and control the converter in a particular way. I was hoping I could get away without hacking the control board, but it didn't turn out to be that easy. Aside from the converter hack, everything else plugs right in to the stock connector. I put a handful of components on an Arduino shield to be able to talk to the inverter, everything controlled by an Arduino Due.


----------



## sprocketman (Jan 14, 2014)

That's impressive I have the same gearbox but don't have you're skills. 

Sent from my ALE-L21 using Tapatalk


----------



## bunya (Nov 14, 2015)

Congrats on deciphering the objects and messages out of the bytes, that's a great achievement. I'm not sure where you stand on disclosing information about the torque commands etc that you have worked out but is it possible to get a capture of some of the traffic? I would like to buy a prius inverter and have a go at sending control commands etc in a similar way. I would assume the protocol is similar between the toyota hybrids. 
Regards from Oz
Jake


----------



## bigmouse (Sep 28, 2008)

bunya said:


> Congrats on deciphering the objects and messages out of the bytes, that's a great achievement. I'm not sure where you stand on disclosing information about the torque commands etc that you have worked out but is it possible to get a capture of some of the traffic? I would like to buy a prius inverter and have a go at sending control commands etc in a similar way. I would assume the protocol is similar between the toyota hybrids.


Thanks!

I've confirmed that the Camry and Lexus inverters use the same messages (though they're basically the same inverters, except the capacitor and IGBT stuffing).

I have a Prius inverter too, but I haven't played with it at all. The communication wiring is basically the same between all the Toyota (and licensed from Toyota) inverters after about 2007 (2010 for the Prius).

It's not as simple as sending the right messages though. Getting the converter to work properly is another trick, since as far as I can tell, that's controlled only within the inverter. In any case, the way I'm using the converter isn't compatible with the stock implementation of it, so some hardware modification was required on the control board. This like really only required if you want to use a high voltage (more than 400V) battery. Most people will want to do this as it's the only way to get peak performance from these drivetrains as pure EVs. Lower voltages will allow you to not worry about the converter, but will also run out of steam at less than freeway speeds.

However, I'm not prepared to release my recordings or instructions at this time.


----------



## bigmouse (Sep 28, 2008)

I spent some time over the past weekend making my project touch-safe. With my newly aquired 3D printer and some orange PLA, I modeled up a 3-piece insulator/housing for the high-voltage inlet to the inverter. This had previously been simply two copper posts with cables connected to them. Now those posts are housed in PLA, with some semblance of water proofing, and fully enclosed so that it can be shown off without worry of someone touching a live conductor.
Shown here is the full printed assembly, with copper installed. As well as the assembly steps. The base piece fits in to the oval shaped hole on the inverter, and is glued in to place with RTV. 

The first cable (+) connects to the shorter post, with O-ring around the sheath for sealing. There is sealing foam on both sides of the middle piece, which gets installed next.

The other cable (-) gets installed on the remaining post and the cap is installed.

4 screws are used to secure the stack together around the cables, engaging with captive nuts on the bottom layer. I'm very pleased with how it all goes together, even though it's not as water tight as I'd hope due to some bending of the cable lugs during crimping.


----------



## mfox (Feb 3, 2013)

That's great , but why didn't you use ABS? PLA is melting at much lower temperature and is not so durable. It is more for printing toys..


----------



## bigmouse (Sep 28, 2008)

mfox said:


> That's great , but why didn't you use ABS? PLA is melting at much lower temperature and is not so durable. It is more for printing toys..


PLA has a higher comparative tracking index than ABS (according to one datasheet I found for each material). There is up to 680V across the terminals in this piece (though I've ensured I have plenty of creepage distance).

If the inverter or cables get hot enough to melt PLA, then something else has gone very wrong.


----------



## riba2233 (Apr 29, 2015)

PLA melts on the sunlight, and it doesn't last long, it degrades over time. Abs is long lasting solution.


----------



## jetpax (Oct 28, 2013)

bigmouse said:


> Hello from West San Jose! I'm so glad that these Lexus hybrid transmissions are so incredible capable. I imagine this could be a game changer for the DIY crowd. Total drivetrain cost (Batteries, transmission, inverter) around $8000.
> 
> 
> 
> ...




Well done BigMouse,

Haven't checked in for a while, and great to see it working, this is an enormous achievement.

Would really like to know how well it works at cruise on a gradient tho...

My Google spreadsheet seems to predict it will only make an 4deg/8% grade at 60mph, which concerns me a bit, if only because I may have my model wrong! If it's correct though, acceleration will be a bit flat at freeway speeds.

Anyhow, looking forward to see how it pulls up hills at speed when you get it sorted...


----------



## bigmouse (Sep 28, 2008)

jetpax said:


> Well done BigMouse,
> 
> Haven't checked in for a while, and great to see it working, this is an enormous achievement.
> 
> ...


What numbers are you feeding in to your sheet? It won't let me log in to look at it myself.

I'm not worried about climbing grades at speed. This thing accelerates through 80mph on flat freeway with no hesitation at all. There's plenty of torque available, but the limiting factor is continous power, not torque capability.

Using numbers from the ORNL lab reports for the LS600h motor (same as mine) and Camry hybrid motor (very close in size to MG1 in my transmission), I should have at least a continuous power capability at 60mph of 75kW. This would allow me to climb a 9.5 degree (17%) grade at 60mph. That's quite a steep grade and about double the steepest grades found on highways in the US.

Really, the transmission alone is as capable as the whole hybrid system was, so my car should be able to do everything that the stock GS450h could do. All the engine power went through MG1 and MG2 in one form or another (either as torque reaction in MG1 or power transferred electrically from MG1 to MG2), so I shouldn't have lost any capability.


----------



## bigmouse (Sep 28, 2008)

A few updates:

Swapped an M3 rear differential in (with limited slip).
New tires (245 wide Pilot Super Sport)
Lightweight wheels (19" D-Force LTW5)
New PCB designed and sent off for fabrication (still waiting on it)

The new PCB will handle the key-on and start triggers (so I won't need a laptop to start the car anymore) as well as pedal sensing (currently handled by an Arduino), inverter control, pump control, running fans, vacuum sensing and vacuum pump control, heater control, transmission solenoid driving, oil pump control, and powertrain temperature sensing.

Once that board is installed, the biggest improvements will be ease of start/stop with key, smoother pedal sensing, and most of all, 2-speed gear selection. Right now I have to hard-code which gear for the transmission to stay in since I don't have adequate feedback from the transmission. I have been driving it (over 1000 miles now!) in the high speed gear. It's a bit slower to accelerate, but really pulls hard on the freeway. This board will let me drive around town in the crazy high-torque gear (maxes out at 50mph), then switch to high speed gear on the freeway.

The next big performance upgrade will probably be a lower ratio final drive gear set and a diff rebuild.

There will probably be a bit of ding-fixes and then some vinyl wrap in the future as well. Plus some restoration of rubber window seals and trim and some aftermarket seats.

A range test shows about 75 miles of useful range, but my batteries are pretty out of balance at the moment so that will improve as code continues to be developed.

Enjoy a video of me doing a launch at the edge of traction on these wide sticky tires. I've since tuned MG1 a bit better to get more torque out of it as well. This car is exceeding all my performance expectations.


----------



## nucleus (May 18, 2012)

Awesome! Thanks for the update, impressive work!


----------



## bigmouse (Sep 28, 2008)

Got some business cards printed to hand out to people when showing off my project at shows and the like. QR codes on the front for my Hackaday build log and my LinkedIn. On the back, a list of components used in the car and the key performance figures.

I am not a graphic designer.


----------



## bigmouse (Sep 28, 2008)

My last circuit board for my EV showed up! Just gotta populate, program, and wire it. Slides in to the slot the transmission ECU vacated.

I'll 3D print an enclosure for it, but the tabs sticking out the side will protrude since they act like "rails", same as the ECU it's replacing.

This is really the last piece to the puzzle to really unlock the full potential of this project. It will read the pedal position in a more reliable way that I am now, so drive will be smoother, and it will also control the transmission so I can use both gears. It will completely transform the driving experience!

Finally, it will read the key position so that I don't need to use a laptop to start and stop the car.


----------



## mfox (Feb 3, 2013)

wow, that is impresive work  

I bought 9 tesla modules from alex d , i can get from them 450v when I cut them half. Is this enough voltage for similar application ?


----------



## bigmouse (Sep 28, 2008)

mfox said:


> wow, that is impresive work
> 
> I bought 9 tesla modules from alex d , i can get from them 450v when I cut them half. Is this enough voltage for similar application ?


You'd have about 70% of the power (but the same amount of torque at low speed).


----------



## sholland (Jan 16, 2012)

Awesome work... looks great!


----------



## bigmouse (Sep 28, 2008)

I'll be taking delivery of my Tesla Model 3 sometime in the next few months, so I need to decide what I want to do with this BMW. It's amazing to drive, but I think the journey of building the car was the bulk of the reward for me. I accomplished something that (as far as I know) nobody else has done.

One option is to keep the car (which accelerates faster than the Model 3 I'll be getting) and use it for racing. I would need to trailer it to events though, so it's unlikely to see much use for that.

Another option is to sell it as is to someone with the skills to finish the final details. If I sell it, I will make the schematics, source code, and PCB gerber files available to the buyer and the community.

The car has been my daily driver for the past 2700mi and will continue to be until my Tesla is delivered. That said, it's not quite complete.

Still to be done:


 Cover for rear battery
 Figure out and program balancing control for Chevy Volt BMS (half the cells work, the other half still need to be decoded)
 waterproof front battery box (can't be driven in the rain until this is complete)
Custom gauge faces to read correctly for power (tachometer) and state of charge (fuel gauge)
 Program temperature gauge and fuel economy gauge to show useful information
Work on the the gear-change (code), it's a bit jarring at the moment.
 Get temperature measurements working properly (resistor replacements and code)
 Fix up the J1772 interface on the BMS (sometimes lets the EVSE disconnect randomly for some reason, probably a resistor tuning issue on the pilot line)
 Replace the blower fan resistor (part in hand, just haven't installed it yet)
 Finish wiring and write code to make coolant heater work (haven't needed it yet)
 And probably a list of other small details.
 
As I said, it drives, does burnouts, and gets me to work and back every day without issue as it is. I'll be fairly picky about what I take for it and who I'll sell it to. The buyer will have to have some solid electrical engineering skills, though I've done the real hard work. Considering the performance of this car, I'll also be looking for fairly reasonable offers. This thing does 0-60 around 5 seconds, looks great, and never requires fuel 

If anyone is interested and thinks they're up for taking over this project, let me know.


----------



## yuppie scum (Aug 21, 2017)

Wish I had a garage, I'd enjoy this! 

Do check in with your review of the Model 3!


----------



## Hubrisdog (Sep 21, 2017)

bigmouse said:


> If anyone is interested and thinks they're up for taking over this project, let me know.


*slowly raises hand*


----------



## bigmouse (Sep 28, 2008)

Posted a for-sale ad in the classifieds: http://www.diyelectriccar.com/forums/showthread.php/fs-2001-bmw-330ci-conversion-300-189786.html

Also, here's a 0-60 Video with the gear selector in the "sport" position (using both gears).


----------



## crasbe (Feb 21, 2016)

I've followed the project on Hackaday and stumbled over this forum one day. I plan on doing a similar conversion, when the engine in my E46 318i dies. Will you share your findings about the Lexus inverter?

Using the Lexus inverter seems like the more reasonable option than reinventing the wheel.


----------



## bigmouse (Sep 28, 2008)

crasbe said:


> I've followed the project on Hackaday and stumbled over this forum one day. I plan on doing a similar conversion, when the engine in my E46 318i dies. Will you share your findings about the Lexus inverter?
> 
> Using the Lexus inverter seems like the more reasonable option than reinventing the wheel.


I'll probably open it up once it's sold since I'll have to share all the details with the buyer anyway so they can continue tinkering with it.


----------



## hilux.2sv (Nov 28, 2017)

@bigmouse: That's a impressive work you have done! Would be great if you make it open to other people when your car is sold.
There are so much Toyota/Lexus hybrid drivetrains and components in the junk yard (and cheap too). These have a big potential to be the ultimate conversion parts for DIY electric car builders.
Maybe we could set up some GitHub projects for it (like for the EVTV GEVCU). So every one who has some knowledge about this stuff can contribute to this project.

I'm an electronics engineer (from Berlin, Germany) and have a lot of experience with designing PCBs and programming microcontrollers (AVR XMEGAs, ATmega64M1 CAN/LIN controllers, ...) and did some projects with the Arduino Due too (started with the GEVCU).
Besides you didn't use your own controller board I'm very interested in the schematics and source code, too. Your PCB work is awesome!
I ordered some Tamagawa AU6802N1 resolver to digital converters from Hong Kong, a Teensy 3.2 and already got the Freescale MKV10Z32VLF7 microcontrollers. Will play with these a little bit.
With the Toyota/Lexus hybrid drivetrains I'm very familiar. We had a 3rd gen Prius, now an RAV4 hybrid AWD and a C-HR hybrid (not available in USA, same drivetrain like the 4. gen Prius). Did a lot of work on our other Toyota cars, so know how to wire these.

My project is one of our Hilux pickup trucks (from 2004, similar to the old Tacomas). It's build up from ground (everything sand blasted and powder coated) with a lot of new components and conversions. 
I'm not happy with the diesel engine (102hp, only EURO3, no DPF) and want a petrol hybrid or fully electric drivetrain.
The first idea was to put a whole Lexus GS450h drivetrain in it, but I'm not sure if I can get it to work properly since there are so much components involved. It's impossible to transfer everything. That would be a lot of work to get it fit and running (if ever possible).
The second idea is to do it similar to the conversion you did to your BMW. I already brought a lot of components for it: 

- Lexus LS600h transmission
- Lexus LS600h flywheel, flexplate and input damper
<Update>
- Not usable: Toyota Prado / 4Runner / FJ Cruiser 4wd full-time transfer case with lockable Torsen center diff and low-range for replacing the LS600h one
- New replacement: Toyota Sequoia JF3A transfer case out an vehicle with A750F/A760H/F transmission and 1URFE/2UZFE engine (JF1A out of a Tundra or JF2A out of a LC200 possible too)
<Update>
- LS600h inverter
- LS600h oil pump controller
- LS600h DC/DC converter
- LS600h electric water pumps
- LS600h small engine wiring harness with most transmission sensor connectors
- LS600h inverter connector with wire pigtails
- LS600h oil pump controller <-> oil pump motor wiring harness
- LS600h oil pump controller connector with wire pigtails
- LS600h HVC-ECU connectors with wire pigtails (3x, 4th is on the small engine wiring harness)
- LS600h HV-battery cable, for using it to power the 12 DC/DC, charger, maybe chademo
- LS600h HV A/C-compressor cable, for powering the Toyota/Lexus A/C-compressor and the Chevy Volt electric heater (one at a time)
- 2nd gen Prius HVC-ECU for parting out the 135-pin PCB-connector, re-used for Y-harness (monitoring) and new EVC-ECU
- 3rd gen Prius battery for testing only (I know it's just about 200 volts)
- Chevy Volt battery charger, electric heater (single wire CAN), electric water pumps
- Toyota MR2 electric servo pump
- Hella vacuum pump for electric/hybrid vehicles (from an VW Touareg Hybrid)
- KILOVAC EV200 battery contactors
- TE battery service disconnects with and without build in fuse
- Type 2 charging socket and charging cable (230V 1-phase)
- Lapp Kabel - shielded cable for battery, inverter, charger wiring
- built some GEVCUs and other small controller boards for interfacing different things on the car (mostly ATmega64M1/ATtiny167)

Currently I have no big battery pack but have access to someone who is using a 30kWh Winston battery pack for an scientific project. If I have the transmission running I will buy the batteries. Not sure about the BMS if I do my own or just buy an Orion-BMS for it. For A/C I'm planing to use the Lexus GS450h/LS600h electric compressor - currently I don't have that.

Would be great if you could share information how to wire the inverter and what data packets are needed for communication to get the motors running.

But thanks again for sharing your project and these inspirations!


----------



## hilux.2sv (Nov 28, 2017)

The GS 450h transmission (L110) motors have 134kW (MG1) and 147kW (MG2). Besides the transfer case I thought the LS 600h uses the same transmission (L110F), but the MG2 motor has a different power rating -> 165kW. For the MG1 I can't find a power rate, but if the power ratio is identical it should be around 150kW.

2010 LS 600h L product information:
http://pressroom.lexus.com/article_download.cfm?article_id=2657

2010 GS 450h product information:
http://pressroom.lexus.com/article_download.cfm?article_id=2654

However a total of 281kw/315kW is much more power than I need for my Hilux. Something in the range of 100kW to 150kW should be enough.
The Lexus inverter is designed for a working voltage of 650V. Because I don't need the full power and maximum motor speed, I would like to lower the battery voltage.
The question is, which voltage range is accepted by the Lexus inverter? How low can I go? What is the maximum peek battery voltage?
If I go with a nominal 576V battery pack, my voltage range would be from 504V to 720V. Don't know if this is acceptable.
Really need some help on this for planing/designing the system.

@bigmouse: Do you have experience, which voltage range would be necessary for the inverter?

Can I use the internal DC/DC converter to power my 288V equipment (A/C, 12V DC/DC, power heater, maybe in conjunction with the Lexus 288V/6.5Ah NiMH pack)?
If not I will switch the power periodically between the lower und upper 288V pack to keep an equal discharge level (can use the data from the BMS for that). For charging I need two of the Chevy Volt chargers, too.

@bigmouse: How do you charge your pack and power your equipment? 650V is too high for most components (limited typically at about 420V).


----------



## bigmouse (Sep 28, 2008)

hilux.2sv said:


> @bigmouse: Do you have experience, which voltage range would be necessary for the inverter?


I've run it at low as 12V! Obviously not much power down there, but it doesn't seem to mind and tries anyway.



hilux.2sv said:


> Can I use the internal DC/DC converter to power my 288V equipment (A/C, 12V DC/DC, power heater, maybe in conjunction with the Lexus 288V/6.5Ah NiMH pack)?
> If not I will switch the power periodically between the lower und upper 288V pack to keep an equal discharge level (can use the data from the BMS for that). For charging I need two of the Chevy Volt chargers, too.
> 
> @bigmouse: How do you charge your pack and power your equipment? 650V is too high for most components (limited typically at about 420V).


I use the on-board converter. It bucks down to around 330V when driving to power the HV/LV DC-DC, coolant heater, and an extra output for an air conditioning compressor (not currently used). For charging, I use a Chevy Volt charger and boost through the converter to charge the battery. This functionality is custom.


----------



## hilux.2sv (Nov 28, 2017)

bigmouse said:


> I've run it at low as 12V!


That's great. So I can reduce my pack voltage, if don't need the full power and speed.
But what is the allowed peak voltage for the inverter? Is it limited to 650V or can I go higher, e.g. 720V (if using a LiFePO4 pack with nominal 576V)?



bigmouse said:


> It bucks down to around 330V when driving to power the HV/LV DC-DC.


Because the 288V Lexus NiMH pack needs a charging voltage of around 330V. This make things a little bit easier. So I can use the Lexus HV/LV DC/DC converter, A/C compressor and the Chevy Volt coolant heater. 



bigmouse said:


> For charging, I use a Chevy Volt charger and boost through the converter to charge the battery.


Awesome idea, but I don't know how much custom logic I have to implement for that. Maybe it's easier for me too split the pack into two equal packs and use two Chevy Volt chargers for charging them.
Same with the CHAdeMO DC fast charging... doesn't work with the 576V pack (500V top). But if limited to 35kW charging power maybe it's possible with the built-in DC/DC converter, too.


----------



## bigmouse (Sep 28, 2008)

hilux.2sv said:


> That's great. So I can reduce my pack voltage, if don't need the full power and speed.
> But what is the allowed peak voltage for the inverter? Is it limited to 650V or can I go higher, e.g. 720V (if using a LiFePO4 pack with nominal 576V)?


I haven't tested the maximum voltage since that is likely to be a destructive test. I've overshot on accident above 700V a few times, but I haven't tried to operate there.


----------



## hilux.2sv (Nov 28, 2017)

So I will go with a 512V / 60Ah pack with a top voltage of 640V too keep it on the safe side. My total capacity is then about 30kWh and hopefully I will get a save range of about 80 to 100 km. The battery voltage is in the range of 448V to 640V with this 160 cell pack.
Unfortunately the output shaft to the transfer case of the L110F (LS600h) transmission has 19 splines and a diameter of 34.5mm. It will not fit my Toyota T-case with the 23 splines input... have to get an adapter spud shaft or coupler first. Will talk to Advance Adapters if they have something in stock.
Anyway A housing adapter has to be custom made to get these two together.


----------



## bigmouse (Sep 28, 2008)

Okay, I haven't been pushing this for sale since I haven't been eager to sell it (it's too much fun!). The time has come to actually put some effort in to selling it though, so please get in touch if you're interested.


----------



## bigmouse (Sep 28, 2008)

Also willing to part out, though that would make me sad.


----------



## hilux.2sv (Nov 28, 2017)

@bigmouse: That's a great car you built. Hope you will find a buyer for it.
If you really want to part it out (I don't hope so), I would be very interested in your control electronics for the inverter. Don't know if the GS450h inverter will work correctly with my LS600h transmission.

Got a little progress mating my transfer case to the hybrid transmission. Because nobody seams to make an shaft coupler or spud shaft which could be used, I decide to use a different transfer case.
After some weeks of research, a lot of e-mails and forum posts I found the one which could fit the hybrid transmission - a Toyota JF1A (2WD/4WD), JF2A (AWD/4WD) or JF3A (2WD/AWD/4WD). These are out of a 2nd gen Tundra, Land Cruiser 200 and 2nd gen Sequoia. But only cars with the A750F or A760H/F transmissions and the 1URFE or 2UZFE engines have the 19 spline input shaft (diameter 34.5mm, diameter at seal 51mm ). The others have a 22 spline shaft.
The shaft should fit (still trying to get one to Germany) but a housing adapter or modified transmission tailhousing is still necessary. So some fun with Solidedge and the CNC machine at work.
For locking the input shaft I got the flywheel / flex plate / input damper from the donor car instead of using a clutch disc. For converting from manual transmission to an automatic setup, I brought the full AT shifter assembly and brake pedal out of an 3rd gen Toyota 4Runner. These will fit with just minor modifications in my Hilux.

@bigmouse: Did you use the Lexus electric oil pump controller or your own electronics for the oil pump motor? What about the mechanical driven oil pump/squirter at the blocked transmission input shaft? Is it needed for cooling and lubrication of MG1 and/or the power split device? Do you drive it with an additional small electric motor?


----------



## bigmouse (Sep 28, 2008)

hilux.2sv said:


> @bigmouse: That's a great car you built. Hope you will find a buyer for it.
> If you really want to part it out (I don't hope so), I would be very interested in your control electronics for the inverter. Don't know if the GS450h inverter will work correctly with my LS600h transmission.


Everything that I found showed that the LS600h and GS450 transmissions were identical internally. Only differences being the bellhousing and the transfer case. I don't see any reason a GS450h inverter wouldn't work on an LS600h transmission, once you got the phase wires connected.



hilux.2sv said:


> @bigmouse: Did you use the Lexus electric oil pump controller or your own electronics for the oil pump motor? What about the mechanical driven oil pump/squirter at the blocked transmission input shaft? Is it needed for cooling and lubrication of MG1 and/or the power split device? Do you drive it with an additional small electric motor?


I used the stock oil pump controller from the Lexus. The input shaft on my transmission is locked, so the mechanical pump doesn't move. The electric pump is used for EV mode and to power the brakes for gear shifting. As far as I know, it's in parallel with the mechanical pump.


----------



## steven4601 (Nov 11, 2010)

Hi Vincent,

Awesome project & seriously good reverse engineering . You inspired me to order a few parts to play with also. 

Do you know if the LS600h inverter drive share similar control commands to get going? 

Kind regards,
Steven


----------



## hilux.2sv (Nov 28, 2017)

I believe the Lexus inverters from the GS450h and LS600h are quite identically. The control commands for both and even others (Camry, RX400h, ... ) should be the same. But the tuning and parameters for MG1 and MG2 will be different. Not sure about the GS450h and LS600h transmissions... these seam to be the same, but MG2 has different power ratings. I didn't found the rating for the MG1 in the LS transmission.
However that doesn't mean the motors are not identically. Maybe just a different setup in the inverter firmware.
So controlling both should be the same. If a GS inverter works with the LS transmission? ... someone has to try it, but Bigmouse thinks it will work.
I have the LS600h transmission and inverter, so we are in the same boat. Maybe we could support each other.


----------



## hilux.2sv (Nov 28, 2017)

Steven and I try to figure out the wiring and signals for the inverter, but need some help on this.
The communication between the hybrid vehicle control ECU and the inverter looks like a kind of differential SPI bus or synchronous serial bus (synchronous USART mode). Maybe Lexus uses CAN transceivers for transmitting the SPI signals differentially.

The signals are:
HTM+/- --> MOSI?
MTH+/- --> MISO?
CLK+/- --> SCK
REQ+/- --> bidirectional request/interrupt line?
HSD --> Shutdown, from HVC-ECU?, bidirectional?, low or high active?
ILKI --> interlock to HVC-ECU, all okay --> low level?
ILKO --> interlock from interlock switch, all okay --> low level
GO/G1/GI --> don't know, maybe a kind of vehicle or engine speed signal? Generator mode? Do we need this?

@bigmouse: We have a lot of questions. Can you please help us understanding these signals. Can you explain the communication between the HVC-ECU and the inverter?

What is the SWP signal from the inverter water pump? A pulse signal for monitoring if the pump is running or an pump enable signal?

What are the signals OPST and SIG for the oil pump controller? Where gets the oil pump controller the power ground?
SIG --> switched power ground?
OPST --> pulse signal for monitoring if the pump is running or enable signal for the oil pump controller? high active?

Do you measure the transmission revolution sensor and the oil pump, MG1, MG2 and transmission temperature sensors with your own controller?

Thanks a lot for helping!


----------



## hilux.2sv (Nov 28, 2017)

We now have some more information after studying the wiring diagrams and DTC repair documents.

Signals from HVC-ECU to INVERTER/CONVERTER:
Pin 23/22 HTM+/- --> MOSI, differential using CAN transceiver, about 60...100 bytes (1.6ms), 120Ohm termination on both ends
Pin 21 DRN1 --> shield for HTM+/-
Pin 3/2 MTH+/- --> MISO, differential using CAN transceiver, about 60...100 bytes (~1.6ms), 120Ohm termination on both ends
Pin 1 DRN2 --> shield for MTH+/-
Pin 14/13 CLK+/- --> SCK, differential using CAN transceiver, about 500kHz, 120Ohm termination on both ends
Pin 12 DRN4 --> shield for CLK+/-
Pin 34/33 REQ+/- --> select from HV-ECU to INV/CONV, differential using CAN transceiver, about 3ms, repeated every 4ms (250Hz), 120Ohm termination on both ends
Pin 32 DRN3 --> shield for REQ+/-
Pin 25 HSDN --> emergency shutdown, from HVC-ECU (monitored for fault detection), high active, 3kOhm pull down resistor
Pin 36 DRN8 --> shield for HSDN
Pin 35 ILK1 --> interlock out to HVC-ECU, all okay --> low level, gnd
Pin 24 ILK0 --> interlock in from interlock switch, all okay --> low level, gnd
Pin 16 G1 --> petrol engine speed signal input, about 12,5Hz at idle
Pin 5 DRN5 --> shield for G1
Pin 10/11 +B/+B2 --> from IGCT2 relay (IG), fuse 10A
Pin 30/31 GND1/GND2

inverter water pump:
Pin 3 SWP --> pulse output to HVE-ECU, about 8Hz, pump monitoring
Pin 4 +BWP --> from IGCT relay (IG), fuse 10A
Pin 1 GND

oil pump controller:
Pin 6 SIG --> form HVC-ECU open-collector output, 1kHz PWM, speed signal
Pin 7 OPST --> open-collector output, 100Hz PWM, oil pump status signal
Pin 5 +B --> from oil pump relay (BAT), fuse 60A
GND --> oil pump controller chassis

I got all connectors:
- HVC-ECU 4x cable connector + PCB one (out of an Prius II HVC-ECU)
- INVERTER/CONVERTER connector
- oil pump controller connector
- HV battery and A/C compressor cables
- oil pump motor and transmission sensor wiring harness.

The LS600h HVC-ECU connectors are the Tyco Electronics Multilock .025/.040 series. Have all crimp terminals, housings and tools.

Next: 
Making an Y-adapter with these parts and a 4-channel CAN-transceiver monitoring board. We want to use this to monitor the INVERTER <-> HCE-ECU bus signals on my RAV4 hybrid. Connectors are the same but with different pin-out.

Would be really nice if could get more information about the communication protocoll...


----------



## Thaniel (May 25, 2008)

Love the build. Wish it wasn't on the other side of the country. Your asking price seems quite reasonable.

Just finished reading the entire thread (and took notes). Sounded like you had planned to make and sell some controls. Where does all that stand? I'm thinking of starting up another EV project this fall.

Thaniel.


----------



## hilux.2sv (Nov 28, 2017)

Made some measurements on my RAV4H AWD in ignition on mode, not ready mode. HVC-bus communication between HVC-ECU and inverter:

yelllow -> REQ
green -> CLK
red -> HTM
blue -> MTH


----------



## Marianoooo (Oct 12, 2018)

Bigmouse, that's an impressive work you have done! Congratulations! I have question about removeing the Boost IGBT and the inductor: it's because IGBT is rated 30KW? And if You use standard Lexus voltage 250V output power will be only 30KW?

bdw, did You sell the car? All coumminity is waiting for relising the project and use cheap used transmissions and convetrers. Maybe You can start Patronite support?


----------



## bigmouse (Sep 28, 2008)

Marianoooo said:


> Bigmouse, that's an impressive work you have done! Congratulations! I have question about removeing the Boost IGBT and the inductor: it's because IGBT is rated 30KW? And if You use standard Lexus voltage 250V output power will be only 30KW?
> 
> bdw, did You sell the car? All coumminity is waiting for relising the project and use cheap used transmissions and convetrers. Maybe You can start Patronite support?



I left the inductor and converter in because they were used for both charging and driving. For charging, I used the Chevy Volt charger to output 380V and boosted that in the converter to charge the HV battery. For driving, I bucked the HV battery down to 340V to run the DC-DC converter and heater. No traction power went through it.


I did sell the car! The listing got picked up by Jalopnik and I got several offers shortly after.


----------



## Marianoooo (Oct 12, 2018)

That good news, congratulations- this car is a piece of engineering art.


Is it possible to dream come true and make more cars like yours:


bigmouse said:


> I'll probably open it up once it's sold since I'll have to share all the details with the buyer anyway so they can continue tinkering with it.


----------

