BMW E46 Coupe Conversion

Tell us about the project you do with the open inverter
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

BMW E46 Coupe Conversion

Post by sonachan1 »

Time to introduce my project car, a 2005 BMW E46 Coupe
E46 Picture.png
It's had one careful owner and 9 not so much who have done 125000 miles in it. Most of the oil and water is on the outside of the engine. It runs on petrol, but sounds like a diesel some of the time, but not to worry about any of this.

I've spent the last few months sorting out a few things on it, like reconnecting the front suspension to the rest of the car (common fault on these). Now I'm waiting for the weather to get better so I can take the engine and gearbox out and get started.

A bit strange for this site, but this is going to be a DC conversion. Why? Because I've been given a forklift motor which is greatly appreciated. The car will need a diesel diff to go with it.

I'm planning to build a Prius based inverter, probably based on Huebner hardware, following along with Damien's reverse engineering project. Then tweak the firmware to provide DC PWM. Later, if I decide to go AC, I can convert the inverter back to AC with firmware. I'll need the CANBus side of the Huebner hardware to keep the lights out on the dashboard.

I've got a Brusa NLG513 charger on the shelf which just leaves the batteries. If anyone knows where to get a set of leaf, i3 or chevvy volt / Vauxhall ampera batteries at a decent price in the UK (preferably in the northwest) I'd appreciate some advice!
User avatar
johu
Site Admin
Posts: 5911
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 180 times
Been thanked: 1109 times
Contact:

Re: BMW E46 Coupe Conversion

Post by johu »

Cool :) Are you going to modify the firmware for DC motor control paralleling the 3 phases?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

Re: BMW E46 Coupe Conversion

Post by sonachan1 »

Over the weekend, I managed to work out the messages I'd need to keep the lights out on the dash. I used an Arduino Due with Damien's EVShield, GVRET and Saavycan.

I've posted some files on my github page: https://github.com/andymartell/e46

If you're interested, there's a spreadsheet with some decoded messages, and a couple of files for use with SavvyCan including a dbc file to decode the messages. Many thanks to Thaniel and others for their work on this subject.

I should mention that my car has an N46 4 cylinder engine.

I found the two messages required to prevent the ABS lights coming on were:

0x316 DME1 0x05 0x00 0x00 0x19 0x00 0x00 0x00 0x00
0x329 DME2 0x11 0x00 0x00 0x00 0x00 0x00 0x00 0x00

The message content is lsb -> msb. Both transmitted at 10ms interval.

For 0x316:

byte 0, bit 0 signals key on
byte 0, bit 2 signals ignition on / DME ready
bytes 2 and 3 are the engine speed /6.4 -> 0x1900 = 6400 = 1000rpm

0x329 is more interesting.

byte 0 in my functioning DME is a cycling set of 4 numbers 0x11, 0x40, 0x8C and 0xD3, changing every 70ms. However, I found that the ABS system was happy when this byte was set to 0x11. It wasn't happy when it was set to 0x00.

I cut the CANBus signal to the DME and added a connector inline so I could disconnect it. I added a pair of wires to the CANBus on the back on the instrument cluster and ran them to a connector in the small coin box next to the steering wheel.

So I can connect Arduino and SavvyCan inside the car. With the DME disconnected from the CANBus I can still start the engine and with the Arduino sending the messages above, I could drive down the road without any dashboard lights.

When there was no-one else around I was able to test the ABS still works also without dashboard lights.

There are also no lights when the DME is completely disconnected.

In the UK, a car will not pass the MOT (government) test with warning lights on the dashboard, so I'm happy I have a workaround for this now!

One strange thing I noticed. SaavyCan can playback a log file onto the CanBUS. I used this feature to find out which DME messages were essential. As the file was playing back I could hear a strange motor noise from the front of the car. When I looked I could see the Xenon headlights initialising as the 'simulated engine' started. I guess it's done to hide the noise under the noise of the engine, but I'll be able to hear it when we're under electric power. Nothing to be done about it, just funny.
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

Re: BMW E46 Coupe Conversion

Post by sonachan1 »

Hey johu, yes I was thinking that. I'm a bit worried the single IGBTs might be a bit underrated current wise.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 88 times
Contact:

Re: BMW E46 Coupe Conversion

Post by Jack Bauer »

Fantastic info. I'm going to be starting on an E46 touring conversion soon with very similar engine characteristics to yours except its an m54. Is it the Gen 2 prius inverter you intend to use?
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 88 times
Contact:

Re: BMW E46 Coupe Conversion

Post by Jack Bauer »

Do you get the dsc lights to go out also with those messages?
I'm going to need a hacksaw
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

Re: BMW E46 Coupe Conversion

Post by sonachan1 »

Hey Damien,

Yes, the DSC lights were off. That didn't happen until I sent the 0x11 byte on DME2 and it only happens if that message is there following a power cycle of the ignition, i.e. if the lights are on, they don't go off just by sending the message until you key off and on again.

