Page 1 of 2

BMW E87 2006 with Leaf motor

Posted: Wed Apr 29, 2020 7:50 pm
by damian.lo
Hi all,

Some time ago I've started my conversion of BMW E87 from 2006 year. I tried many times to put my project into this section, but I had limited time to divide this between homemade conversion and asking all of You for help in my troubles :)
So, from beginning:
First I tried to fight with v2 board, which I already did and is working well with my powerstage and big foil capacitors but then Johannes improve old version and did v3 board, what was perfect for my conversion, because I had original Leaf motor EM57+inverter.
My setup now is:
- EM57 motor from 2012 year
- Leaf battery pack, but with 80 cells and about 320V fully charged
- charger from Volvo V60 plug-in bought with type 2 charging connector - also found on Arber's blog
- DCDC from Chevrolet Ampera - thanks Arber for Your help ;)
- Orion BMS - almost perfect stuff, but not so cheap
- Vacuum pump from Audi
- power steering pump from Opel Astra - is working well but works like jet turbine
Rest of components I will show in next posts, I hope. I'm working in aluminium extrusion plant, so don't be surprised, that there are so many alu profiles :)

Here is first trial to made motor holder. Fits in original gas motor handle
IMG_2211.jpg
Like I said, I used V60 socket. Fits under original filling cover and have 3 color status LED - Later I want to connect them
charging socket.jpg
Trunk packet - 24 cells (in fact 48) - original from Leaf battery fits perfect.
On left side is fuse holder and on right side will be Orion BMS on top.
back_24-48cells.jpg
Underbody pack where was tank. Of course BMW can't do regular form, so was not so easy to discover how to put this on original bolts.
battery pack_down2.jpg
After some weeks on trials with spline, coupler, trials with parameters and CAN control, was time to do harness.
under hood_1.jpg
My CAN setup now is now divided:
CAN1: BMW (throttle, brake, instrument cluster, etc) -inverter
CAN2: OrionBMS, charger, DCDC
I will try to put everything in one CAN, if will be no problem with communication, I will left like this.
Now looks like this. Better but still needs some works, covers and DCDC cooling. I will use original motor cover, where was air intake to filter. Will be driven to DCDC, should be enough, I hope.
under hood_2.jpg
After months of work now car is working. First test trials on road was great! Acceleration according to original 1,6l gas was like a rocket :)
Now I have to work with instrument cluster rpms and still blinking check-engine information (of course hundred of sensors are missed :)
In next post I will show how I connected powersteering and what was important in tubing, what I did't know.
Regards.

Re: BMW E87 2006 with Leaf motor

Posted: Wed Apr 29, 2020 8:01 pm
by Kevin Sharpe
Great project, thanks for sharing :)

Re: BMW E87 2006 with Leaf motor

Posted: Wed Apr 29, 2020 8:38 pm
by arber333
Haha! Really nice. You are ahead of me! I only just spun my wheels. 8-)

Re: BMW E87 2006 with Leaf motor

Posted: Sun May 03, 2020 7:25 pm
by damian.lo
Hi,

Like I said last time I will show, how I connected EPS.
Like probably everyone here I used TRW pump. Mine was used in Opel Astra. Original powersteering in my E87 was driven by belt, so I left everything like was previously and replaced tubing for right length and connectors. I used standard hydraulic tube for max. 300 bar.
On picture below is visible tube with modified last connector. Good that guy, who crimped connector for me told me, that element selected on picture it is not normal connector, because I want to cut this :) This is one side valve and similar is on the return pipe. Without this You will feel jerking during steering.
EPS_tube.jpg
When I had a little more time to be an metal artist :) I did new cover for gear selector. Now is clear alu plate, but later I will anodize this. Small upper selector is for REV/FWD select. For now I did trial on second and third gear. On second probably I will go all the time in city and I feel that 3 will be used on highway, nothing else will be not necessary. What I tried, that on second gear and 3/4 throttle pressed I had current on DC side about 230A peak visible on Torque App with Orion BMS current sensor + OBD2 bluetooth dongle.
Can I go more?
lever.jpg
Zapatero - this is question to You, because I want to have not worst acceleration time than You ;)
For now when I will press Emergency button 12V and DC power relay to inverter will open. I hope this solution can't damage IGBT, what do You think?

