About 12 years ago the start-up I co-founded joined an accelerator programme. One of my takeaways from my time spent there (I was still running another business) was the phrase "JFDI", short for "Just f***ing do it." I think it is fair to say I have reached the JFDI stage on this project.

In April we are getting a load of building work done. This building work starts in the place I have currently stored a bunch of the body parts stripped from the car: bumper, wheel arch liners, etc. I need to clear this area, which means I need to have the car reassembled by April.

Fortunately, there has been progress while I've been quiet on the blogging front. That was for all the usual reasons: work, family, despair at the lack of variety in my life under lockdown. Mainly work though: thankfully that has been good, keeping me busy but funding this adventure.

Which leads me neatly to a confession: I have rather lost track of spending on this project. Or rather I had. What started as a passion project, and an educational project for my daughter, has become increasingly closely aligned with my work. In fact, it has helped me win some very interesting business. As a result my accountant advised me that my investments would constitute a legitimate business expense. Which was great, until he told me how much I had spent...

For now, let's just say that it is more than I imagined. When I'm done, I shall publish a budget based on what it would cost to replicate my project. But I shall say now that I might not be brave enough to share what I've actually spent. Though thankfully, I can say that the business it has helped to bring in more than covers the costs.

Anyway, back to JFDI. What has happened in the last two months?

  • I've got the board fixed after a few attempts and my inverter now seems to be working fine (this one sentence hides a lot of pain)
  • I've overcome some issues with the resolver, which works out the position of the motor rotor (this sentence hides hours of swearing)
  • I have my charger mostly working (ditto)
  • I've made almost no progress removing the rear subframe... (Malcolm Tucker would blush at the swearing involved here)

And this is the real JFDI moment: this weekend, without fail, I will get those stuck bolts out. My epoxy-based scheme failed. Miserably. So I have filled the fuel tank with water. And I will be getting the welder out, to weld on some hex studs I can use to spin them off. With luck, the heat will also help to free them.

Then there is some refurbishment to do. I have bought kits to refurb both sets of brakes. I could probably do with new bearings but those can wait for now. The rear subframe needs a really good clean and a coat of paint. And all the brake lines need redoing.

Both sides of the rear spring mounts still need welding up - once that fuel tank is out - and there is a little repair welding to do at the front right corner. Then there are some brackets to weld in for the power steering pump - one is in and the other two are made and in primer.

Then it can all go back together. All of that. In a month. When I'm flat out with work. The only option? JFDI.

Charging ahead


It has been a while since my last update. My inverter control board was off getting repaired, the cold weather, rain and snow made outdoor work either unsafe or unappealing, and right up until the break I was buried with work. But getting there again now.

With everything else ruled out I decided to focus on my battery pack and charging. If you've been following this build blog you'll know I had SimpBMS running on a Teensy 3.2 to manage the batteries (5 cells from a BMW 330e hybrid) and a 3.7kw charger from a Mitsubishi Outlander PHEV (same as my motor). Since the last update I picked up a cheap Pod Point Type 1 charging point (£60 from Facebook) which doesn't have huge capacity but matches the charger. I had planned to modify the BMS software to control the charging but this required a bit more work than I realised. So in the short term I decided to experiment with a sketch for the Arduino Due shared by one of the forum members also playing with the Outlander charger.

This sketch has three inputs and one output. It pulls information from the charger over CAN about the battery voltage, AC etc. It connects to the PP (promixity pilot) pin of the charging port via a voltage divider. And it has a push button.

The charger itself connects to the other signalling pin from the charging port (I picked one of these up, also from an Outlander). When you plug in the charger, the Arduino sketch recognises that is plugged in and sends messages over CAN to the charger to tell it to start charging, and sets a target voltage.

I had a bunch of problems getting this all working. My charging handle had a lower resistance on the PP line than the person who wrote the sketch, so pulled the input pin to a level where the sketch went into an error state. The CAN transceiver I used received messages fine but refused to send them - I had to swap it out. But after some messing around there were some satisfying relay clunks and the system started charging.

I then started to look at the BMS and had to work out how to put it manually into the mode where it would monitor charging. There is a digital input for this which puts the sketch into the right state when pulled high, so it was just a question of identifying this from the code (pin 18 in this case).

With the BMS in charging mode I could monitor the voltage on my battery slowly climbing - I was limiting charging current to 1A out of a maximum of 15 since I didn't have any cooling hooked up to the charger or the batteries.

After a while the charger did get a little warm but everything was clearly working so I turned it off until I could add some cooling in. The batteries seemed to be absolutely fine so I just added a pump and a bucket of water to the charger for now. After an initial small leak, this worked fine with some tightened hose clamps.

The bigger challenge now is coding for the BMS since I don't want to add yet another chip into the system to control the charging. I have two spare pins on the connector that goes into the battery box. I'll need a way to turn the BMS on and flip it into the appropriate mode so that it can begin charging and monitor it. And I'll also need to get the external CAN interface working on it - something another forum member is kindly helping me with.

For now it's going to be more indoor work so that is a sensible goal for a January that looks to be pretty packed workwise. Though I did get contributions towards some new tools for Christmas and have invested in some things that should make (finally) getting the rear subframe out and fixing the rusted spring mounts. Hello 18V angle grinder & impact wrench...

Other stuff

Writing these posts is always good for reminding me that while I don't think I've done a lot, I actually have. Since the last post I have also:

  • Learned how to use SavvyCan to monitor and interpret CAN bus traffic, including writing my own DBC files - effectively little translators that turn the incomprehensible hex values includes in CAN messages into nicely marked-up signal readings like 'Battery Voltage' - see screenshot below for an example
  • Redesigned and reprinted the battery box connector to make it much simpler and more robust - see image below
  • Finished modifying the S-Box and all the relevant wiring from the BMW hybrid battery pack to replace my rather large and unwieldy (and expensive) high voltage junction box. No great loss as this can be used in future projects, but I could have shaved a few hundred quid off the cost of this project if I had done this first. Since this can sit inside the battery box, this also creates the space I needed to mount the charger under the bonnet.
  • Made some progress removing the rear subframe. All the brake lines had to be cut because the unions were completely seized but the handbrake cables are now out and I'm down to three very crusty allen-head bolts that don't want to move. They have been repeatedly soaked in WD-40 and cleaned with a wire brush. Next step when it's a bit drier and warmer is a few smacks with the hammer and maybe an assault with the new impact wrench.

Back to navigation

Rebuilding enthusiasm


It turns out that the inverter board failing and me smoking some components (see last installment) was just the beginning of a week of technological disasters for me. My broadband router failed, wiping out a morning while I tried to cobble together a working arrangement until I could get hold of a replacement. In the middle of that, my web server (actually a virtual instance) failed. How? I still don't really know. But that wiped out another day. Then my home automation server failed, leaving my workshop without light or heating while I fixed that. For the rest of the house, I have been careful to make sure there are manual backups. But my workshop is a little more...experimental.

This all came at the worst possible moment work-wise, when I was absolutely snowed under. Suffice to say, I've been a little bit stressed. And as a result, not a lot has happened on the car. The downtime I have had has largely been spent blowing stuff up on Destiny 2 on my newly acquired Google Stadia setup (what can I say, it was free), or drinking wine (not the healthiest coping mechanism I know).

Anyway, most of the critical tech is working again (knock on wood), I've hit my various deadlines, and I can start to think about the car properly again. The challenge now is rebuilding my enthusiasm - challenging in the face of a few failures and also the worsening weather, which does not make going outside and crawling under a car very appealing.

Outlander inverter

There are some things to do inside though. I've been working on getting the Outlander inverter working. (I'm updating the components page with information as I understand it). This unit looks to have been in a small engine bay fire. The low voltage connectors are a little bit...melty. But they still have all their pins and I successfully have the inverter turning on and spitting out CAN messages. I just don't understand them all yet. And early experiments to make it spin the wheels have been unsuccessful. I suspect some of the messages it is spitting out that I don't understand are errors.


To help me withg CAN diagnoses, I have bought an Arduino Due that I'm setting up for SavvyCan. But this is proving to be more challenging than expected. I can't get the sketch to run properly - it won't spit out anything to the serial terminal. So that needs some work as well.


Once I have that working, I plan to use it to get the BMS working properly. I had this set up wrong initially, with one CAN interface connecting to both the battery units and the rest of the car. Instead you should have two: one for the battery modules, and one for the rest of the vehicle.

With that in place, I want to get the charger running. There are some quirks to this as I need to have the BMS turn it on and off once the batteries hit target voltage. Hence focusing on the BMS first.

Safety box

One thing I have done is some work on the salvaged Safety Box from the BMW battery pack. Turns out this is a complete and very compact high voltage junction box. Others have already done the work decoding the CAN messages from it to get detailed voltage and current information. And it proved relatively trivial to rewire control of the pre-charge relay and contactors through the original connector, giving me a nicely compact alternative to my own, very large, junction box. So compact in fact that it will fit inside my battery box.

This solves two problems. First, it means that I don't need to worry about a safety disconnect: if the 12V is off, there is no way for high voltages to reach the battery box connections. Second, it frees up the space where the junction box sat so that the charger can go in its place, meaning I don't need to alter my battery box.

What I do need to do is sort out the design of the high voltage connector for the battery box, which proved not to work very well. That might be a project for this week in between work.

There's more info on the S-Box over on the components page as well.

Inverter repairs

In the meantime, I have stripped down the inverter and removed the broken board. Damien at EVBMW who supplied the board was very reassuring, telling me it probably wasn't me who fried it and has kindly sent me a replacement. So, board number three (!) is off to the soldering whizz this week so that I can get my inverter back up and running.

I think I am probably going to stick with the Prius inverter rather than switch to the Outlander one. That is great for some experimentation but the Prius inverter gives me lots of flexibility and things like direct control of the contactors. If I switch away from that I will have to make up some new hardware for the BMS to control the contactors and that just feels unnecessary.

Next steps

Still lots of work to do on the car itself, including welding up the rusty rear spring mount. Some new steel has arrived from Frost restorations for that, and I have also invested in a brake for folding brackets. These will be used for the repair patches for the spring mount but also for brackets for the power steering pump (which I have decided to relocate, based on advice from my daughter - she suggested the new location weeks ago and I have finally listened) and the heater, which I might as well get wired up while I'm at it.

I did get some way towards getting the fuel tank out, removing the spare wheel carrier (too rusty to bother putting back in place), and loosening some bolts. But I couldn't get the bolts connecting the propshaft to the diff to shift. I hope to have another go at that today.

I also plan to take an angle grinder to the engine bay and get rid of some of the old brackets that are in the way. Past the point of no return now...

Back to navigation

Back to the bench


Yeah, it's all borked.

So, after the little success of last time, I was very keen to get the wheels spinning. And if I'm honest, I wasn't cautious enough. And that's being polite about it. I was a bit of a knob. Twice.

With one battery pack hooked up, giving us 60V, we put the key in and gave it a twist. The inverter came up, but when we turned the key all the way to the start position, the inverter didn't start.