The ABS is definitely still functioning as I tried that on a stretch of empty road whilst holding on to the laptop with one hand! The DSC is a bit harder to test. I suspect it will work to a certain extent, but the DSC does send torque reduction messages to the DME which won't be implemented. Having said that, I'm expecting this to be more of a gentleman's carriage rather than an out and out sports car!

Prius Gen 3. I'm following along with you. How are you getting on with it? If its a bit down your list of priorities, let me know and I'll start knocking a board up. I was holding off as I didn't want to duplicate effort.
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

Re: BMW E46 Coupe Conversion

Post by sonachan1 »

Battery's arrived. 30kWh Nissan Leaf. Will probably do some reverse engineering of the Canbus while I'm here.
Attachments
leaf battery.jpg
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

Re: BMW E46 Coupe Conversion

Post by sonachan1 »

Not wanting to be outdone by Mr Bauer, I finally got the engine and gearbox out of my E46 coupe.

Here's the engine coming out and the hole that's left over:
Engine out.jpg
Engine Bay.jpg
I started thinking about how to measure the flange on the gearbox. I decided to make some plugs with a small hole in the centre to measure to. Here's the gearbox with its protective layer of oil. No wonder the clutch juddered!
Oily Gearbox.jpg
Here's the same gearbox cleaned up:
Clean Geabox.jpg
Next up, get the motor mounted up and get the inverter sorted!
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

Re: BMW E46 Coupe Conversion

Post by sonachan1 »

Its been a while since my last post. I realised that I'd been going off in all sorts of directions (controller, battery, BMS, power steering, vacuum brakes..........) rather than focussing on one thing at once.

So, first up, get the motor and gearbox back in the car and add the front to back wiring underneath so it can go back down on its wheels.

My conversion is DC, and one of the problems was the air vents on the motor which need blanking off and ducting away from any direct water and dirt.

After a bit of cowboy modelling on Fusion 360, I came up with this duct which fits quite nicely with some bent and rolled aluminium plate. After a few hours on the 3D printer:
IMG_0267.jpeg
The corrugated tube is for wiring for a couple of temperature sensors.

The duct for the other end is on the printer now.........
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

Re: BMW E46 Coupe Conversion

Post by sonachan1 »

Had a couple of good days on the E46. Got the coupler sorted out and the proximity sensor to measure RPM:
E46 Coupe Coupler.jpg
and got the motoring gearbox back in:
E46 Coupe DC Motor.jpg
Had it running on a 12V battery. All good so far.

Just laying in some ducting for the battery cables underneath, then I can put it back on its wheels.

Also, need to make a front motor mount. Currently I'm using the Jack Bauer patented acme plywood block!
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 88 times
Contact:

Re: BMW E46 Coupe Conversion

Post by Jack Bauer »

Looks excellent. One thing I do love about DC motors is the simplicity.
I'm going to need a hacksaw
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

Re: BMW E46 Coupe Conversion

Post by sonachan1 »

Been a little while since my last update, but made a bit of progress.

Added some conduit under the car for the rear battery cables:
IMG_0314.jpeg
Got it back on 4 wheels and ran the E46 on a 12V battery and achieved 'First Roll'!



Meanwhile the PCBs turned up for the Prius based DC controller. After a bit of microscope action, I'm ready for a bit of testing:
IMG_0529.jpeg
Its a mash up of a couple of Damiens designs. The simple DC controller generates the PWM for the motor, the Arduino Due Sam 3X from the Tesla Gen 3 controller will be controlling the contactors and sending Can signals to the rest of the car and the board layout is from the Prius controller! There's also a space on there for either an ESP8266 module, or an ESP32 module which I'm thinking will be able to transmit using BlueTooth LE.

Once I've corrected a few errors, I'll post the circuit on Github for those who are interested.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 88 times
Contact:

Re: BMW E46 Coupe Conversion

Post by Jack Bauer »

Sweet work :)
I'm going to need a hacksaw
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

Re: BMW E46 Coupe Conversion

Post by sonachan1 »

Another couple of steps forward over the past few days.

Started putting the firmware together for the controller. Can signals up and running and contractor control working.

Just done the first low voltage test run using a 12V battery and starter motor. It works!

User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 88 times
Contact:

Re: BMW E46 Coupe Conversion

Post by Jack Bauer »

Cool:)
Just be wary of running the power stage with a motor without the cap connected. Very easy to get a spike of sufficient voltage to damage the igbts even with a low voltage input. The cap can be removed from the top cover quite easilly if required.
I'm going to need a hacksaw
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

Re: BMW E46 Coupe Conversion

Post by sonachan1 »

Ah, yes good point. I got all excited that it was actually working!

I think the next thing is to build up the HV Junction Box and where to fit it. Had to resort to a bit of CAD:
E46 engine bay.png
The slightly opaque parts represent the engine bay components.