Re: BMW E87 2006 with Leaf motor

Posted: Sun May 03, 2020 7:35 pm
by Isaac96
damian.lo wrote: Sun May 03, 2020 7:25 pm For now when I will press Emergency button 12V and DC power relay to inverter will open. I hope this solution can't damage IGBT, what do You think?
I've read on these forums (don't remember where) that interrupting power to the contactors can damage the IGBTs if the motor is spinning. This is because a permanent magnet motor does not require excitation current to produce power.
Could you wire the emergency stop to the EMCYSTOP input on the inverter controller? That would shut down PWM without risk of breaking IGBTs.

-Isaac

Re: BMW E87 2006 with Leaf motor

Posted: Sun May 03, 2020 8:03 pm
by damian.lo
This wrote Arber, even was speaking with me :)
I was thinking about this - what You wrote. My emergency input is connected via interface board to Leaf inverter directly so I hadn't this pin available. I don't know what Johannes thinks about this - original inverter is somehow secured itself? What do You think?

Re: BMW E87 2006 with Leaf motor

Posted: Sun May 03, 2020 8:38 pm
by Isaac96
damian.lo wrote: Sun May 03, 2020 8:03 pm This wrote Arber, even was speaking with me :)
I was thinking about this - what You wrote. My emergency input is connected via interface board to Leaf inverter directly so I hadn't this pin available. I don't know what Johannes thinks about this - original inverter is somehow secured itself? What do You think?
I don't have a Leaf inverter myself, I was just repeating what I've read about others :twisted:
As I understand it:
There doesn't seem to be a way to protect the inverter. The problem is that the back EMF from the motor keeps rising. This energy ends up on the HVDC rail. And if the battery is connected then it absorbs the energy as regen. But without a battery, there is nowhere for the energy to go and then the voltage rises too high and boom go the IGBTs.
I can't remember if the Leaf has 1200v or 600v IGBTs? Maybe this wouldn't be a problem with higher voltage ratings?

-Isaac

Re: BMW E87 2006 with Leaf motor

Posted: Sun May 03, 2020 9:58 pm
by arber333
No you should definitely leave your DC contactor ON.
Can you use your Emgcy button to just suspend pwm inside VCU? Is there an option?

Your DMW inspector will probably demand that a push of red button requires two separate actions to put vehicle in use again, not just one move of button.

Re: BMW E87 2006 with Leaf motor

Posted: Mon May 04, 2020 4:56 am
by damian.lo
I remember, that on Rev2 board emergency signal was available to use. In v3 board + leaf interface board there isn't this pin free for use. I have to look at schematic where Johannes connected this.
Maybe in fact better will be to leave contactor on and only shut down +12V to inverter or take off emergency signal inside of inverter. This is the worst if I'm thinking about one more time take out all of the stuff :)
In next week I will meet with inspector. In Poland first I have to collect all of necessary data (schematics, datasheet of components, etc.), then he will look at car, modified circuits and if all of this is ok he will give me his opinion (I hope will be good). Then with this "passport" You can go to normal car inspection, like with standard yearly inspection.

Re: BMW E87 2006 with Leaf motor

Posted: Mon May 04, 2020 6:19 am
by arber333
If you switch your inverter on with 12V this is your normal circuit. You can switch it off with a car key. Emgcy button then is your fallback circuit. In forklift DC world it took away GND connection to DC contactor to be sure of disconnect. In AC world we have a different problems. Here Emgcy switch needs to shutoff pwm but not 12V completely...

Isn't there a Fault line inside VCU circuit to pull pwm down? You could use this as input with GND connection.

What about CAN msg? Can you take away those? Then inverter would be silent...

Re: BMW E87 2006 with Leaf motor

Posted: Mon May 04, 2020 6:51 am
by damian.lo
Yes, right I will back with supply inverter from Ign, without interrupting by emergency input, this is more safety to IGBTs.
All of the inputs available in Leaf interface board from Johannes are:
- 10 = IN_BMS
- 14 = CANH *
- 15 = CANL *
- 16 = IN_FORWARD
- 22 = IN_START
- 23 = IN_BRAKE
- 25 = IN_REVERSE
- 28 = THROTTLE2
- 29 = THROTTLE1
- 38 = IN_CRUISE