Not sure what happened on my previous test but it turns out I had my 'start', 'brake', and 'cruise' wires mixed up. I switched these around and sure enough, turning the ignition to 'start' actually flicked the inverter over into run mode.

I pressed the throttle and we got....vibration. The wheels didn't spin. This is where the first part of my incaution/idiocy comes in. I dumped the throttle to see if it just needed more juice. It rattled a few more times, then stopped. Bear in mind at this time, I had nothing inline to limit current. Because I'm an idiot.

The next day, doubling down on my idiocy, I figured it just needed more juice. So I hooked up a second pack and put the inverter into manual mode. I don't know what I was thinking but half-remembering the FOC setup process, and having not watched the guide video, I put some small numbers in for manual current and then increased them until they were not so small...

No movement. Also DC current showing zero. Hmmm. Now I start to worry.

Next day again (work is busy and there's not a lot of daylight). I go out to do some more testing, this time having watched the setup video. I got back to basics: swap the Field Oriented Control firmware for the Sine firmware, and start the setup process from scratch. This time with a heater element (I don't have any incandescent bulbs) in line for limiting current, as well as a 20A breaker (horse, stable door, bolted). There is a slight burning smell and I realise the magic smoke is coming out of the little buck converter powering my VCU.

I disconnect this and continue with the testing and everything seems to be working fine with the inverter. It's starting and running as it should, and measuring the voltage accurately from the batteries. I'm seeing some DC current. Still no movement but there could be lots of reasons for that.

Then the weird thing happens. I turn the inverter off and go do something., When I turn it back on, it is reading 818.37 volts on the DC bus. This figure is rock solid and unchanging. Rebooting the inverter, clearing parameters, even updating the firmware: nothing changes it.

So, feeling like I have potentially burned my motor, and with my inverter being weird, I decide to pull everything out and rebuild it all on the bench for testing. This felt like a big job looking at it, but I actually had it all out and in the workshop within an hour, and reconnected with an updated version of my test rig (including key switch etc to replicate the cabin) in another hour and a half or so.

Then, with help via Skype from Jamie (@bigpie) I got to work trying to understand what was wrong with the inverter first. Going around the test points from the original build with a multimeter, it was clear something was wrong. Even with everything disconnected, my 5V lines were down at 4V and my -5V lines at -2.9.

Jamie suggested that maybe a MOSFET has blown closed and that is the next thing to test.

Next steps

In some ways I am quite glad to have the setup back on the bench. It has been hard to do much on the car with the dark coming in so early. And with the charger (yet to be unwrapped), port and cable having now arrived, I can also look at getting those working. While everything is out of the car I can use some of the daylight to finish up the hardware jobs I hadn't done yet: finally fitting the power steering pump and lines, and adding mounts for the cooling systems.

I also need to finish up a little bit of body work, removing the last of the rotten outer sills and tidying up my weld on the inner sill. Plus I need to drop the back axle and get the petrol tank out. Having looked at this job in more detail, I'm not convinced it's going to create a huge amount of space for more batteries. But we shall see. There's always the spare wheel space under the boot...

Then there are the modifications required to shink the battery box a bit to fit the charger in. In short, I am now resigned to the fact that there is a lot longer to go on this project than I thought. It's unlikely to be on the road this side of Christmas and frankly even Spring is starting to look ambitious.

On a brighter note, I did find a very cheap Outlander inverter...

Back to navigation

In the cabin


So, the wiring is now largely done, and it's time to start testing

High Voltage

35mm2 cable is pretty awkward to work with. Working my way around the car, I worked out the lengths I needed for each of the connections - battery box to junction box, junction box to inverter, inverter to motor - and cut lengths off before crimping on connectors using a borrowed hydraulic crimper (thank you fellow forum-member Alfred/@Maker_Of_Things). I then added a layer of adhesive heat shrink over the crimped parts (also thank you Alfred!)

With the cables made up, I cut matching lengths of bright orange shroud to go over them and began wiring it all in. Because this stuff is pretty stiff, getting it to stay in the right locations while you get a bolt in or a nut on can be tricky - especially in a cramped engine bay. So as you will see from the photos, I actually unbolted some stuff for connections before bolting it back in.

I'm still experimenting with my 3D-printed connectors and shrouds and I'm not very happy with them yet. The pared down connector for the side of the inverter that was tight against the engine bay wall works well enough. And I'm happy with my shroud for the motor connections. But neither of them hold the shroud as I designed them to do. Bit more work required to tweak those before I share them.

The worst connector was for the battery box. This was incredibly fiddly and I don't think it shields the two connections from each other enough. Back to the drawing board on that one.

12V Loom & testing

There are still some connecting blocks to be replaced with proper connectors, and I haven't yet wrapped it all in fabric tape, since I'm sure I will have screwed up somewhere. But there is enough stuff in the car for testing. The first bit of which we did today.

We sat in the cabin, turned the key and watched the WiFi network from the inverter come up. We logged in on my daughter's laptop and watched the on-screen gauges spin as we pressed the throttle. They were only measuring throttle position, but it's a start.

I also tried turning the key all the way to the ignition position to test whether this would start the inverter as it should. Sure enough it threw an error telling me it hadn't pre-charged, exactly as it should, since I didn't have the batteries hooked up. So far, so good.

More testing to come over the coming week. I got under the car for the first time in ages today to tighten up the bolts connecting the giubo to the gearbox and propshaft. They're an absolute ballache to get a spanner on. May need a new one before I can torque them up properly. But they'll do for a bit of testing.


The biggest mess the wiring project has produced is in the space where the ECU used to sit. I decided to make this a little nest for various connections and bits of circuitry since it was roomy and largely sealed. It now features:

  • VCU: Slightly confusing terminology since the 'brains' added to the inverter are arguably the vehicle control unit, but this is my little arrangement of microcontroller (Mega2650 Pro), CANBus interface (MCP2515), relays and other bits that I will use to control everything the inverter doesn't directly.
  • Monitor: A NodeMCU hooked up to an MCP2515 running ESPHome that will monitor the car when it's on the driveway and hook into my home automation system to send me data. Not got this running yet.
  • 'On' Relay/Fusebox: A harvested relay and 10-way auxiliary fusebox powering everything that needs to be on when the ignition is on but the car isn't 'running'. e.g. inverter, monitor, BMS, contactors, current monitor (shunt) etc. This is switched by the standard switched live from the ignition.
  • 'Run' Relay/Fusebox: Another harvested relay and 4-way auxiliary fusebox for those things that only need to be powered when the car is running. e.g. PAS pump, brake booster, cooling pumps. I will need to have a separate switched line for the water cooling pump for when the car is charging (see below). Right now this is triggered by a relay module on the VCU. Not totally happy with this and would rather it was simpler but would need some sort of latched 'run' live which the car doesn't naturally have.

Here is also where the CANBus lines for the EV systems meet the rest of the car, and the VCU and Monitor, which again is currently a pile of spaghetti around a connecting block. Plus there is some of the old wiring. And a bunch of grounds. It all needs tidying up once I know it works.


As the time to spin the wheels gets very close, I'm thinking more and more about how to charge the car - something I had rather put off. In theory, my inverter can act as a charger. But right now, there is no working software to enable it to do so from a single phase supply. Fellow DIYer Jamie just blew up half his inverter testing the code, so I'm not keen to try that.

But it's been a good couple of months at work so the credit card came out, and I have ordered a charger from a Mitsubishi Outlander PHEV, just like my motor. (Note, this project would arguably have been quicker and easier if I had also used the inverter from a PHEV, but we live and learn). This, along with the charge port from the same vehicle I have ordered set me back just under £300 including shipping, and should make charging relatively straightforward.

I say 'should' because I haven't totally got my head around what this new component means for my design yet. With my inverter no longer being used for charging, I know I have an extra contactor in my high voltage junction box that can be repurposed elsewhere. And I know I will need to include the charger on my water cooling loop. I also know that the charger won't currently fit under the bonnet of my car. Some fettling of the battery box and lid may be required to clear a few extra centimetres of headroom.

Finally, I know I will need to add the charger to my CANBus because that is how it is controlled, and that this will be an extra job for my VCU. Rough scheme is to have the plugging in of the charger wake up the VCU and BMS and send the appropriate commands to the charger.

Back to navigation

Weaving the loom


This week I have mostly been focused on getting the car wired up.

Inverter connection housings

With the battery box and inverter mounts in, the first issue I had to solve was the connections on the inverter, which were now fouled at the back by the firewall and at the side by the wheel well/strut housing. I tackled the low voltage connections first, looking at various ways to re-route the large 36-way AMPSeal connector that comes with the EVBMW kit. Initially I was thinking the connector would have to go underneath the inverter, which would have been a total ballache. Then one day I left the loom I was making up sat on top of the inverter and realised there was just about enough space there.

I took my original design for the AMPSeal housing and flipped it through 180 degrees so that the connector came out on top and pointed towards the front of the car rather than the back. Then I added a shell to the back to leave space for the IDC cable that comes from the inverter and the connectors. Amazingly I nailed most of this first time, after some major 3D printing issues. However I didn't leave quite enough space for the solder tabs on the back, meaning I lad to print an extra shim to give enough space. I'll revise the design down to two parts at some point but have posted my current version here.

This all fits beautifully, as you can see. Very happy with this layout as it gives nice easy access to the connector.

What I haven't done yet is sort out the high voltage connections on the side. These already needed work as I now need three connections: one for ground, one for driving the motor, and one for charging/the DC-DC converter. I think I explained this in a previous post, but basically I have an extra contactor in my high voltage junction box that allows me to engage or disengage drive so that when the inverter is acting as a charger, juice can get to the batteries but not the motor.

In addition to adding the third terminal, I also need to shorten the whole assembly by a centimetre or two so that it doesn't foul the side of the engine bay. Shouldn't be too hard I don't think, though worst case I may need to have the brass standoffs I got from EVBMW turned down slightly. I certainly need a third one making up.

Since I wrote the above I have now redesigned the high voltage connector, knocking about 20mm off the depth, which should be enough to clear the side of the engine bay. I've also added the third terminal for charging. I've ordered some shorter brass standoffs without the flange on that the EVBMW kit has. Beautiful as those are, and useful as the flange is in holding my 3D-printed shroud in place, space is really at a premium for me. The 16mm diameter standoffs I have ordered will still give 100% contact to the crimp terminals at the end of the high voltage cables. And I plan to silicone in the shroud so it doesn't move.

Wiring Loom

I've never made a wiring loom before, but all the instructions I have seen (kudos to Jared at Wrench Every Day) say take it piece by piece, start at one end and slowly build it up. So this is what I did. I started with the battery box since this is where one end of the CANBus terminates, with the connection to the Battery Management System (BMS) I knocked up in a previous post.

One of the other things most guides to building a wiring loom tell you not to do is re-use cables. But I hate waste and all the wires in my BMW loom seemed to be in really good condition. Plus it wasn't worth much to sell, so I decided to butcher it and re-use as much as I could. I'd already salvaged the exterior plug from the battery box so I started with this and added some nice long tails to the relevant connections, noting all the wire colours and pin assignments as I went along.