Time to order some bits and hope the rain holds off for long enough to get the welder out!
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

Re: BMW E46 Coupe Conversion

Post by sonachan1 »

There are some days when you suddenly feel like you're making some progress and I have a couple of those this weekend!

Got the front motor mount sorted. Zafira PAS pump installed and running. No leaks!

And made a mounting frame for the inverter:
IMG_0626.jpeg
Decided to put all the batteries in the boot, no need to worry about waterproofing them in there. Next thing to build up is the HV contactor box. Have all the parts, just need to work out where to put them.
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

Re: BMW E46 Coupe Conversion

Post by sonachan1 »

Inspiration for the power steering came from Damien's Red Arrow video:



Parts I used as follows:
  • Zafira B or Astra H TRW Power Steering Pump
    Pressure port: M16x1.5 to 1/4" BSP male adaptor, 16mm Dowty Seal (sealing surface not particularly flat), 90 degree female swivel to male elbow
  • Pressure hose: 750mm 1/4" BSP female swivel (pump pressure port, connected to elbow) to 1/4" BSP female 90 deg compact elbow (rack end)
  • Steering rack pressure port: M14x1.4 male to 1/4" BSP male adaptor and copper sealing washer
  • Steering rack return to pump inlet: Cut off rack banjo, new sealing washers. Used reinforced hose and jubilee clips both ends.
Connections
  • Red - permanent 12V supply (via 50A fuse when properly connected)
  • Brown - ground
  • Black and Blue/White - connect to 12V to run
  • Brown/White - leave unconnected
My pump takes a few seconds to run up so it wasn't immediately obvious that something was happening when I first connected up!
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 88 times
Contact:

Re: BMW E46 Coupe Conversion

Post by Jack Bauer »

Any updates on this? Keen to see how the controller works:)
I'm going to need a hacksaw
sonachan1
Posts: 64
Joined: Sat Dec 15, 2018 5:46 pm
Location: Cheshire, UK

Re: BMW E46 Coupe Conversion

Post by sonachan1 »

Hey Jack,

A bit slow I'm afraid. Working outside so sometimes the weather gets the better of me. Trying to get things together to do a road test. Just putting the battery pack together. I was thinking today that an estate would be better than a coupe!
IMG_1107.jpeg
mattndex@gmail.com
Posts: 15
Joined: Sat Feb 08, 2020 11:31 am
Location: South Africa

Re: BMW E46 Coupe Conversion

Post by mattndex@gmail.com »

sonachan1 wrote: Mon Jul 29, 2019 6:33 pm Been a little while since my last update, but made a bit of progress.

Added some conduit under the car for the rear battery cables:

IMG_0314.jpeg

Got it back on 4 wheels and ran the E46 on a 12V battery and achieved 'First Roll'!



Meanwhile the PCBs turned up for the Prius based DC controller. After a bit of microscope action, I'm ready for a bit of testing:

IMG_0529.jpeg

Its a mash up of a couple of Damiens designs. The simple DC controller generates the PWM for the motor, the Arduino Due Sam 3X from the Tesla Gen 3 controller will be controlling the contactors and sending Can signals to the rest of the car and the board layout is from the Prius controller! There's also a space on there for either an ESP8266 module, or an ESP32 module which I'm thinking will be able to transmit using BlueTooth LE.

Once I've corrected a few errors, I'll post the circuit on Github for those who are interested.
Good day, just stumbled upon this thread. I am curious about how you were able to control a DC motor using the Prius inverter.
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: BMW E46 Coupe Conversion

Post by konstantin8818 »

mattndex@gmail.com wrote: Sat Mar 21, 2020 10:24 am Good day, just stumbled upon this thread. I am curious about how you were able to control a DC motor using the Prius inverter.
It was written above:
Its a mash up of a couple of Damiens designs. The simple DC controller generates the PWM for the motor, and the board layout is from the Prius controller
mattndex@gmail.com
Posts: 15
Joined: Sat Feb 08, 2020 11:31 am
Location: South Africa

Re: BMW E46 Coupe Conversion

Post by mattndex@gmail.com »

konstantin8818 wrote: Sat Mar 21, 2020 11:09 am
mattndex@gmail.com wrote: Sat Mar 21, 2020 10:24 am Good day, just stumbled upon this thread. I am curious about how you were able to control a DC motor using the Prius inverter.
It was written above:
Its a mash up of a couple of Damiens designs. The simple DC controller generates the PWM for the motor, and the board layout is from the Prius controller
My apologies, I should have been clearer, I meant with reference to the github files. I am currently in the process of trying to control a DC motor and the prospect of using the Prius parts intrigued me.
User avatar
konstantin8818
Posts: 287
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Been thanked: 5 times

Re: BMW E46 Coupe Conversion

Post by konstantin8818 »

I believe you can find usefull information here: https://github.com/damienmaguire?tab=repositories
Or politely ask Jack Bauer ;)
Post Reply