- 44 = MTEMP1 *
- 45 = MTEMP2 *
And now: or I will need to open inverter and take out Emerg. signal, or make CAN bus interlock or use input 10 = IN_BMS to disable inverter, the same like undervoltage of battery.
What do You think, will be best solution?

Re: BMW E87 2006 with Leaf motor

Posted: Mon May 04, 2020 10:25 am
by arber333
I would go for BMS IN.
EDIT: Didnt Johannes say if you pull both FWD and REV signals to GND you disable pwm of inverter? You can remove both signals with following latching relay circuit and you still retain BMS input in case of undervoltage event to put your car in turtle mode...
You can make your signal with two DPDT relays in latching configuration that are locked by ignition key and if you push EMGCY button you take away GND connection to this circuit, a failsafe.
Then to start your motor again you would need to unlatch your emgcy button AND recycle your key to start position. This would satisfy every inspector and keep aux circuits in your car running while inverter PWM is off.

http://pwillard.com/?p=148
https://electronics.stackexchange.com/q ... hing-relay

Re: BMW E87 2006 with Leaf motor

Posted: Wed May 06, 2020 10:36 am
by damian.lo
Arber, You have right. Better is to save IN_BMS for BMS :)
Your solution is right with failsafe and resetting by ignition, but "pull both FWD and REV signals to GND you disable pwm of inverter" was not diverse?
If You want to go forward, you apply 12V to this input or to reverse input. If both are disconnected (open), inverter doesn't generate pwm. What I remember from rev2 board, for charging Johannes wrote, that applying 12V to both inputs disable PWM, to don't drive while charging. Wasn't like this?
Of course Your logic solution for my trouble is good, thanks for that.

Re: BMW E87 2006 with Leaf motor

Posted: Wed May 06, 2020 11:00 am
by arber333
damian.lo wrote: Wed May 06, 2020 10:36 am Arber, You have right. Better is to save IN_BMS for BMS :)
Your solution is right with failsafe and resetting by ignition, but "pull both FWD and REV signals to GND you disable pwm of inverter" was not diverse?
If You want to go forward, you apply 12V to this input or to reverse input. If both are disconnected (open), inverter doesn't generate pwm. What I remember from rev2 board, for charging Johannes wrote, that applying 12V to both inputs disable PWM, to don't drive while charging. Wasn't like this?
Of course Your logic solution for my trouble is good, thanks for that.
Yes you are correct. If you apply solo FWD or REV you get a direction change. If you leave both lines open then internal pulldown resistors pull both pins to GND. So all you need to do is to cut both directional lines. You can do this easily with a DPDT contact relay. Try failsafe logic. When you switch 12V from key, relay is ON and it is conductinig both signals. But when you apply your EMGCY button you remove GND signal to relay and it will cut both direction signals.
All you need is one double relay.

Re: BMW E87 2006 with Leaf motor

Posted: Wed May 06, 2020 11:23 am
by damian.lo
Exactly. I will do like this. Now I have a little more time, because I'm making cover for under-car-battery pack, so car is blocked for some days. Then I want to put all of under covers of car floor and go with air cooling of Ampera DCDC. In Your opinion should be enough air, which usually go to air intake/filter?
I'm planning to use original motor cover from BMW and print 3d tubing from circular to rectangle, like is in this DCDC. Without fan will be enough cooling?

Re: BMW E87 2006 with Leaf motor

Posted: Wed May 06, 2020 1:37 pm
by arber333
damian.lo wrote: Wed May 06, 2020 11:23 am Exactly. I will do like this. Now I have a little more time, because I'm making cover for under-car-battery pack, so car is blocked for some days. Then I want to put all of under covers of car floor and go with air cooling of Ampera DCDC. In Your opinion should be enough air, which usually go to air intake/filter?
I'm planning to use original motor cover from BMW and print 3d tubing from circular to rectangle, like is in this DCDC. Without fan will be enough cooling?
I put DCDC in the trunk. I see it is not waterproof. So I advise you put it somewhere water can't get to it. I added alu sheet metal cover on its cooling fins. I put two low profile 12v fans 120mm on them. They are activated with 12v enable signal from the key. I am not sure how they handle cooling because I only used it for short period of time.