I then took this first piece to the car, put the connector in place and ran the wires to the high voltage junction box, or as close to the new auxiliary fusebox location if that was where they were due to go. I then trimmed the wires to the relevant lengths and started on the junction box connector

I didn't have a any good salvage parts for this so a few weeks ago I ordered a nice waterproof 16-way connector from AliExpress. This was actually reasonably easy to wire up, and has enough pins to carry individual positive and negative feeds for each of the contactors and the pre-charge relay, as well as power and CANbus connections for the shunt. What it can't carry is connections to sense the position of the three contactors. The Gigavac contactors I'm using all have a second set of tails to allow you to sense whether they are open or closed, which it would be nice to sense and send to my VCU for debugging. Or I could just stick three LEDs in the side of the HVJB. This could just be me gold plating things though.

From the HVJB the loom goes to the Inverter and its 36-way AMPseal connector. From here it splits off in multiple directions:

  • to the motor for temperature and position sensing
  • to the cabin for throttle position (one 7-core cable), fwd/reverse switch, ignition sensing, brake sensing and cruise control (second 7-core cable)
  • to the VCU (CANBus, plus third temperature sensor (oil temp) from the motor)
  • to the new auxiliary fusebox (for obvious things)

Inside the space where the ECU used to sit (nicely water-sealed with lots of re-usable rubber grommets) I've hacked out most of the old wiring. Five bundles still enter this space:

  • The X6004 bundle (for BMW nerds) gives me CANBus to the instrument panel and the ABS/DSC system, as well as various other outputs to control the instruments. I've not tapped into this yet but aside from the CANbus, these will mostly be linked into my VCU.
  • Three medium-sized wires (I'm no good on gauges) come up through a four-way ampseal connector (I've salvaged both sides). One provides me with a switched live signal from the ignition and based on the BMW colour coding (red and white) it looks like it takes a return switched live, though this is currently disconnected (I'm sure I'll find out what it was meant to do when something doesn't work). I have linked the switched live signal to a 12v relay and from there to the auxiliary fusebox, an 8-way affair I picked up on eBay. Most of the things I want to drive only need to be on when the car is on, running, or charging. I will configure something to trigger this relay when the car is charging as well.
  • Two fat red wires provide permanent live, splitting into two, two-way connectors which again I have salvaged.
  • Three brown wires head off to earth
  • Two more wires come up into a two-way connector and honestly I haven't worked out what those are for yet

I have now added female spade connectors to most of the positive connections so that they can be attached to the auxiliary fusebox. And I just soldered the negatives to the chopped off earth wires, though I will need some more when I add the VCU and monitor

The two shielded 7-way cables my daughter and I chased through the firewall a few weeks ago have now been spliced into the relevant places in the cabin. An extra crimp connector salvaged from the four-way AMP connector above gave me a 'push to make' signal from the brake pedal to give the braking signal to the inverter. And I traced the ignition cable to the keyswitch and spliced a connection into this for the 'start' signal the inverter requires. This all leaves me with only one tell-tale sign that this is an EV in the cabin: a fwd and reverse switch in the centre console. When we've done the body conversion I might look for a more subtle alternative.

The throttle signal cable terminates in a four-way connector salvaged from the old loom, since two of the wires are just 5V and two are for GND, leaving the last two being actual signals from the throttle position.

The rest of the signals are currently terminating in a connecting block, but a six-way male/female AMP pair is on its way.

Once everything is tested and working, the loom will be wrapped in cloth tape and routed through grommets where possible.


I now have a rudimentary vehicle control unit knocked up. It's a little bodged together with dupont pins and jumper cables at the moment but it works. It takes information from the inverter over CANBus and right now uses the inverter state to turn on or off some of the eight way relays. These allow me to turn some things on only when the inverter is in 'run' or 'charge' mode (like cooling), and do some thermostatic control. I can also pull temperatures from the inverter over CANbus (including the motor temperatures) and I plan to measure the motor temperature directly as well (there are three thermistors in there and the inverter only has connections for two).

I wrote a little test-script for the hardware for my vehicle monitor to make it cycle through the state codes the inverter sends as a test, and the VCU does exactly what it should for now. Simple but pleasing nonetheless.

The VCU will also be responsible for parsing data from the inverter and feeding it to the instrument panel - e.g. RPM, coolant temperature etc. All that work still to come. And it needs properly boxing in too.

I'll post all the hardware details and pin connections for the VCU over on the components page when it's done, along with designs for the final case.


I want to be able to keep an eye on the state of my car when it's on the driveway and charging, as well as maybe having some remote control for warming it up etc. To this end there will be an extra device on the CANBus: an ESP8266 running esphome. ESP8266s are my favourite little chip. Cheap and plenty capable with integrated WiFi. With the addition of the MCP2515 CANbus interface, I should be able to feed all the data I want back to Home Assistant.

The hardware on this is all done now and since it's not a critical part, I'll probably leave it as is. I've designed and printed a simple case for it that with some silicone should keep everything nice and sealed and dry. Only question is how well the WiFi will penetrate with all the noise - especially when it's charging.

Inverter as charger

Final part of this very long update. I've finally stripped the EVBMW board back out of the inverter and dropped it off with my local repair shop to have the microcontroller for the charger replaced with one that already has a bootloader on it. Not sure if I documented this but I and others have had no joy getting a bootloader onto these chips through the normal means, but it seems to work fine once you swap it out for one with a bootloader pre-loaded.

With this in place and a few more bits of hardware (a caravan-style mains connector), I should be ready for the extremely scary prospect of charging my batteries up if/when there is some software available for this function.

This isn't plug and play. For example, you need to ensure that the inverter capacitors are pre-charged from the AC or from the batteries before you dump current into them. But 240V mains plus 300V DC. What could possibly go wrong?...

Back to navigation

In the frame


Little update after a bit of work the last couple of days: battery box, inverter and high voltage junction box all now in and ready for some wiring - both high voltage and control. Got some of the 3D printed connectors/adaptors I've knocked up in as well.

Photos show me mocking up the location of the inverter with cardboard and wooden wedges so I could measure out the new steel for the 'cage' that combines the motor mounts and frame for this and the HVJB. Measured up, pulled it all back out (again), and welded it up. Then slapped on a coat of Hammerite. Eventually I want to take this all off and remake it a bit better, or at the very least repaint it properly.

Other pics include the lining of the battery box (cut from EVA foam (yoga mat) and glued in), some connector close-ups, and it all now in situ.

  • The orange high voltage connector has a cover that slides over it and screw-in locks that also hold the sheath for the 35mm2 cables. I'll post some photos of that soon.
  • The black connector is a combination of a salvaged plug and socket and a 3D printed front plate. The plug that came with it lacked any sort of cowl or sheath so I've also designed and 3D-printed one. I'll post some photos of this as I go through the wiring too.

Issues: I had to push the inverter so far back to clear the battery box that there isn't much space for the AMPSeal connection that carries all the control/communication wires or for the water cooling inlet/outlet (TBC). Think I can clear some space for the cooling with some slight bends in the brake pipes that run across there.

AMPSeal is trickier but have a plan: the ribbon cable I have in there that connects the control board to the AMPSeal is far too long. So will swing the connector through 180 degrees and mount it under the inverter where there is now loads of space. OR come up with something completely different.

Next step: running CANBus, 12V and HV cables. Then I'll think about cooling again - got some ideas...

Back to navigation



It has been three weeks since my last update. The pace of this project has definitely slowed as work has picked up and the weather has worsened. Nonetheless, there is plenty of progress to report. Unfortunately I haven't been great at taking photos this time around so forgive the paucity of pictures.

Battery Box

After my disastrous spatial miscalculations of the last update, I decided I wouldn't try fitting anything else until the battery box was actually done. This has taken a lot longer than expected. For a start, I needed more steel than I thought to get a properly sealed box all the way around. One of the washing machine panels I was going to use bowed out at the top and trying to rejoin it to the frame in a way that made sense was just too much work. So I cut it off and replaced it with a fresh piece of steel, as well as adding one to the bottom, and a patch to the back to make it nice and square all round. The welding isn't exactly pretty but I'm slowly getting more consistent and only occasionally forgetting to turn the gas on.

Before I put all the new panels on though, I needed to fit the base plate from the original BMW box. This being aluminium, I couldn't weld it, so instead I welded in four standoffs to the base of the box and drilled them to accept rivets. Having trimmed and neatened the base plate up with the grinder, I dropped it in, drilled through, and test-riveted it. It worked beautifully.

So, the flat panels were welded on, and the whole lot was given a coat of zinc primer. Next up: mounting it in the car.

This was a little complicated. The box had to sit above the steering rack and protrude out almost to the radiator where there was nothing obvious on which to mount it. At the back, I concocted an arrangement of 40x20mm box section welded to two circular standoffs that straddle the steering rack bolts into the front cross member. Two pieces of plate then extend towards the back of the car from these standoffs with holes to line up with unused 8mm holes in the cross member. This took a lot of measuring and tacking in-situ before it could all be welded up and ultimately, welded to the bottom of the battery box.

At the front I decided to re-use the radiator mounts, since these will no longer be used. They're inn pretty good shape and tie directly to the front frame so should be strong enough, though I can always reinforce them if needed. Another piece of 40x20mm box spans the gap between them with little lips sticking up, drilled with two more 8mm holes that pass through the radiator mounts. Again, with it all in situ I tacked it to the bottom of the battery box then removed it for some proper welds.

Given the way this has been constructed, it's far from water tight, so I've bought some brush-on seam sealer to go over all the welds, joints and gaps. Once this is applied, I'll be adding a layer of EVA foam (OK, yoga mat) insulation all the way around before refitting the base plate.

This leaves two final jobs: the high voltage connector and the lid.

I prototyped a design for the HV connector on my 3D printer which showed up all the flaws: I'd over-sized the spaces for captive nuts and undersized the holes for the connectors. But version two is well on its way. In fact it is two thirds printed but my printer decided to throw one of its periodic tantrums half way through the third component and I haven't had time to sort it yet. I may also need some more PETG. Once I have tested the design I will share it like all the others.

For the lid, I plan to reuse the lid of the original battery box, cut down to fit. This will need a little modification on the underside to create a good seal (probably bonding on some flat strips of aluminium and using more EVA foam). But it looks great. It's all marked up and just needs cutting now. I plan to rivet an aluminium panel to the front of the box with holes that match up to those on the lid so that it can be bolted down.

Inverter Mount

About five times over the last three weeks I have dug out the inverter, balanced it in various positions in the engine bay, muttered swearily, and put it away again. On the sixth attempt, I had not exactly an epiphany but at least an idea of how it could be mounted.

I found some fairly thick (maybe 2.5mm? I should probably check) bar in the cellar and decided I could make a U-shaped cradle from that to pick up the Prius inverter's three mounting points. I mocked this up in cardboard before cutting some strips to length with the handsaw - limited time now means earlier starts on the weekend when using the grinder might see my neighbours turn violent. Fortunately the welder is relatively quiet so I tacked the pieces together before checking the fit, then welded it up properly along with some captive nuts. It's not as stiff as the 20x20 box that the HV junction box frame is made from. But once it is welded in it will be stiff enough. A diagonal of 40x20 at the back and two 20x20 uprights will tie it into the rest of the mounting frame.


This just leaves the cooling for the inverter and motor. With the battery box in place, I can now see that there should actually be space in front of it for both radiator and oil cooler. This will mean longer pipes than I planned but it will make mounting nice and easy as I can just tie into the slam panel. Plenty of room to route the pipes around the side of the battery box.

Now I just need some time and some decent weather - ideally decent weather precisely when I have some time!

Back to navigation

Two steps forward, two steps back


Right now, I wouldn't begrudge the authorities denying to approve my car for the roads, and possibly taking my licence, given that my spatial awareness is so bad I seem to have believed that two different components could occupy the same space in the engine bay. Let's rewind...

Front-end rebuild

Somehow it has been over a fortnight since my last update so this one is a bit of a monster. During that time there has been lots of activity, but work has been ramping up and in my infinite optimism, I also signed up for a course in something completely different earlier this year which requires lots of reading. Suffice to say I'm not exactly flush for time right now, so while things are getting done I'm getting worse at documenting them.

Also, with my daughter now back at school and clubs, most of the work has fallen to me now. So with only occasional help, I finished stripping all the components off the front end, wire wheeled everything, repaired some rust (notably on the X-frame that ties the front end together), and gave everthing good coat of Hammerite.

Then, I did it all in reverse, this time with new lower suspension arms, bushes, track rod ends, and drop links. Oh, and a new set of coilovers. This has not all gone smoothly. Firstly, I couldn't get the new bushes into their mounts. I didn't want to spend £60 on a cheap press, not because I didn't want one but because I didn't want to have to store it. And none of my local garages would take the job on - or even had a press. In the end I bought some new mounts with the bushes already fitted. I'll either keep the spare parts or sell them on.

For a measly £195 I'm very happy with the new suspension, including rear shocks and springs and coilovers for the front. I got the coilovers compressed down and fitted to the old top hats without too much issue. Except for the massive scratches I seem to have put in the dining room table. Whoops. I even managed to cut out some new gaskets from a sheet of gasket paper on my wife's CNC paper cutter (see pics)

The problem came when I got them on the car: the springs rub on the tires. Reading the forums it seems this is a fairly common problem. I'm going to be changing the wheels anyway, so I'll think about this properly down the line. But for the time being I have kept the front end jacked up and ordered a very cheap set of 10mm spacers. I'm hoping this is enough and that the original wheel bolts are long enough.


One quick job was restoring some very milky headlamp covers. I could get them much better with a little more time, but I good going over with metal polish and a microfibre cloth worked absolute wonders. Good enough for now, since they won't be on the final car after the body conversion.

Battery Box

One thing that was a little more interesting was the battery box. My daughter and I started executing my cunning plan to turn an old washing machine into a battery box not long after the last post. We sliced out the middle third, around the door, then began welding the top and bottom sections together to create a box with enough space for 6 BMW cells in a 3x2 configuration. We need some more steel to finish it but it is now pretty solid, and great for mocking up (below) as it is pretty light still.

The original plan had been to mount the six batteries onto two thick pieces of steel bar I had lying around, with threaded rods coming up through the holes at each end. But then I had a bit of a brain wave. The original case already has perfectly spaced threaded holes sunk into it in the right orientation. Why not just cut that bit out of the box and bolt it into the bottom of my battery box? We shall see how that goes.

I also plan to re-use the original lid, cut down to the same size as the battery box. It has holes in the top that will match up to the threaded rods.

Battery Management System

I'd written most of this blog post before I remembered I'd done this. I stuck the SimpBMS software on a Teensy 3.2 microcontroller and hooked it up to the BMW cells via a CANBus Transceiver. Incredibly, it worked first time giving my nice clear readings of the voltages across all my cells. They're all sitting pretty low at 3.6-something (it was a couple of weeks ago now) but with very little delta, which is a good sign. As soon as I get a charging system hooked up I'll give them some juice.

I have stripped down the loom from inside the battery box and remade it with just the bits I need and then re-wrapped the lot in cloth tesa tape. The BMS itself is now mounted in a custom 3D-printed case. It's not amazing (there are still a load of jumper wires in there), but it will do for now.

The battery box came with both high and low voltage connectors, including a locking ampseal plug on the outside with all the tails just cut off. I plan to re-use this and have 3D-printed a shround to cover the wire exits. I'll just splice my own cables into this rather than starting from scratch. I've also knocked out a little clamping plate so that it can be fitted to a cut out of the sheet steel in my new battery box.

For the high voltage connection I have designed something similar to the shroud I made for HV connections on the inverter. It's not totally finished yet but only needs a little polishing. What I don't yet have is an emergency disconnect. Still thinking about that.


My plan for now is to use the charging capability of the hacked Prius Gen 3 inverter. The only problem being that it doesn't come with this capability out of the box. No-one has written the software yet and I've had no joy getting the Atmega chip that runs it to take code. So, I've ordered one pre-loaded with a bootloader and will get my local soldering genius to swap the chips when I can get over there.


Another thing I almost forgot before I looked at the photos from the last fortnight: I have modified the cheap Russian AC water heater module I got to disconnect and remove the pump from it, leaving just a nicely encased 2kw heating element with 19mm barbs for inlet and outlet. See pic below (I need to take more photos!).

I've removed the final pipework and solenoid from the heater matrix, leaving just two 19mm barbs sticking out of the firewall. I just need a reservoir, another pump, and a temperature sensor now and I should be able to set up a nice little heater loop.

I'm planning to power this off the full battery voltage, so will likely need an extra contactor. Considering using one of the ones from the BMW battery pack.


With the front end back together and looking all clean and shiny, it was time to start adding all the good stuff in. While everything was back out of the car I had welded brackets or at least captive nuts for various ancillaries on to the adaptor plate or the combined motor mounts/mounting brackets for inverter and high voltage junction box.

My daughter and I first bolted the transmission to the adaptor plate, using a mixture of the original BMW bolts and fresh ones. We might go back and add some threadlock once it is all working. We then added in the coupler, which I'd done some welding on while it was out of the car. I've added a couple of weld around the press fit between the gearbox splines and the tube, and around the Ford clutch centre that mates with the motor splines. I then filed all this back as neatly as I could. Is it balanced? Only one way to find out. I sort of wish I had done a full seam between the BMW centre and the tube but it does seem very solid. Maybe next time it comes out I'll do that and see if someone can balance it.

Next step was the motor, which slotted on and bolted up surprisingly easily. Getting the splines to line up has been a bit of a pig in the past.

With the unit altogether I looped some straps around it all and we craned it into place. After a bit of shuffling back and forth we managed to get the propshaft aligned, the front mounts in place, and the gearbox sat back on its mounts. An hour or so under the car and I had all this bolted up as well as the bolts between gearbox, giubo (check out the spelling! No, me either) and propshaft in loosely. Everything will need torquing up at some point. Maybe some more threadlock too.

First thing I noticed: the motor mounts (and so everything riding on them) have come out a little skewed. It's not major and it won't prevent the car running. But I think it's going to annoy me eventually. This was the least of our problems though...

Where to begin? The oil cooler mounts for the engine cooling circuit are a fraction - maybe a centimetre - too high. So the output from the motor and the input of the cooler don't line up. And they're too close together for a curved bit of pipe. The idea was I could just use a straight short to connect them. Since I really don't want to take the adaptor plate to which they are welded out again, this is probably going to require some brute force engineering as I bend the mounts to make it all fit.

The oil pump mounts require some shorter bolts. This is fine, but it meant I need to get some more or cut some down. Either way, it didn't get attached today.

I had made a mount for the PAS pump. I knew this one needed some finessing so I left it in two parts that could be welded together once I tested the fit. Unfortunately, leaving these two parts separate only allowed for adjustment in one dimension and I need to adjust it in two. So more fabrication to do.

Then we get to the real problem: the inverter mounts and everything that hang off it (coolant pump, radiator) will foul where the battery box should fit. How I didn't realise this I have no idea, but it became pretty obvious when I fitted it all this time. The inverter needs to move up, left, and back to clear the battery box. And the ancillaries need relocating completely. To where, I'm not yet sure.

So, out came the grinder. I masked off as much off the engine bay as possible with carboard before cutting, but the dust and particles still get everywhere. I'll need to grind back some of my nice new paint to weld in some new mounts but this can all be done in situ now - especially now my welder is working better. On top of new gas and a new earth clamp, I have now rebuilt the torch, resulting in much less play in the swan neck and much better control of gas and wire flow.

Next steps

So (this has been a very "So..." blogpost. Sorry.), instead of just wiring and plumbing it all now, I obviously have a fair but more fabrication to do. I'll probably start with sorting out the PAS pump and the cooling loop for the motor, since those are all in the least accessible places. I forgot to mention above that the vacuum pump mount was actually perfect, so I just need to work out how the pressure switch I secured works and hook all that up.

Then I will move on to the battery box and get that finished up. Will be great to get the batteries actually into the car, though I might want to test charging them outside of it to start with! With the batteries in I can adjust the coilovers to get a decent ride height.

Finally, once the battery box is made up and mounted, I will remount the inverter. In the meantime I'll likely eke out some hours to get cracking with the wiring now that the position of everything is pretty much finalised. I still need to make a case for the vehicle control unit was well, something I have been going around in circles on the design for.

That all done, I still need to get around to the back of the car, changing the rear suspension, dropping out the fuel tank, and seeing if any remedial welding is needed at that end (I didn't even mention that I had patched one of the sills - needs redoing more tidily but it has stopped the rot for now).

Until next time...

Back to navigation

Restoration work


The problem with starting an EV conversion on an MOT failure is that you also have to address all the reasons it failed in the first place. And with a 174,000 mile car, there can be a few of them. Obviously there are no issues with the engine or emissions now. But somewhat predictably, the more I have dug around in this car, the more issues I have found.

Front corners

I noticed a few weeks ago that one of the front suspension springs was broken, so knew that would need replacing before we put the car in for a test. When I took the shock absorber off I found this was also in a pretty rotten state, with the bump stop completely mashed and split. So I figured I probably ought to replace this as well. If you're going to do one corner, you really should do the other, and suddenly you're looking at quite a bit of money. If you go OEM that is...

Trawling around for replacements though I noticed some absurdly cheap sets of coilovers to fit this vehicle. And when I say absurdly cheap, I mean I put in an offer of £195 - new, including shipping - and had it accepted. Now are these coilovers going to be any good? Absolutely not. Eventually I will have to replace them with some decent ones. But, for less than the price of doing both front shocks and springs, I get shink new components all round with - critically - adjustable ride height so that I can balance out the weight differences from the conversion.

While I was at the corner I decided I really ought to strip off and clean up the incredibly crusty front knuckles and calipers. The bolts all came off surprisingly easily with a short breaker bar, but splitting the taper at the bottom was another matter. Again, somewhat predictably, I managed to split the boot surrounding the ball joint on the lower suspension arm. I was a bit cross about this until I realised that both suspension arms were so rusty that they too were probably going to be an MOT failure at some point. Out came the credit card again for some budget parts. Incredibly, droplinks, bushes, and full suspension arms for both sides were just £75.

That only leaves the knuckle, caliper and brakes as the original components. If I had more money I would probably replace all of the above. The knuckles are very rusty, albeit mostly just on the surface. But the tinware around them is totally shot. And the flexi pipes are completely seized on the calipers. Not sure how I am going to get those off for a proper clean-up yet.

Finally, while I'm taking the front end to pieces, I noticed some fairly serious corrosion on the X-frame brace. I took this off and hit it with the wire wheel and it is pretty bad: great big holes. It's not distorted though, and between the holes there is some solid metal. I'm going to have a go at welding this back up once the rust I can't get to has been treated.

I picked up some Hammerite today so plan for this weekend is to remote the remaining suspension and brake components (if I can), give everything a thorough clean and a coat of paint ready for refitting. Will need a new wire wheel for this though: wore mine down to the metal cleaning up the brake rotors and the X-frame.

Battery Box

Meanwhile in the evenings I've been doing a lot more planning of the battery box. The washing machine case sadly won't provide all the steel sheet I need. But its top and bottom frames will give me a great starting point. Plan is to cut all the way around the frame just below the door, giving me about a 30cm tall box. I'll then drill out the spot welds from the other end of the frame and weld that frame into the top for support.

Inside this box will fit two rails. I have some thick rectangular steel bar, about 14mmx8mm that will work well for this. I will drill and tap M6 holes into this bar to hold threaded rods that will rise up through the pairs of holes at the end of each of the battery modules. This will allow me to stack them up on top of each other with some space in between.

Cooling is an interesting question. I had thought I would just go with air cooling at first, but this opens up the possibility (perhaps likelihood) of moisture getting into the battery box: not ideal. Shall have to mock it up and keep an eye on tempratures.

Wiring Loom

Final part of this update: I've been continuing with the wiring loom. Getting rid of most of the old loom was the right plan. The new loom is actually relatively simple by comparison with all the sensors the old ICE required. Mostly just power and CANbus flowing around. I plan to daisychain the CANbus connections: car (ABS/dash), to VCU, to inverter, to charger (part of inverter but has separate CANbus interface), to high voltage junction box, to battery box. I've decided to handle any step down to 5V inside each component, so that I'm only routing 12V power. That should reduce the chance of stupid mistakes and make wiring easier.

Where it gets a bit more involved is routing switching and control for the various pumps - water, oil, vacuum, power steering. Will handle that once they're all in the car though.

Back to navigation

The home straight?


It feels like an incredible amount has happened since the last update just five days ago. I have batteries. The car is stripped again. And most of the welding and fabrication is complete.

Battery wrangles

So, I couldn't quite let the well-priced battery pack on Facebook go. So the morning my gazumper was due to collect, I messaged the seller and offered him 50% more. He relented and after a little back and forth, we agreed (again) I would collect on Friday after putting down a deposit. After all the mucking around I wasn't confident I would see my deposit again or the batteries. But figured it was worth a punt.

In the end the seller was a lovely guy. Just sick of being mucked around by buyers. I had an easy journey over to Bradford and back, given how bad the M62 can be. And returned with a battery pack in the boot.

The following day we craned it out of the car but didn't get any further as we were focused on the car (below). The day after, we got to work stripping it down.

These packs are something else. Beautifully designed. Five shoe-box-sized modules are mounted in the pack along with a high voltage switch box and refridgerant cooling system. Strip the five modules out and the rest of it is incredibly light.

I got the packs out along with high voltage cables and the battery management loom. I have subsequently stripped and separated this to leave only the CANBus and power wiring for the individual modules.

This loom will plug in to a CAN transceiver and from there into a Teensy 3.2 running the SimpBMS software. Teensy is up and running and I'm just waiting on the right CAN transceiver module, which is due to arrive in a couple of days.

Battery box

Now that we have batteries we can think about how to mount them. A little shuffling around and I realised that three side by side running with the long edge parallel to the car would fit perfectly. I can stack the other two on top - leaving room for a third if I want to up the pack voltage at a later date.

The measurements for this is about 56cm by 40cm. It just so happens I have been hanging on to the frame of our old washing machine in case the steel came in useful. Its dimensions? 60cm by 43cm. Guess I'll be using that as the basis for my battery box!

More fabrication

The other thing we did on the day the batteries were craned out of the back of the car (my wife's: they wouldn't fit in my Alfa GTV), was finish our game of engine bay Tetris. We worked out the location for the oil cooler and pump for the electric motor, the radiator and pump for the inverter, and the power steering pump. When I say 'we', what I mean is my daughter came up with good idea after good idea, proving once again that her spatial intelligence is greater than my own.

Having scribbled various instructions to ourselves in Sharpie on the existing metal, we set about removing the motor and gearbox again, along with the whole steel cage that now includes the engine mounts (I had tack welded those on at some point after the last update), as well as the mounting points for the inverter and junction box. This almost worked: it turns out the the engine mounts make the cage fractionally too wide to be lifted straight up out of the engine bay on the crane, and I didn't notice soon enough. Therefore a few of my crappy tack welds from when the welder was misbehaving were ripped apart, leaving me a little steel jigsaw puzzle to reassemble off the car.

Starting very early this morning, I first (quietly) cleaned the engine bay down again ready for reassembly. We've decided not to paint it for now but instead wait until the whole car gets a respray, once it has its new body. Then as soon as it was decent to start making noise on a Bank Holiday, I started welding and grinding. I turned all the spot welds into seams at the joints and capped most of the open ends of the steel box and filled in the sections I had cut out to add captive nuts. I added (my daughter being busy today) brackets for the radiator, water pump, oil pump, oil cooler, and vacuum pump (another new arrival). I straightened up some of the brackets that had been tacked on before a bit skewed. I drilled out some of the holes for the transmission mount that were too small before (I didn't have a decent 12mm bit). And I started making a bracket for the power steering pump (which I didn't quite finish). Finally I gave the steel cage three coats of zinc primer and coated one side of the adaptor plate - now also a mounting point for various other brackets.

I still want to trim away some excess material from the adaptor plate as it is ridiculously heeavy. And I need to beef up the welding on the coupler, which only has a couple of tacks on it at the moment. But then with a few coats of paint, the major fabrication is done and we can start to put the engine bay back together for good (or until something goes wrong or we decide to do it all differently.

Incidentally the upgrades to my welder were a partial success. I managed some half decent welds (pictured below), which seemed to be impossible before. But some were still absolute poop (not pictured below to save my shame). I think it's probably a combination of wrong settings and poor surface preparation now. But the welds are now strong at least, even if they aren't always pretty.

Junction box

Perhaps the most unexpectedly time-consuming part of this whole build has been the high voltage junction box. I finally completed the mounting of all the components this week, setting the resistor down on the mounting plate with thermal compound, trimming all the mounting screws to the right length, and routing the wiring through some 3D-printed retainers. I also drilled the case and fitted the glands for the 35mm2 cables, and mounted a 16-way locking connector for all the control signals. Oh, and I also made up the cable to connect up the ISA shunt, an additional monitoring device that will give me detailed information about battery performance. Last job is to solder up the 16-way connector. Fortunately, I hadn't yet done this when Jamie corrected my understanding of the way the inverter control board drives the contactors and relays in the junction box. Turns out I can do away with the relays I was using to switch these connections and run them straight off the board, simplifying things greatly.

And that will do for today's update. Especially since I've just realised that in spite of all of the above, I have hardly taken any photos!

Back to navigation

Batteries, batteries, batteries


The project progresses apace...or at least it was progressing. Now hitting the limits of what I can do without some batteries. But here is where we're at:

Engine Bay Tetris

With the engine mounted, we could start working out where everything else goes. Through a process of trial and error, and lots of tack welding, we got the inverter and the high voltage junction box mounted in the engine bay, using a combination of 40x40, 40x20, and 20x20 steel profiles. The 40x40 might seem a bit excessives, especially since it is the thick walled stuff we made the adaptor plate from. But this will be the mounting point for the motor mounts that drop down to the rubber bobbins below. These are all now cut and waiting to be welded...

Welding Woes

Our skip-dived welder hasn't been performing brilliantly for the last week and needed a little TLC. A new earth clamp, some more gas (this time from Hobbyweld), along with the relevant adaptors and some new shrouds have all either been ordered and collected, or are due to arrive in the next day or so. This should allow us to do some much better quality welds when we take the motor back out and finalise it all before painting.

Cooling systems

In what has been an expensive week for little bits, I bought a load of elbows for the 10mm and 19mm pipe that will make up the two cooling loops for the inverter and the motor. I also ordered a very cheap but slightly battered motorbike radiator with 19mm fittings to go into the inverter loop. This has a filling cap so should work fine as a small reservoir. For the oil loop I will use the old power steering reservoir.

Plan is to mount each radiator and pump roughly in front of the things they are cooling. Some little plates and strips welded onto the rest of the mounting cage should hold them nicely.


When I sold the combustion engine, I hung on to the loom, thinking I could re-use lots of it. The plan was to keep the original plugs on it and salvage the sockets from an old ECU. In reality this is looking like less of a good idea. It just leaves me with awkward shaped connectors and a load of wire that doesn't quite go where I want. So I'll keep some of the old loom and butcher some of it for the relevant wiring and hook it all up with new connectors.

I still haven't totally established what the intelligence at the heart of this loom is going to look like. Right now I'm playing with a Teensy 3.2 (for the battery management system), an ESP8266 (for an interface back to my home automation system and perhaps some WiFi-based diagnostics), and a Mega2560 Pro (for managing things like cooling pumps and ancillaries - all of which could be done in analogue fashion and may yet be).


From the start of this project I have had my heart set on the BMW hybrid batteries. Watching the research into these on the OpenInverter forum they looked niccely designed and ideally specified for what I wanted. I did hope the whole pack from the BMW 330e would just drop in to the engine bay for a while but my tape measure soon told me that wouldn't (quite) work. It might have done if I had gone for the Lexus motor option.

I've been tracking lots of different units for sale on eBay but they seem to have gone up since I started looking. Whereas before there were a number for sale for around £8-900, now they're all up at £1350-1800.

Then, this week Jamie, a fellow forum member who has helped me lots on this project, spotted a pack going for just £500 on Facebook Marketplace. I contacted the seller and thought I'd agreed to purchase it, only to be gazumped when someone else could collect before me.

So, the search continues...

Engine mounts and more


Right, refreshed after a week off and time for a bit of an update.


After the last update I did indeed get the motor and gearbox into the car where they remain now. It wasn't as hard as I expected and it all slotted in beautifully as you can see from the pics below. A bit of 2x4 was used to level it up over the x-frame, ready for engine mounts to tack it in place.

This obviously isn't the final fitting. Some holes need opening up to fit larger bolts, the welds need reinforcing (I may need a different welder - mine struggled with the 8mm steel), and it all needs trimming and painting. But this is good enough for us to begin the big game of Tetris that comes next: fitting all the components into the engine bay and making up brackets to hold them.

Fuel-line removal

Before we got a welder anywhere near the front end, we needed to clear out the fuel lines. I jacked the car up onto stands again and my daughter and I got very mucky draining (not very well it turns out) the fuel lines and removing them along with the filter and any other gubbins (what even is that black cylinder next to the fuel tank?) This creates some nice space for running the future high voltage lines from the packs I hope to install in place of the fuel tank.

We haven't removed the tank itself yet, just clamped the lines. But we did soak all the key nuts and bolts on the rear frame in penetrating oil in preparation. When it comes off, the whole lot is going to need a good clean up and a coat of paint at minimum. Diff mounts looked OK though on initial inspection, which I wasn't expecting.

Engine mounts

We need to finish the mounting of the motor with a couple of struts to tie in to the old mounts on the cross member. Originally, I had planned to just do single struts at a diagonal from the front of the adaptor plate. But once the motor was in it became clear these might be quite awkward and uneven. Instead, having test fitted the inverter my daughter and I settled on a U-shaped bracket coming around the engine from the front plate that would allow us to do a couple of simple struts down to the engine mounts from its corners. Picture might make more sense.

This has the advantage of forming the base for the mounting brackets for the inverter and the high voltage junction box and maybe some of the cooling pumps. We set the height of the U to be right for the base of the inverter, allowing relatively easy access to the various connections - 35-way connector for i/o, AC input for charging, AC output for the motor, and DC input from the batteries, plus cooling in and out.

My daughter measured up and we cut three lengths out of 40mm box, as well as two plates from a length of 3mm strip that may once have been the mounting bracket for an IKEA float shelf. I don't have a metal blade for my mitre saw yet so this was done slightly unevenly with the angle grinder. I think that might be a smart purchase. We tacked this all together but putting it up against the adaptor plate realised it was all a bit skewed. So instead we tacked the sides of the U to the adaptor plate as straight as we could and then welded the base piece across them. That worked a lot better.

Eventually the U will be bolted rather than welded on, but a few tacks will hold it for now while we measure everything else up.

The two circles I drilled out of the 8mm plate will form the base of the final two struts. Just need to mock up the struts themselves now to get the angles right. More cardboard engineering.


Our neighbour, Doug, dropped the coupler back round having machined down the rough nubs left from my cutting the centre out from the BMW clutch. Looks nice now. I'll probably leave it with just a couple of welds for initial testing and then if it spins smoothly, put a seam on all the way around. If it isn't straight enough he has offered to help me align the two clutch centres as he has the kit to do it on his lathe.


I chanced across a 2kw, 220v engine heater on Wish (later found it even cheaper on eBay) that might be a good alternative to my plan of sticking an electric heater core into the BMW unit. Certainly a lot less work! Does mean more water sloshing around but it will do for now and it might also be a way of warming up the batteries on a cold day. Plumbing will be interesting. Will have to step down the 350+ volts from the battery to drive it though. At least if I am to run it within specifications. Expect the heater element would be fine with a bit more juice but doubt the integrated pump would be happy.

HV Junction Box

I've been working on finalising the HV junction box. This is where the contactors sit that switch the DC supply from the battery to the inverter (and vice versa for charging). I have probably laid this thing out about 20 times before I finally took the plunge and started drilling holes in the mounting plate. Still it was only after I had drilled three holes that I realised the polarity matters on the contactors (they're not just big switches) and so my planned arrangement wouldn't work. So, two holes in the wrong places. It's only cosmetic and I'm the only one who will see it but still annoying.

The other tricky bit about making up the junction box is connecting everything together. I figured I would have to make my own bus bars and so bought a load of 20mm x 2mm copper strip. Anyone with basic maths will realise this has slightly higher cross sectional area than the 35mm2 cables I'm using to hook everything up.

The only problem with this approach is that the contactors I bought are horizontally mounted while everything else is vertical, so my bus bars have to go through 90 degrees. I started by measuring out neat diagonals, scoring lines and trying to fold the bars along a couple of 45 degree lines to make a 90 degree bend, with a couple of other vertical/horizontal bends bringing it all back into a straight line. This worked OK but the finished result didn't look great and it took a long time.

So, on my third attempt I just stuck the bar in the vice and tried twisting it with a big pair of pliers. The result: a beautiful smooth curve with hardly any work. You live and learn.

Only seven more to make...

Engine: sold

The engine went off to Scotland this week to replace one with a terminal oil leak. Didn't get that much for it (£110) but after it being listed for nearly a month I just wanted it off the drive. The buyer left me with some of the ancillaries to sell so that will get a few more ££s in towards the project. Still have the exhaust to go as well. If nothing else the cat should be worth a bit.

Even at that low price, the car now only owes me less than £500 plus transport, so I can't really complain.

Next steps

While on holiday I updated my todo list for the project which spanned two pages before I got scared and stopped. But mostly focused on the big game of Tetris now: getting all the other components laid out in the engine bay and brackets/mounts made up for them all. I'd like to have that done this week so that I can pull it all out again for finishing and painting. While it's out we'll clean and paint the engine bay and probably give the front suspension a spruce up. Think one of the front springs is knacked so that will need replacing at the same time.

The big unknown remains batteries. I have an order in as part of a big group buy via the OpenInverter forums but it is not clear when or even if that will deliver. And I'm running out of time to get this car at least functional before my self-imposed deadline of the end of the month. So might just have to take the plunge next week and buy a small pack to get me going...

Back to navigation

Making the adaptor plate


Another week or so of big progress. Tomorrow (sore muscles permitting) I will test fit the motor and gearbox for the first time.

Adaptor Plate

Over the last week my daughter and I have measured and drilled the holes in the two halves of the adaptor plate (marking them out with a transfer punch), bolted them up to the motor and gearbox respectively, welded on some captive nuts, then welded the two plates together with a square made from the box section in the middle. It took two hole saws and a lot of sharpening of bits but we got there in the end. As of today the whole assembly can be bolted together and it is ready to go into the car for test fitting.

There's still lots of work to do on the adaptor plate. It will need cutting down to save a bit of weight. Some of the holes need adjusting. A few more welds wouldn't go amiss. And then it needs painting. But first we need to make sure it all fits, and work out how the engine mounts will bolt up. Plan is to use some of the 40mm box cantilevered off the motor plate to bolt up to the existing engine mounts. The two circles of steel cut out from the centre of the plates are actually a perfect fit for the mounts. So those will be welded on underneath. It will all make sense when you see it.


The steel tube I bought was for the coupler to link the gearbox and the motor. I bought two diameters, but it turns out I only needed the 37mm as both clutch centres will sit inside it if turned the right way around. The BMW clutch is a really nice tight fit so getting that square was fairly easy. The Fiesta clutch less so. It has funny little stepped splines that take a little balancing to get them square. And when I say 'balancing', I mean welding it, spinning it, cutting one of the welds off, hitting it with a big hammer, welding it again, until it looked pretty straight.

This just left me with the outside of the clutch centre to sort out. There's a few rough bits from where I cut it out with the angle grinder. I'd been looking for a local company to turn it down in a lathe. But then I got chatting to my neighbour from three doors down and it turns out he has three lathes in his basement workshop! It's with him now.

Before I dropped it round to him, we used it to make sure everything aligned properly before putting in the final welds on the adaptor plate. Sticking the box into gear I could rotate the prop end and watch the motor turn through the hole left by the clutch cylinder. Despite the rough way in which the coupler was put together it all seems to spin pretty smoothly. Hoorah.


While I've been working on the hardware in the day time (when I can get away from work), I've been working on the software in the evenings.

So far, I have hacked together a little sketch for an Arduino Mega clone - one with loads of easily accessible i/o pins - that can read the CANbus data from the inverter and change its state or trigger actions based on what it sees. The first thing it does is switch between a series of states: Off/On/Charging/Run etc. Each of these states will require a different set of actions. e.g in run, I have two thermostatic switches coded that will turn on the cooling pumps for the motor and the inverter when they reach a defined temperature. These will be triggered by relays connected to the Arduino.

Next step is to start reading in the shunt data and then mount it all in the car so I can begin interacting with the ABS/ASC. Fortunately, all the devices seem to run at the same bus speed (500kbps).

I also need to knock up a mount for the Arduino, CANbus interface, and various sundries. I bought an old ECU/DME off a BMW forum and I plan to harvest the connector so that I can re-use the existing loom and connectors. The stuff I want to fit in won't go in the old case so I'll 3D print something that will slot into the old cradle.

Back to navigation

Conscious coupling


Per our plan from the last entry, we have spent much of the last week cleaning the engine bay and components and preparing to start putting things back together. There's still some cleaning to do (transmission mostly) but we're now at a stage where we can start building. First order of business is getting a coupler made to link the electric motor to the transmission.

First thing I noticed on removing the flywheel from the old motor is that it is bloody heavy. A dual-mass unit, it is rather more weighty than I was expecting and I am concerned about the load it will place on the electric motor's bearings - a load I don't think they are designed to bear. You can see pictures of the flywheel temporarily connected to the electric motor on a 3D-printed test of my original coupler design below.

I could replace the heavy flywheel with a light weight aluminium version but that will add another couple of hundred to the build cost. So I am tempted to just ditch the clutch idea and connect the output shaft of the motor directly to the input shaft of the transmission. We shall see.

The next challenge is getting the coupler made. My original plan was to put something together in Fusion360 and send it off to Protolabs to have it made. But this hasn't worked out. Protolabs' machining capabilities, although sophisticated, can't reach inside the 19mm hole of my original coupler design to carve out the splines that mate it to the motor. They can 3D print it instead, but this would cost £1400 - completely out of my budget.

I have found a local company (well, Oldham) who specialise in drive trains and can cut me a slightly redesigned adaptor using wire erosion. But this would cost over £400 for the single piece and I would then need a second piece made, albeit much simpler, to stop the coupler sliding on the shaft under pressure from the clutch (if I use the flywheel) or to mate to the input shaft on the transmission (if I don't).

The alternative is to get down and dirty and make my own coupler by finding things that will fit the splines on each end. I already have a clutch plate that mates to the transmission. The challenge is finding something that mates to the motor. My fellow EV adventurer Jamie has now acquired the same motor I have and believes that a Suzuki Jimny clutch plate will fit. I'm not so sure as the spline count doesn't seem to match. We will find out today when he picks one up.

Looking at the specs for them, an old Fiesta clutch has a 19mm bore and 17 splines. I'm wondering if that might work instead. I might drop by some garages today and see if they have any old clutches lying about.

The challenge then is making something that is sufficiently balanced to spin at 7,000 RPM without exploding. It needs to be very carefully balanced and that is hard to do without a lathe. I might have to outsource it anyway, if I were to go down this route. Or I might be able to make something good enough to get me going...

In the meantime I've ordered some more parts. My high voltage cabling (doubly insulated 35mm2 welding wire, and the conduit (to give it an extra layer of protection) is on the way.

I also bought another steering rack, this time from a Mini, because the 1-Series rack didn't fit in any dimension. It was too wide and the electric motor fouled the anti-roll bar. And the angle of the input shaft was all wrong. If this Mini one doesn't work, I may have to go back to the hydraulic one and buy an electric pump. But that feels like a messy solution for an electric vehicle.

The project continues...

Back to navigation

Engine be gone


Yesterday was a wonderful day. The sun shone and my daughter and I spent the entire day outside, working on the car. She proved, again, that her mechanical instincts are sound and, dare I say it, sharper than mine. While I was hunting around on forum posts for safe alternative jacking points, she was sat by the car saying repeatedly "Dad, it's here." She was right of course.

It was a very productive day. The old engine is finally out, along with the gearbox. The two are separated and the flywheel is off for measuring. We also removed the exhaust and some of the heat shielding. And made a start on some of the areas of the bodywork that might need attention for the MOT - notably the inner sill on the driver's side which has a little more rust than I thought. We'll know more once we get the outer sill completely removed.

Big job now though is finishing my CAD model for the electric motor to flywheel adaptor. Then I can send this off to Protolabs to get it machined up. Plus we need to do some measurements for the adaptor plate between motor and gearbox and pop over to the steel stockholders to get some plate and box section.

Oh, and we need to swap the steering racks over now that the electric one has arrived and the old hydraulic one is mostly out. Need something to separate the tapers on the rod ends though.

Finally, before we start the install process, there is lots of cleaning and prep to do. Looks like the motor was a little leaky (apparently common with M43s), so everything around and under it is pretty filthy. We'll give the transmission a clean up as well, while we're at it.

Back to navigation

Doing the can-can-CANbus


With the motor running and the rain falling yesterday, I put some time into the electronics that will run the car, beyond the inverter. I stripped out the existing ECU (what BMW calls a DME) from its neat little hidey-hole up against the driver's side bulkhead in the engine bay. It sits in one of a pair of slots under a water-proof cover and I figure I may as well re-use this arrangement.

My plan is to re-use as much of the existing loom as makes sense, so I'm aiming to get hold of a knackered DME that I can cannibalise for its connectors. These will then slot into a 3D-printed case that itself will slide into one of the slots.

Inside this case, my current plan is to use a Mega 2560 Pro microcontroller. I came across these thanks to Les Pounder's blog. They run a 16MHz ATMEGA 2560 chip, the same as an Arduino Mega, but have 70 i/o pins in a nice small form factor and all of them are easily accessible. This will give me loads of scope for control of relays and both digital and analogue inputs - for example, for the RFID-based immobiliser that I'm thinking of adding to replace the one that is built into the engine management system that I will be selling.

Connected to the microcontroller will be a relay board, an MCP2515 CANbus interface, and maybe a serial interface for the BM's old K-line diagnostics (though that may not add much value - we shall see)

I am not sure how many relays I will need yet but I have space for a 16-way board. Probably overkill but nice to have the capacity. I did think about routing the 5V signals from the inverter that control the pre-charge relays and contactors over to this position and then routing them back again to the high voltage junction box. But I really want to keep any 5V signal wires as short as possible, however well shielded they may be. So I have returned to my original plan of having a 4-way relay board in a small box connected directly to the inverter, right next to the AMPSeal connector. This is on its second design revision at the moment. Based on the layout currently in my head (all of which depends on how the motor and batteries fit in - i.e. TBD), there will then be just a short hop from this box to the HV junction box where the contactors and relays sit.

The CANbus interface is what will allow me to pull data from the inverter and charger and feed it to the dashboard or other places. It should also allow me to control and monitor the ABS and Active Stability Control system (ASC). I'm completely new to CANbus apart from a few experiments earlier in the project, but with some help from the forum, am now happily gathering messages from the inverter and starting to translate and store them in a form that I should then be able to relay back out to the dash - e.g. recreating the signal that drives the oil temperature sensor with data from the motor or inverter.

Back to navigation



It has been another rollercoaster of a week on this project. At the end of last week I posted my inverter control board off to Jamie on the other side of the Pennines for him to test it in his setup. He found the same problems I did and set about trying to fix them. After much experimenting he came to the conclusion there was a slight short on the pin of the 50-pin connector (bane of this project) that carries the signal for the DC supply voltage. So, he wicked away some of the excess solder around the connector and...success! He got a stable reading on the DC bus.

Jamie kindly got the board straight in the post to me and I received it on Saturday. Excited and confident it was now working, I slotted it back into the Prius inverter, reconnected everything and bolted it all up. Where it promptly worked for all of ten minutes before failing again. Clearly the short was still there, now just intermittent. I tried cleaning around the connector some more but even though I got it working for another ten minutes, it clearly wasn't going to be reliable.

So, on Monday I took the board back to my local repair shop where Nav desoldered the 50-pin connector, removed one from the stock board, and put this in its place. I got the board back yesterday and finally, it works!

I was too tired last night to do anything really exciting with it, so I set it aside for today. Work out of the way I tried the basics of getting the motor spinning. WARNING: we are entering territory here where I know very little right now.

The first thing I did was try to get the motor spinning with the default firmware. This was relatively straightforward - with some help from the forum. If you've been following this project you will know that I installed a heating element from a washing machine as a current limiting resistor. This was chewing up too much current, starving the motor. So I swapped this out for a 20 amp fuse, stuck the inverter in manual mode and hit the motor with some hertz and some amps. And sure enough, it turned.

The nature of my motor (synchronous) means that you need a variation on the firmware to control it properly. This is called 'field oriented control' and if I'm honest, I don't really understand it yet. But I do understand how to update firmware - especially as the OpenInverter software makes it so easy. So I downloaded the latest FOC firmware, stuck it on the board and started tweaking parameters.

One I had checked the parameters matched my board, I started going through the setup process for my motor documented here. Almost immediately the motor started spinning freely with very few amps applied.

I've done some basic tuning now so that the throttle controls motor speed. But I have a few issues: it takes a lot of throttle to start the motor and then it slows at half throttle. This might be an issue with the inverter complaining about a lack of cooling, so I'll add that tomorrow.

Back to navigation

Pedal to the...plastic?


So, I've now ruled out human error on the inverter control board. I sent it across to a fellow OpenInverter forum member on the wrong side of the Pennines and he dropped it into his working setup. Sure enough, the DC supply voltage was all over the place. He's kindly trying to work out why now. In the meantime, we're cracking on.

We're making progress on three parts of the project: the throttle pedal, the high voltage junction box, and stripping the car.

Throttle Pedal

In this project I'm using a BMW 1 Series electronic throttle pedal to replace the old mechanical unit. The challenge is that - understandably given the ~20 years between the two cars - they have different fittings. So I've been working up an adaptor that will allow the 1-Series pedal to drop into the Z3 mount. This is 3D printed from PETG and currently on its third iteration

My 3D printer has chosen this moment to play up, so I can't print the latest - and what I hope will be the final - iteration straight away. But it's nearly there and I should have it sorted this weekend.

HV Junction Box

One of the first things I got working with the inverter was the high voltage electronics for the drive system. This is a relay and two contactors (effectively high voltage/high current relays) that pre-charge the capacitors in the inverter then connect it to the full force of the main battery pack, under control from the clever EVBMW control board. The next step is to assemble all this, along with a massive fuse, and maybe some other gubbins, into a weather-proof junction box

I've narrowed down my selection of boxes to a variety of ABS units with steel mounting plates in the base. I'll probably order one this weekend. In the meantime I've received the standoffs I need to mount the high voltage connections to. Just need some bus bars now.

Engine Removal

Turns out the M44 engine I have is worth a few quid. If I'm lucky I'll recoup the entire price of the car, minus delivery. So I'll be careful getting it out. Ancillaries are first and my workshop now contains some plastic trim and an air box. Radiator and some other bits will come out tomorrow, work permitting - I've started to get busy at a financially-welcome but project-blocking time.

Engine crane ordered from eBay (£130) has arrived and will be assembled to lift the lump out this weekend with a little luck. Then it will be on to a pallet and covered with a tarp ready for eBay listing.

Onwards and upwards.

Back to navigation

The price of ignorance


Progress over the last two weeks has been slow to non-existent. Two steps forward and two steps back. The problem is this: I am feeding around 30 volts into the inverter. The inverter is reading anything from 3 to 150 volts. Why? I have no idea.

First thought was that the connection between the ADC (analogue to digital converter) on the microcontroller and the sensor on the inverter was broken. But I had the board looked over and any dodgy looking connections on the 50 pin connector between the two fixed by a local electronics engineer. He had it under the microscope and all that should be ticketyboo. I checked the path with my multimeter and it seems to be fine.

Second thought was that the power supply to the Toyota board through which the sensors connect was insufficient. This came from me doing some voltage checks on my logic board and finding that the 5V and -5V supplies were a little low. Sure enough I had missed a required modification to the supplied board to swap out one of the resistors that controls the 5 volt supply. I hadn't realised this was still required on boards of my revision. So, back to the local electronics engineer to get that resistor swapped. Now I had a really solid supply voltage and... still the same issue.

Third thought was that maybe I just had a bad inverter? Only way to test this - at least in lockdown - was to go back to eBay and find another one. Unfortunately testing requires taking the inverter apart so there would be no way to return it. I stripped the control board out of my old inverter, popped it in the new one, bolted everything back together and... same result.

Now this is interesting because it confirms the problem sits either with my board or with something idiotic that I'm doing. Only suggestion from the forum so far was a bad or missing connection somewhere but I've been around and checked everything and the result is the same. Hmmm.

Unfortunately almost none the steps in trying to resolve this problem is free. Because I've learned (expensively) that I'm not good enough at soldering to handle surface mounted stuff, every modification to the board costs a few quid. And a second inverter was another £150. I can't really afford to keep thrashing around in the dark.

So, I'm going to need to find some help, through friendly people on the forums or spending some more money on consultancy from the person who designed the logic board.

One way or another I'm going to get this project done. I know that these moments of frustration will just make it more rewarding in the end. But right now the price of my ignorance feels pretty high.

Back to navigation

Tilt and slide - fixing the driver's seat


There was one electrical job left on the car that I could do while waiting for the builders to finish and clear the driveway, and for the electronics engineers I had contacted about fixing the inverter control board to get back to me. The driver's seat has both electric slide and tilt, in theory. But only the slide was working. Hit the switch for the tilt and you would get a click and tiny shudder but not a lot else. So I decided to sort this while the sun was out (briefly).

Hood down, I removed the two bolts and two nuts that hold the seat down, following the instructions on the ZRoadster forums. I then unplugged the two cables at the base and flipped the seat upside down to take a look at the mechanism.

Unsurprisingly for a 21-year-old car, it was pretty grim down there. Lost makeup containers, chewing gum packs and various other detritus, as well as some spider webs. I cleaned it all up as best I could then set about understanding how the mechanism worked.

The tilt mechanism is driven by a threaded rod that slides in and out of an aluminium retainer. I undid the nut from the pin that runs through one end of this retainer and then levered it out, thinking I would be able to spin it on the thread. But it wouldn't turn at all.

Confident that I was on the right line, I grabbed an adjustable spanner and fitted it to the retainer before giving it a twist. Grudglingly, it turned.

When it got through 180 degrees I could see that the retainer was open on the other side and that a penny had dropped in and become wedged under the end of the screw thread. This in turn was gummed in with what looked like a melted sweet or two. Nice.

I cleaned all the gunk away and then levered the penny out with a screwdriver. It was pretty deformed by the time it came out. I applied some fresh grease and sure enough the screw now turned freely in and out of the retainer.

I reassembled it all, plugged it in and bolted it down. And voila, the seat tilt worked again. I now have a much better driving position low down and a lot more headroom.

BMW Z3 seat tilt screw mechanism

Back to navigation

Fifty pins of woe


So, it looks like my nemesis on this project is going to be the 50 pin connector on the EVBMW board. Though the board functions beautifully now, it isn't talking to the rest of the inverter and I'm getting some really weird readings from the sensors. Diagnosis from the forums (and the board's creator) is that the 50 pin connector that originally caused me so many problems isn't soldered down correctly.

This time I need to find a real electronics professional as I can't afford to take another gamble on an enthusiast - welcome as their help was. Hoping to get this sorted in the next week.

In the meantime we can't really do a lot on the car as we have builders in working on the front of the house and the car is now pinned in by scaffolding. I'll just have to take some more time off later in the summer to catch up the lost time.

EVBMW Prius Gen3 inverter fifty pin connector

It's not all bad news though. Before I realised the connector was borked I got the all the high voltage electronics working beautifully. I'd post a video but it all failed before I could. When you turn the key, the negative contactor and pre-charge relays engage, then when you twist to the start position it engages the primary contactor giving the inverter the full juice. This means that once I get the inverter sorted I just need to plug it back in and I should be into motor testing.

It's all a bit of a mess in this photo because it was taken after the inverter was disconnected. But you can see the primary components and the brackets I 3D printed to hold the keyswitch, direction switch (forward/reverse) and the brake button (the red momentary pushbutton standing in for the brake signal).

Test board for Hv components in EV conversion

In the meantime I'm focusing on 3D design and some missing components. I might have a trade lined up for my old engine in return for some cash and an electric steering rack. And I'm nearly there with the shroud for the high voltage connections on the inverter.

Back to navigation

A new hope (OK, controller board)


The control board and modified inverter came back this weekend and everything seems to be working. Hit it with 12V and you get a WiFi connection and web interface. Hoorah!

I've also received from Damien a daughter-board that provides the 35-pin AMPSEAL male connector and have designed a new 3D printed part to enclose this. A few designs for this have been floating around the forum but didn't quite fit my needs so I created a two part piece to enclose the daughterboard on the outside of the inverter case. You can download it from here.

EVBMW Prius Gen3 inverter AMPSEAL connector housing

Now that all the critical components are assembled it's time to begin wiring everything up for testing.

We have a few spare old car batteries that we picked up for free from an auto electrician down the road to power things. Initially one will give us 12V for the inverter and ancillaries and the other two will give us 24-28V as primary power.

We've screwed all the HV components down to a board (the top of the same washing machine from which we got the 'current limiting resistor') along with some controls in 3D printed brackets - throttle, keyswitch, direction switch, and a button for the brake.

For now all the connectors have been terminated with connecting blocks and we are routing a motley selection of cables between them, including (of course) some that were rescued from the washing machine.

Back to navigation

Central locking and wing mirror sorted


We've now fixed the main issues with the car itself. Like the power hood, the central locking just seemed to be bad earth/connection issue. Once I stripped off the actuator, greased it and put it back together, it worked fine.

We picked up a second hand driver's door mirror from the ZRoadster forum and fitted that. Not as cheap a job as I was hoping but easy at least.

I haven't yet managed to get the INPA diagnostics software working properly - it connects but refuses to complete the diagnosis process. I've ordered a new cable to see if that's the problem but actually I'm not sure how useful it's going to be. Following someone's advice on the forum I stuck an old Bluetooth dongle on the end of the adapter for the unique BMW 20-pin connector and managed to get out the error code I was expecting, basically confirming a vacuum leak.

A little more visual inspection showed that the secondary air pump is knackered and detached from its mountings. And there's a split in the air intake hose that connects to the MAF (mass air flow) sensor. All standard stuff and not really worth fixing before I pull the lump out.

Back to navigation

Fixing the electric hood


So, one of the first things to tackle on the car was the electric hood, which the previous owners had told us was broken. Sure enough when we first tried it we heard clicking but there was no movement. My initial diagnosis (fuse, ground etc) was rather undermined by my not understanding the process you had to go through to make the hood work: ignition in second position, foot on brake, before pushing the button. I got it right the first time but then clearly didn't repeat the process. Once we worked that out and charged up a flat battery it progressed pretty fast.

When we peeled off the carpet around the hydraulics we found that the rubber bush had been replaced with a stack of medical gloves. That was a new one on me. Wish I had taken a photo before I removed them but I was in shock. Weirdly the original rubber bush was still there, just sitting in the bottom of the bracket.

We removed the pump and the rubber gloves, and scraped out the residue where they had degraded, then replaced the correct bush and tightened it all up.

I'm guessing this restored the earth connection because when we then read the manual and understood the hood process properly, it all worked fine.

Rubber gloves removed from BMW hydraulic hood motor mount

Back to navigation

The car arrives


The car has arrived! Rolled off the transporter this morning. And after waiting for some joker to unblock my driveway, I got it home.

Car runs nicely with a bit of right boot but won't idle and there's an engine management light on. Not got the diagnostics hooked up yet so not sure what the cause is, but if anyone's in the market for a four pot with 'only' 174,000 miles on it, then let me know!

First inspection only threw up a few things that need doing... Most of them are straightforward - door dings, broken aerial, rust on slam panel. Fair few scrapes, dings and cosmetic rust, but since I'll be doing a body swap that doesn't worry me (doors matter as those are kept with the body swap. Important stuff: no signs of structural rust yet (until I get those sills off) and it is very clean in the boot and under the bonnet. Hood seems in good nick with the rear window only slightly milky. Good for a few years yet, even in Manchester weather.

Things that do need doing:

  • Electric hood doesn't work (more on this to come)
  • Driver's side wing mirror needs replacing (currently held together with duct tape)
  • Both sills are badly rusted at the ends (these will be replaced as they are kept on the Z300)
  • Boot gas struts have failed (new ones ordered)
  • Passenger door central locking doesn't work - boot and drivers door fine
  • Driver's side electric seat tilt doesn't work (moves back and forward fine)
  • Water ingress in boot (carpets damp and a puddle in the left hand well below the hood hydraulics)

Took some measurements under the bonnet and the battery pack I want to use *should* fit length and width-wise, with some alterations to the radiator shroud and fan - though I'll likely swap these out for a smaller unit that can be mounted further forward and sell them on.

Still need to have a look through the service history. Then the plan is to get it up on ramps & stands and have a look underneath before we start stripping it. Oh, and I need to tap into the CANBus and capture all the messages I'll later have to spoof before I start taking the engine out. Mustn't forget to do that...

Back to navigation

My first disaster... Controller board borked


The Prius Gen 3 controller board from EVBMW comes as a kit that you need to do some soldering on to add various connectors. I've been soldering for about 35 years. But only ever through-hole stuff. Never surface mount and never particularly fine scale. I watched the instruction video from Damien at EVBMW and thought, "How hard can it be?" The answer: £300 hard. In short, I borked my first board. Or rather, the mistakes I made were so bad that by the time I handed it over to someone a bit more talented, it was pretty much unrescuable.

So, a new board is on its way direct to the person who is going to solder it up for me, and I am now practicing my surface mount soldering on old circuit boards. I'm still screwing it up. The lesson? If you are AT ALL unconfident in your ability to complete the soldering required to put this board together, hand it on to someone else and spend some money.

EVBMW Prius Gen3 inverter logic board kit

Back to navigation

CANBus & BMW diagnostics


While I wait for the car I've started sketching out the electronics and particularly the bus systems I will need to tap into in order to keep things like the instrument panel working. The ZRoadster forum has been absolutely invaluable here with links to wiring diagrams and service manuals for the Z3.

Z3s, which were built on the E36 3-Series platform, use two different bus systems - the digital communications networks for the electronics. And they still have a bunch of individual stuff as well - sensors and controls that have their own wiring rather than sending everything over a shared bus. This is both good news and bad. It's potentially simpler to wire up, but there are more wires to deal with.

These are the two buses I will be dealing with:

  • CAN Bus: the Controller Area Network (CAN) bus is used to communicate with the DME (Digital Motor Electronics - the bit that runs the engine and charging system, when it's an internal combustion engine. Largely interchangeable as a term with ECU - Engine Control Unit), ABS (Anti-lock Braking System), and on an automatic (I think) the EGS (Electronic Transmission Control - guessing the acronym comes from the original German). I will need to replicate some signals from the DME, and likely send some signals to the ABS system to keep things working.
  • D-Bus: The Diagnostic Bus is what routes information from the car out to service technicians so that they can plug in a computer and work out what is going on. My plan is to collect all the diagnostic information from inside the car and route it so some sort of onboard computer or microcontroller for logging and perhaps local control.

I used to own a late 90s E36 Coupe, and being a hoarder, I kept the diagnostic cable I bought for it back then.

BMW diagnostic cable

Now, according to this diagram, the OBD2 (On-Board Diagnostics) port should offer me access to both buses. But my 99 car is fairly early for compliance with the OBD2 standard, so I suspect it may not. Sure enough, a look at the relevant pages of the wiring diagram shows that the CANBus isn't brought through to the 20 pin connector under the bonnet, and having opened up the serial cable I can see it is only wired for the D-Bus and other old-school connections.

Inside BMW diagnostic cable


BMW's diagnostic software to use with the cable I have is now widely available, particularly the stuff for my vintage of car. I acquired a set but then remembered that it requires a true serial port rather than a USB adapter. This meant digging through my box of old laptops (of course I have a box of old laptops) until I found something suitable. A 16 year old Dell X300 with a docking station, and a serial port on that docking station. I also managed to find a matching PSU in my box of laptop PSUs (of course I have one of those as well). The laptop was running an old version of Ubuntu with a command line interface so I loaded LXLE onto it, then added Virtualbox on top of that, then installed the free version of Windows XP into there. Probably easier ways to go about it, and I won't document the whole process here, including screwing around with ini files and configuring serial port access, but eventually I had a running XP instance and could install INPA on that.

After a bit of fettling the machine started talking to the car and I could begin to do some diagnostics...

Back to navigation