[DRIVING] - Z3(00)

Tell us about the project you do with the open inverter
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Z3(00)

Post by Bigpie »

Coming along nicely, can't wait to see it spinning the wheels.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
celeron55
Posts: 774
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 27 times
Been thanked: 110 times
Contact:

Re: Z3(00)

Post by celeron55 »

Be careful with the 220VAC engine heater. It's probably designed for AC all the way, including any thermostats, protections and the pump. With DC the non-resistive parts quickly arc and turn into black smelly lumps of undetermined material. Don't ask how I know.

Finding a way to generate 220VAC for it might be best.

The other option is to make sure the pump works on DC and to replace the non-DC rated switching parts with something else. If necessary, use an external pump.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Z3(00)

Post by arber333 »

celeron55 wrote: Wed Aug 19, 2020 9:11 pm Be careful with the 220VAC engine heater. It's probably designed for AC all the way, including any thermostats, protections and the pump. With DC the non-resistive parts quickly arc and turn into black smelly lumps of undetermined material. Don't ask how I know.
I agree. My experience was AC heater wire was touching the pipe wall and it created small short through water. I spent a month searching for it.
This is why I rather use fuel heater.
But maybe you would also want to consider PTC heater element. It is way safer, but you must have space to mount it in the air duct or near the intake.
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

arber333 wrote: Wed Aug 19, 2020 11:03 pm
celeron55 wrote: Wed Aug 19, 2020 9:11 pm Be careful with the 220VAC engine heater. It's probably designed for AC all the way, including any thermostats, protections and the pump. With DC the non-resistive parts quickly arc and turn into black smelly lumps of undetermined material. Don't ask how I know.
I agree. My experience was AC heater wire was touching the pipe wall and it created small short through water. I spent a month searching for it.
This is why I rather use fuel heater.
But maybe you would also want to consider PTC heater element. It is way safer, but you must have space to mount it in the air duct or near the intake.
My plan is to take out the switch and pump and use an external one as you say. The VW/Audi clones are dirt cheap. This just makes for a nicely-enclosed heating element basically and that was worth the money.
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

Two updates tonight because I never got around to posting the first one about five days ago...

###

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 excessive, 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.

Wiring
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).

Batteries
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...
Attachments
inverter-and-hvjb.jpg
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

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 heavy. 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!
Attachments
one-decent-weld.jpg
lid-off-bmw-330e-battery-pack.jpg
bmw-hybrid-battery-modules.jpg
bmw-330e-high-voltage-junction-box.jpg
bmw-330e-battery-pack.jpg
330-pack-close-up.jpg
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

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.
Attachments
z3-front-knuckle.jpg
nearside-wheelarch.jpg
cleared-engine-bay.jpg
bmw-z3-x-frame-close-up.jpg
bmw-z3-x-frame.jpg
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

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 everything 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.

Headlamps
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.

Charger
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.

Heater
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.

Assembly
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...
Attachments
battery_box_2.jpg
battery_box_1.jpg
battery_box_3.jpg
gasket_design.jpg
top_hat_gasket.jpg
headlight_before.jpg
front_knuckle.jpg
coilover.jpg
headlight_after.jpg
bms.jpg
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

Photos I couldn't attach to the last post...
Attachments
engine_bay_layout.jpg
engine_mounts_painted.jpg
modified_heater.jpg
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

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.

Cooling
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!
Attachments
hv-connector-printing.jpg
battery-box-under-construction.jpg
battery-box-mounts.jpg
battery-box-in-situ.jpg
battery-box-complete.jpg
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

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...
Attachments
IMG_20201018_090524.jpg
IMG_20201018_083214.jpg
IMG_20201018_083157.jpg
IMG_20201017_143451.jpg
IMG_20201017_143442.jpg
IMG_20201017_110416.jpg
IMG_20201017_110410.jpg
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

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.

VCU
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.

Monitor
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?...
Attachments
battery_box_connector_2.jpg
hvjb_connector.jpg
hvjb_plug.jpg
inverter_ampseal.jpg
inverter_ampseal_2.jpg
butchered_amp.jpg
recovered_connector.jpg
brake_pedal_connector.jpg
loom_in_progress.jpg
vcu_monitor.jpg
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