Re: BMW E87 2006 with Leaf motor

Posted: Wed May 06, 2020 7:16 pm
by damian.lo
I don't know if You saw how is mine DCDC under hood. Mine is transverse to the direction of travel, so possible water can't go directly to inlets. I will now let it like is, but according to Your cooling, maybe will be not necessary to put additional fans. Maybe car movement will be enough to cool it.
So, today I corrected power to inverter and tomorrow relay to cut direction lines and hope it will be for now enough.
I don't know now how to solve other problem with "check engine" light. Of course some simple signals is easy but what to do with camshaft, crankshaft, MAF and other signals (analog and some clock signals), what can be the best to bypass them?

Re: BMW E87 2006 with Leaf motor

Posted: Wed May 06, 2020 7:20 pm
by arber333
Heh, if you are in a hurry then remove those lights. You can argue that there is no cam and no crankshaft and no gas sensors...

I have engine light, Abs light and transmission light. Engine and transmission are not there and I will have to take my car to mechanic about ABS. I may also be missing RPM signal...
I need to keep computers in because immobilizer and other stuff needs ECU. And of course I don't have CAN but some French VAN system.

Re: BMW E87 2006 with Leaf motor

Posted: Wed May 06, 2020 7:42 pm
by damian.lo
Hah, I was thinking about the yellow light to take him out, but first maybe will be possible to give him what he needs. Johannes did bypass for all of signals in his Touran? Maybe this will be some good way.
In my E87 if I put speed signal via CAN, he is answering to me with ABS/ESP errors and from time to time rpm needle goes down, like some interference on CANbus (or ECU is fighting with inverter where needle should to be).
And yes, I can really say to inspector what You say, but... ;)

Re: BMW E87 2006 with Leaf motor

Posted: Wed May 06, 2020 8:11 pm
by arber333
Yes I cant get RPM signal to move the needle. I am still not sure if it is a zero crossing signal or some other signal.
As soon as i connect some resistance to RPM lines i hear a relay. I tried with different approach but i just cant seem to replicate RPM signal.
Speedo though is a simple magnetic sensor. I put one magnet on the driveshaft and i will have to divide signal by 6 and it will be close enough.

I even noticed my radio gets louder and steering tighter when speed is up :).

Re: BMW E87 2006 with Leaf motor

Posted: Fri May 08, 2020 8:18 pm
by arber333
I have to report that DCDC is getting quite hot if you dont provide cooling. Eventually it shuts itself down. I tried to mount two 12V fans to cool it down, but they only proivide some 1000RPM. I think i would need 3000rpm to adequatly cool DCDC!
Also i will rotate it so fins will face inwards from the sheet metal because they need airflow.

Re: BMW E87 2006 with Leaf motor

Posted: Mon May 11, 2020 7:28 pm
by damian.lo
Thanks Arber for reply, because it's important info.
So, for normal driving my setup seems to be ok with air intake (motor cover). Question is, what will be when car stays at standby? Probably there will be necessary to put fan :)

Re: BMW E87 2006 with Leaf motor

Posted: Mon May 11, 2020 7:50 pm
by Isaac96
How much load are you guys putting on the DCDC? Mine's in the trunk and I'm now afraid that I will have to add some cooling...

Re: BMW E87 2006 with Leaf motor

Posted: Mon May 11, 2020 8:52 pm
by arber333
Isaac96 wrote: Mon May 11, 2020 7:50 pm How much load are you guys putting on the DCDC? Mine's in the trunk and I'm now afraid that I will have to add some cooling...
I pull like 20A const because of the power steering pump and other stuff. At so small a load it has efficiency of 85%. If you load it more eff goes up!
I really need to cool the fins more. It can disengage by itself if it feels too hot.

Re: BMW E87 2006 with Leaf motor

Posted: Mon May 11, 2020 11:05 pm
by Isaac96
arber333 wrote: Mon May 11, 2020 8:52 pm
I pull like 20A const because of the power steering pump and other stuff. At so small a load it has efficiency of 85%. If you load it more eff goes up!
I really need to cool the fins more. It can disengage by itself if it feels too hot.
Yeah I'll be using at least that much power... Time to throw some fans in.
Thanks!