First of two updates today as I'm a bit behind. Bit of a rollercoaster...

###
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.

ECU Bay
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.

Charging
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.
Attachments
hv-wiring-1.jpg
hv-wiring-motor.jpg
hv-wiring-2.jpg
hv-wiring-battbox.jpg
hv-wiring-3.jpg
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

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...
Attachments
testing-setup.jpg
clear-engine-bay.jpg
back-on-the-bench.jpg
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Z3(00)

Post by Jack Bauer »

Right, well first off I'll say don't be too hard on yourself. I've succumbed to the same temptations with the same results. It took (and sometimes still takes) a lot of self control to know when to walk away. Especially when tired. I very , very much doubt you have damaged your motor. Assuming you had no coolant flowing through the inverter it would have very quickly shutdown.

The power rail readings are clearly very wrong. There are no mosfets on the logic board and to be honest I would consider the board scrap. Now as to why that would happen I don't know and have never seen a failure like this. The -5v rail is vital for the dc bus measuremnt circuit hence the crazy reading. I'll be doing a post office trip next week so pop me a pm and I'll send you a replacement board and 50 way connector. You can harves the rest from the dead one. At least this way you start fresh. Go slow, one step at a time and lots of tea breaks:)
I'm going to need a hacksaw
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

Jack Bauer wrote: Sat Nov 07, 2020 4:08 pm Right, well first off I'll say don't be too hard on yourself. I've succumbed to the same temptations with the same results. It took (and sometimes still takes) a lot of self control to know when to walk away. Especially when tired. I very , very much doubt you have damaged your motor. Assuming you had no coolant flowing through the inverter it would have very quickly shutdown.

The power rail readings are clearly very wrong. There are no mosfets on the logic board and to be honest I would consider the board scrap. Now as to why that would happen I don't know and have never seen a failure like this. The -5v rail is vital for the dc bus measuremnt circuit hence the crazy reading. I'll be doing a post office trip next week so pop me a pm and I'll send you a replacement board and 50 way connector. You can harves the rest from the dead one. At least this way you start fresh. Go slow, one step at a time and lots of tea breaks:)
You're an absolute legend Damien. Thank you. I'll drop you a DM now.
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

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.
outlander_inverter_1.jpg
outlander_inverter_2.jpg
outlander_inverter_connectors.jpg
outlander_phev_inverter_testing.jpg
SavvyCan
To help me with 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. [update: this is now sorted]

BMS
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 BMWE 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.
rewiring_s_box.jpg
bmw_phev_s_box_connectors.jpg
bmw_phev_s_box.jpg
Inverter repairs
In the meantime, I have stripped down the inverter and removed the broken board. Damien 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...
rusted_spring_mount.jpg
spare_wheel_space.jpg
User avatar
rstevens81
Posts: 349
Joined: Sun Dec 22, 2019 10:36 am
Location: Bristol, UK
Has thanked: 21 times
Been thanked: 91 times

Re: Z3(00)

Post by rstevens81 »

Are you using a due board or an EVTV due? Just wondering what you did?
I haven trying similar with an esp32 (dev board) plus an mcp2562 transceiver (plus mcp2510 for second can) can compile but similarly can get anything to appear in the terminal/saavycan.
(I have spent too much time looking at data sheets and EVTV manyals)
Rule 1 of EV Club is don't buy a rust bucket....
Which rule does everyone forget 🤪
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Z3(00)

Post by arber333 »

If you are interested i still have some of my V1 charger control PCBs that i designed for control of my DCDC and charger with various other options.
https://leafdriveblog.wordpress.com/202 ... ger-tests/

It is made to sit on top of the DUE board and use its resources with adding CAN chip and EEPROM to the mix. I am using two relays with host of other inputs and outputs. From that time i already designed V3 that has other options too. I included two CAN chips additional input and voltage regulator option. https://github.com/arber333/Arduino-Due-CAN-shield

I just populate what i dont have on EVTV DUE board, but V3 PCB makes stock DUE quite the same to EVTV DUE board.
Attachments
Arduino DUE EV shield.jpg
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: Z3(00)

Post by m.art.y »

bobby_come_lately wrote: Thu May 21, 2020 6:40 am SIG 1
Throttle at rest: 0.73V
Throttle at full travel: 4.00V

SIG 2
Throttle at rest: 0.36V
Throttle at full travel: 2.02V

Note on the connector: It's a Tyco unit (expensive) but there are nice cheap clones available on AliExpress - search for 967616.
Hi. Mine has got exact same connector and I got similar values, except that my values only change on SIG 2, not sure where the problem is, maybe both channels need 5 v power at the same time as I only powered channels separately. Anyways, how did you translate those values to enter them in potmin and potmax? I did them like that: potmin 0.389, potmax 2.064 but not sure if correct. :)
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: Z3(00)

Post by m.art.y »

bobby_come_lately wrote: Mon Nov 23, 2020 10:54 am SavvyCan
To help me with 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. [update: this is now sorted]
If you just want the Savvycan to read and replay CAN messages, you can use arduino nano, mcp2515 shield and a computer with linux as it works via socketcan. It works up to 500 kb/s speeds. It does trip out from time to time, but it is possible to use. Alternatively you can use a software canhacker with windows, it don't have fuzzing and other fancy features, but you can read and send CAN messages. If interested, I can post exact instructions.

Then when you finally found your messages, you can program your Due to send them or Due can work as a bridge (man in the middle) where it can modify incoming messages before passing them through. You will need 3.3 v Can transceivers for Due.
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

rstevens81 wrote: Mon Nov 23, 2020 11:54 am Are you using a due board or an EVTV due? Just wondering what you did?
I haven trying similar with an esp32 (dev board) plus an mcp2562 transceiver (plus mcp2510 for second can) can compile but similarly can get anything to appear in the terminal/saavycan.
(I have spent too much time looking at data sheets and EVTV manyals)
I'm using a due with a pair of SN65HVD230s - I've found the little ones without the screw terminals to work just fine. Took a little tinkering with libraries etc - making sure I had all the right ones - but got there in the end.
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

m.art.y wrote: Tue Dec 01, 2020 8:10 pm
bobby_come_lately wrote: Thu May 21, 2020 6:40 am SIG 1
Throttle at rest: 0.73V
Throttle at full travel: 4.00V

SIG 2
Throttle at rest: 0.36V
Throttle at full travel: 2.02V

Note on the connector: It's a Tyco unit (expensive) but there are nice cheap clones available on AliExpress - search for 967616.
Hi. Mine has got exact same connector and I got similar values, except that my values only change on SIG 2, not sure where the problem is, maybe both channels need 5 v power at the same time as I only powered channels separately. Anyways, how did you translate those values to enter them in potmin and potmax? I did them like that: potmin 0.389, potmax 2.064 but not sure if correct. :)
Your potmin and max are based on what readouts you get in the web interface rather than the resistance you read. They're based on the output of the ADC rather than the raw numbers if that makes sense?
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

m.art.y wrote: Tue Dec 01, 2020 8:32 pm
bobby_come_lately wrote: Mon Nov 23, 2020 10:54 am SavvyCan
To help me with 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. [update: this is now sorted]
If you just want the Savvycan to read and replay CAN messages, you can use arduino nano, mcp2515 shield and a computer with linux as it works via socketcan. It works up to 500 kb/s speeds. It does trip out from time to time, but it is possible to use. Alternatively you can use a software canhacker with windows, it don't have fuzzing and other fancy features, but you can read and send CAN messages. If interested, I can post exact instructions.

Then when you finally found your messages, you can program your Due to send them or Due can work as a bridge (man in the middle) where it can modify incoming messages before passing them through. You will need 3.3 v Can transceivers for Due.
Remember now that there was some sort of issue between serial and usbserial - sorry has been a busy week and didn't document it properly. But got there in the end.

I've had the MCPs running on a variety of things now - Mega2560Pro, ESP8266 - and have a few sketches for pulling out captures and pumping in frames. I was hoping SavvyCan would just make it all a bit easier - but actually I could have stuck with what I had.
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: Z3(00)

Post by bobby_come_lately »

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 (thank you @Dilbert)

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.
Attachments
savvycan.png
charger-plus-cooling-pump.jpg
test-charge-controller.jpg
battery-box-connector-v2.jpg
Post Reply