Project TBC (learn some stuff)

Tell us about the project you do with the open inverter
Post Reply
180jacob
Posts: 45
Joined: Thu Nov 12, 2020 10:55 pm
Location: South West UK

Project TBC (learn some stuff)

Post by 180jacob »

Hello,
I'm new to the forum so thought I would introduce myself and create a topic where I can write up my less specific ramblings and project progress. At present my aim isn't to get a car converted and start driving it, but instead to learn as much as possible from getting involved. I had planned to start a masters degree this year with works sponsorship but have decided to postpone that for a while what with covid. I have always learnt far more at work and doing personal projects than I ever have from formal qualifications anyway.
I work as an automation/robotics engineer in a factory manufacturing turbine engine parts and 99% of the time it involves buying commercial motors/drives/io modules etc. and wiring them together which all come preconfigured and dumbed down. I actually spend more time doing the mechanical stuff than the electrical bit. I am looking to learn more about PCB design, electronics and microcontrollers so the stuff going on here with the openinverter fits perfectly.
Budget wise I am normally pretty frugal with things but on the basis that I have spent barely anything on my hobbies this year and I value the knowledge and experience gained I don't feel too bad about buying what's necessary. To put it into context I recently finished a bachelors degree through The Open University (that work paid for) and each unit cost over £1500 and I've already learnt more from reading this forum. Pretty sure I wont be buying any tesla stuff any time soon though!
Don't get me wrong, whilst I'm not planning on converting a car yet that doesn't mean I have no interest in doing so. I am very much into cars, I drive a 1980 triumph spitfire and a mk2 golf GTi (both viable conversion candidates) and am heavily involved in rallying and motorsports. A good friend of mine is very keen on converting his mk1 mini or austin 10 so if I do happen to end up with a complete working drivetrain then it will probably end up in one of his to test it out and this will influence the purchasing decisions and direction I take.
180jacob
Posts: 45
Joined: Thu Nov 12, 2020 10:55 pm
Location: South West UK

Re: Project TBC (learn some stuff)

Post by 180jacob »

Initial items purchased (open inverter starter kit)
First thing on the shopping list was a motor. On the basis that I don't have a specific target vehicle and if I did it would be something very small like the mk1 mini I can get away with something small and cheap. To that end I purchased a 2006 RX400H MGR plus drive shafts and several meters of wiring loom for the reasonable sum of £200 delivered. I also asked for the inverter coolant pump but it seams the breaker misunderstood what he was looking for and sent the front gearbox oil pump instead. Probably come in handy anyway.
RX400H.jpg
Next up was an inverter. Prius gen 3 seems to be the go to and most versatile option. local breakers here in Cornwall don't seam to get many hybrids so back onto ebay I go, setting price lowest first of course. At that particular moment this brought up a 2014 unit part number G9200-47220 for £120 delivered. Not as cheap as some people have managed to pick them up for on here but not unreasonable so I didn't try and haggle. Received it last weekend and was a little disappointed some of the screws were missing from the HV connection cover. Is a good job I wasn't putting it straight back in a Prius as upon dismantling I found one of them loose on top of the logic board, the rest are nowhere to be seen.
inverter.jpg
You would think I am then ready to look at logic boards, but no! A 2015 mutsibushi outlander front gearbox I was watching was heavily discounted, then the seller sent me a further 10% off. As it includes two motors, all the HV and resolver/temperature loom with connectors at both ends and coolant pipes I thought £260 was too good to pass on. Reason I was interested is unlike most other OEM drive units, the motors can be separated from the gearbox potentially making them useful for converting cars with live rear axels and mounting to existing manual boxes.
outlander.jpg
It arrived on Monday this week and I was so eager to get it dismantled (partly so I could actually move it) that I now have two motors on my kitchen floor! As they are oil cooled it looks like that oil pump from the RX400H will come in handy after all.
IMG_20201123_174650.jpg
As for batteries I have been keeping an eye out for a BMW hybrid battery. For the meantime I have use of a large old heavy lead acid solar storage array that isnt being used so I can borrow that for bench testing. This means I can wait patiently for a good deal to come up. Don't know if its just me but the BMW and VW hybrid packs seem to have taken a big jump up in price recently though.
IMG_20201205_184955.jpg
That's it for the hardware for the moment, next up Logic boards.
180jacob
Posts: 45
Joined: Thu Nov 12, 2020 10:55 pm
Location: South West UK

Re: Project TBC (learn some stuff)

Post by 180jacob »

*Edited 31/12/20 - placeholder removed and full writeup added as I now have a bit of time*

Logic board layout modification

Upon receiving my inverter (2014 prius inverter G9200-47220 with logic board number F1759-47070 shown below) I found much like Stibium80 experienced with his 2012 inverter ( viewtopic.php?f=14&t=488&start=425#p16539) that these have a board with the same smaller physical layout as the Yaris/Auris, though it is unclear which MG1 current sensors they contain (I will confirm at some point I promise). The purpose of my project is to 'learn some stuff' and this gave the perfect reason/opportunity to adapt the dual motor logic board (v1d) that Damien has designed to make it fit my (and other similar) inverters. And of course adding a few extra features in the process.
prius.jpg
The PCB design files are generously provided by Damien on Patreon. These have been created using a piece of software called DesignSpark PCB which appears to have some sort of affiliation or is developed by RS-Components. I hadn't used it before though I have got a little experience using other PCB cad packages and know the basic concepts. What better way to learn a new piece of software than to open up and mess around with someone else's design!
PriusG3_V1d_dual_B3_JW.jpg
I managed to pick the software up pretty quickly, it's not overly complicated though a couple of things are a bit bazar. The mouse pointer moves to the middle of the screen when zooming which is really irritating, must be an option to turn that off somewhere. Anyway before I bore you to death, I ended up with a dual motor logic board design with the outline and connectors to match the smaller logic board (yes I checked the connector pins and 'notch' labels were the right way round at least five times). I added two extra optional resistors with solder joints to select MG1 current sensor scaling, details here viewtopic.php?p=19786#p19786. And a little 'delay on' for the DC/DC converter that Bexander suggested, details here viewtopic.php?f=14&t=1039. I also intend at some point to implement changes that people have suggested for using one wifi module but at the moment I needed something with a high probability of working so left as much as possible the same. It's not exactly clear how much of the track routing is design intention and how much is auto-routed but again for the first build 'if it aint broke don't fix it', I might get a bit more ambitious next time.

Ordering from JLCPCB

Again whilst I have used others, I hadn't used JLC before, but everything is set up to be as user friendly as possible. For those that aren't familiar, you export a fairly standard set of files known as gerbers from your cad package of choice and then upload these to the PCB manufacturer. Like all manufacturers, JLC define their preferred naming style and file contents etc for these gerbers and have guides on how to setup your design software to export these correctly, one for every piece of software except Designspark it would seem. I setup the export settings as best I could but to a large extent it doesn't matter, JLC do a pretty good job of interpreting what's in each file.
There is a gerber viewer on JLC's online order form but for some reason it didn't like the EVBMW logo and turned it into a giant spider web. I'm sure it would come out ok when manufactured but I wanted to check everything so removed it temporarily then forgot to add it back in before ordering.
Screenshot 2020-12-31 135934.jpg
The added benefit of using JLC is their SMD services meaning all the components are supplied and fitted. To facilitate this two more files are required, a BOM (bill of materials) and a CPL (component placement list), again ideally these would be setup to match JLCs preferred style. I got the BOM to export correctly though there were a few discrepancies between the schematic and PCB as well as parts out of stock at JLC (all discussed on the support thread so I wont repeat myself here). As for the CPL the default settings did the trick though component rotation was almost always wrong. JLC say they will automatically correct any mistakes, matching the rotation to the silk screen but as this was my first order I thought it best to go through and manually edit the CPL.
Screenshot 2020-12-31 141744.jpg
I placed the order on the 27th of November for 5 of these boards (minimum order requirement) and 5 of the ampseal adapter boards (more on that to follow... unfortunately). I opted for my bank to carry out the currency conversion rather than paypal which for me is slightly more cost effective, there is also an option to prepay the VAT though having never been charged VAT on anything else I have ordered from china (including expensive items like mobile phones) I declined. In hindsight this wasn't the best idea as DHL slapped an extra £10 on top to handle the VAT payment before they would deliver. I cant fault either DHL or JLC though, they both provided a very professional service.
The following day JLC had analysed the design and found a couple of warnings regarding a few pad sizes etc. but nothing that would prevent manufacture so they continued without further action. All that was left was to wait the remarkably short lead time for manufacture and delivery.

I notice there isnt much info on the forum or wiki about using Designspark and ordering from JLC, if more than a couple of people would find it useful please let me know and I will create a thread or wiki page with more detail.
sameer50kph
Posts: 1
Joined: Fri Nov 27, 2020 2:33 pm

Re: Project TBC (learn some stuff)

Post by sameer50kph »

can you please share the weight / dimensions of the package delivered ? i want find out the international shipping cost
180jacob
Posts: 45
Joined: Thu Nov 12, 2020 10:55 pm
Location: South West UK

Re: Project TBC (learn some stuff)

Post by 180jacob »

sameer50kph wrote: Sat Nov 28, 2020 3:24 pm can you please share the weight / dimensions of the package delivered ? I want find out the international shipping cost
Assuming you mean for the Outlander gearbox&motors, this arrived on a standard UK pallet (1200mmx1000mm) though it would have easily fitted on a euro pallet (1200x800). I haven't weighed it myself yet but looking at other peoples measurements I would say it was over 100kg including the pallet. Was definitely too heavy to move in one piece.
User avatar
jalovick
Posts: 96
Joined: Mon Mar 11, 2019 10:14 am
Location: Sydney, Australia
Has thanked: 10 times
Been thanked: 7 times

Re: Project TBC (learn some stuff)

Post by jalovick »

I'm going a similar route. I've grabbed both a Prius C/Auris/Yaris inverter, and a Camry AVV50R inverter, a couple of Outlander PHEV rear motors, and a RX450h rear motor. I already have a Prius Gen 2 (I think) battery to use for testing, I just need to work out how to charge it (I can do pairs of cells using a hobby charger if needed). I'll be ordering the Yaris/Auris Open Inverter board soon. I've also grabbed some HV cables and charge ports from an Outlander PHEV as well.
nuffz
Posts: 21
Joined: Sat Dec 12, 2020 6:22 pm

Re: Project TBC (learn some stuff)

Post by nuffz »

how is this going? im watching with eagerness. ive brought a gen 3 inverter and transaxle to somehow go in a fiesta im going to duel motor them
180jacob
Posts: 45
Joined: Thu Nov 12, 2020 10:55 pm
Location: South West UK

Re: Project TBC (learn some stuff)

Post by 180jacob »

nuffz wrote: Sat Dec 19, 2020 12:29 pm how is this going? im watching with eagerness. ive brought a gen 3 inverter and transaxle to somehow go in a fiesta im going to duel motor them
Sorry for the lack of progress updates, I plan on writing everything up next week when I have some time off work. Cant believe a month has gone by already. In summary, boards have arrived and I have tested one out with a very basic setup. All appears to be working fine, motors spinning etc, subject to further testing.
nuffz
Posts: 21
Joined: Sat Dec 12, 2020 6:22 pm

Re: Project TBC (learn some stuff)

Post by nuffz »

im looking forward to reading it
180jacob
Posts: 45
Joined: Thu Nov 12, 2020 10:55 pm
Location: South West UK

Re: Project TBC (learn some stuff)

Post by 180jacob »

Boards arrived, time to start building
Boards were manufactured and dispatched considerably faster than I expected, so much so that I had to change the delivery address as I wasn't due to be at home for another week. DHL managed to accommodate this, just about. Delivery arrived on the 9th of December just a week and a half after ordering, items were very well packaged and they even included some kind of JLC Christmas keyring???
Quality of the boards and component placement is absolutely superb.
IMG_20201231_205538.jpg
I started by just soldering a couple of pin headers onto the programming ports to make sure everything was working before going any further. Following Damien's three part video guide made this a piece of cake and is very well documented so I don't have anything to add here. Both stm32s and the Atmega programmed first attempt and I had the LEDs blinking in no time. It did take some searching to find the various pieces of software, firmware, bootloader etc to download but that's probably just me being blind, I will try and add links in the video comments section if I remember.

I removed the connectors off the original Toyota logic board (because I'm cheap) with a hot air gun, they all came off fine and soldered onto the new board with ease. I left all the optional solder joints and jumper headers disconnected for the time being, including the two new ones for setting current sensor scaling, will see if they are required in due course. The IDC connector needed a little bit of trimming to avoid interfering with resistors R1 to R4. If I make any more I would change the position of those on the layout.
IMG_20201227_220744.jpg
IMG_20201227_220751.jpg
IMG_20201227_220812.jpg
IMG_20201227_221510.jpg
Once completed everything fitted nicely into the space from which the original board was removed. All holes lined up and connectors fitted which was a relief.
180jacob
Posts: 45
Joined: Thu Nov 12, 2020 10:55 pm
Location: South West UK

Re: Project TBC (learn some stuff)

Post by 180jacob »

Wifi moduels
As mentioned previously, my intention is to try out Johanus' idea for using one wifi module for both microcontrolers (viewtopic.php?f=5&t=1166), though for the time being I ordered a couple of ESP-01S modules instead of the Olimex module everyone else is using. Main reason is because cheap, I mean how do they even make these for 82p each? https://www.aliexpress.com/item/32339917567.html
I also bought one of the Wemos D1 mini modules to try out as well because I liked the built in USB ch340 chip and the extra GPIO pins.
https://www.aliexpress.com/item/4001291931302.html
I Will probably end up using it on a different project but I think someone else has already proven these work with the open inverter web interface.
Does anyone know why the Olimex module was chosen in particular for the open inverter boards? Seems a bit of a faff having to solder that jumper to program it when there are easier cheaper alternatives.
Screenshot 2020-12-31 210858.jpg
To fit the ESP-01S modules I first used male headers on the board and female to female wires as a temporary measure, after confirming it was working. I then swapped the headers on the board for female ones and performed some pin yoga on the ESP-01S modules to match the pinout.
To clarify this isn't the final solution, just a slightly robust temporary one until I swap to just one module.
IMG_20201227_180231.jpg
IMG_20201227_191208.jpg
IMG_20201227_185343.jpg
IMG_20201227_191241.jpg
180jacob
Posts: 45
Joined: Thu Nov 12, 2020 10:55 pm
Location: South West UK

Re: Project TBC (learn some stuff)

Post by 180jacob »

Easiest way to open a new inverter
I'm sure everyone is going to have their own favourite way of doing this but this is what I found to work.
Remove the two coolant pipe rubber seals then insert a loose fitting steel tube (preferably round but mine happens to be hexagonal, it doesn't matter, a deep socket would probably do). Hey-presto you now have two solid pry points in opposite corners to slowly ease the two halves of the aluminium casing apart. No hammers required. Obviously if you want to go the extra mile you can wrap the screwdriver/prybar in tape to protect the aluminium surfaces.
IMG_20201227_161711.jpg
180jacob
Posts: 45
Joined: Thu Nov 12, 2020 10:55 pm
Location: South West UK

Re: Project TBC (learn some stuff)

Post by 180jacob »

Ampseal adapter board
Seen as I don't have any plans to put this stuff in a car any time soon, I haven't ordered any of the ampseal connectors, though I thought the adapter board would still be useful as something to solder wires on to. In my haste to place the order with JLCPCB I didn't pay much attention to the actual design of this and simply downloaded the only available gerbers from Damien's github then uploaded them straight to JLCPCB. For some reason I just assumed the 34pins of the insulation displacement connector (IDC) where mapped directly to the 35 pins of the ampseal connector, they are not.

On the single motor logic boards all unused pins are connected to ground and the same cross connections exist on the adapter board as well. This is all very sensible stuff, but now we are using some of those previously unused pins it's important not to plug in an unmodified single motor adapter board else it will short several pins to ground. I don't think any permanent damage would occur, but you definitely wont get any MG1 resolver input. Thankfully I noticed before soldering it up anyway.

I haven't seen anything to suggest there is a new design adapter board but at the same time I'm not sure what Damien is selling with his dual motor kits, the photo makes it look like the single motor variant. If no design exists I will happily volunteer to do one, as well as updating the IDC and ampseal pinouts listed on the wiki. Edit: Damien has done a dual motor version and the pinout is now on github.

Anyway in the meantime if you wish to use the existing single motor adapter board then a few tracks need to be cut (I knew the scalpel would be required at some point, just glad it's not on the logic board)
One cut needs must be made on the IDC side (obviously before the IDC is fitted) and three on the ampseal side, shown in red. A further four cuts are optional if you wish to repurpose the pins on the ampseal connector, shown in blue, though these are on an inner layer so you have to go quite deep.
InkedIMG_20201226_214126_LI.jpg
InkedIMG_20201227_171729_LI.jpg
After all that cutting I realised for my purposes a humble piece of veroboard would have sufficed.
180jacob
Posts: 45
Joined: Thu Nov 12, 2020 10:55 pm
Location: South West UK

Re: Project TBC (learn some stuff)

Post by 180jacob »

Spinning motors
Once everything was connected the first step, which is easy to overlook, was to calibrate UDC. Suppose it isnt essential but needs doing at some point anyway. Fairly straight forward procedure, just adjust udcgain and udcofs until the inverter reads the same as a voltmeter. The same should be done with the current sensor readings, though I skipped that for the time being. With that out the way I decided to start with the Lexus RX400H MGR motor connected to the MG2 inverter output as this is the most well proven and there are other peoples parameter files available to copy. I already had a mk4 VW golf accelerator pedal and I was also just using a 60v 5a bench power supply for HV at this point. The pedal has two potentiometers so I had set the 'potmode' parameter to dual channel but I soon found the values were non linear and differed by more than the hardcoded limit of 10, doesn't matter as its not going in a car... yet.
Having got that working it was time to up the voltage, add a coolant pump (with hose pipes of course :)), and most importantly add a second motor. I wired up one of the Mitsubishi Outlander motors to the MG1 output and associated resolver connections. I picked the motor that has slightly longer HV cables to make it easy to get all this stuff on the workbench. I did have to undo the very nicely terminated shield on the HV cables though else I wouldn't be able to use a clamp meter.
It didn't take long to get this running in manual mode either, but there were a few things to figure out before it all worked together in normal run mode. I will save that for another post, in the meantime here are a couple of videos of it working: (sorry the coolant pump is noisy in the video, isnt anywhere near that loud in real life)



And with a clamp meter to prove it's real ;)



Parameter files for the setup shown here are attached, and if you are following along then it is worth heading over to this support thread post where I have shared the can mapping viewtopic.php?p=21390#p21390

I will try and do more regular updates, hopefully it hasn't taken as long to read as it did to write it today. Not sure what I will look at next, probably some more in-depth testing and comparing MG2 and MG1 outputs. Next couple of weekends though I need to rebuild and fit the cylinder head on my MK2 golf, over a hundred moving parts in the head alone makes an electric motor look so simple.

Anyway in the meantime, if you have any thoughts or feedback just comment away.
Attachments
MG1.json
(1.28 KiB) Downloaded 302 times
MG2.json
(1.28 KiB) Downloaded 306 times
User avatar
konstantin8818
Posts: 290
Joined: Sun Jan 19, 2020 2:33 pm
Location: Minsk, Belarus
Has thanked: 2 times
Been thanked: 8 times

Re: Project TBC (learn some stuff)

Post by konstantin8818 »

Great job! I recieved my boards from jlcpcb yesterday(new year gift=)) and going to test them as soon as I can. Thank you for helpfull tips about adapter board and web interface. :D
nuffz
Posts: 21
Joined: Sat Dec 12, 2020 6:22 pm

Re: Project TBC (learn some stuff)

Post by nuffz »

well done Jacob this is very impressive. If you can design the ampseal to what you need i will order them for you
User avatar
Jack Bauer
Posts: 3582
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 2 times
Been thanked: 141 times
Contact:

Re: Project TBC (learn some stuff)

Post by Jack Bauer »

There is a dual motor ampseal board design done. All dual motor kits are supplied with one. Sorry just reread if you have gotten the wrong adapter board shoot me a pm and I'll pop the correct one in the post.
I'm going to need a hacksaw
180jacob
Posts: 45
Joined: Thu Nov 12, 2020 10:55 pm
Location: South West UK

Re: Project TBC (learn some stuff)

Post by 180jacob »

Battery Purchase
It's been several months since I last wrote an update, where do the weeks go! Anyway I have been on the look out for a good deal on a battery since I started this project and found what I needed at the end of January. This post will focus on the purchase, but I have also added a few pictures to the technical thread here: viewtopic.php?p=25610#p25610
It seems there is no reasoning to the price of batteries on Ebay, either the breakers don't understand how to value them (completely useless prius batteries for >£1k?) or have unrealistic expectations based on what all the other ones are listed at despite none of them actually selling. Anyway rant over, I found a BMW hybrid pack listed for £1000 or best offer plus £50 postage. Listing link probably wont last very long but here it is: https://www.ebay.co.uk/itm/BMW-3-Series ... 2655896509
BMW 3 Series G20 2.0 Hybrid Battery 9494039 2019 Completepng.png
The listing gave almost no details, the pictures weren't very clear and the seller had poor feedback, but the price was pretty competitive. After a bit of detective work I discovered there was a good chance this was one of the newer higher capacity 12KWh battery packs, thus making the price considerably more attractive. I paid the asking price not wanting to have someone else click buy whilst I made an offer, I felt sub £100 per KWh is a perfectly reasonable deal anyway.
The pack arrived on the 26th of January, and I was pleased to find it was indeed a 12KWh version. I was also pleasantly surprised that the pack was dated 6th of Feb 2020, so less than a year old when I received it, despite the listing saying it was from a 2019 car?
IMG_20210126_124232.jpg
IMG_20210126_124250.jpg
IMG_20210126_202823.jpg
I was less pleasantly surprised to find it was missing the HV connector and cable that were clearly shown in the listing photos. I contacted the seller and he told me it had gone in the scrap as they had cut the other end! I only wanted one end of the cable with a connector anyway as the other will be hard wired to the inverter. I eventually managed to get £50 back which went some of the way towards an £80 full length cable from a 5 series.
Disassembly commenced and thankfully the cells all appear to be in very good condition. Total pack voltage at the time or receipt was 343.9V and the maximum difference between the cell voltages (known as cell delta) was 3mV.
IMG_20210126_203253.jpg
IMG_20210126_204002.jpg
This pack is truly a work of art in its construction, BMW must have put millions into the engineering design and development of it. Despite a bit of hassle in getting a partial refund I still think I have got a good deal. Its worth remembering that unlike when buying brand new battery modules, all the interconnecting cables, BMS, contactors, fuses etc. are all included in this so by that measure these salvaged packs are very good value, it's just a shame there aren't more available yet.

I have been experimenting with using the prius inverter to come up with a charging solution which uses both buck and boost modes but will detail that in a post at a later date (probably 3 months time at this rate!).
pedro
Posts: 2
Joined: Mon Apr 04, 2022 4:37 pm

Re: Project TBC (learn some stuff)

Post by pedro »

Hi,

I'm new to the channel and looking at converting a mk1 golf. The batteries look interesting I can't find any info on weight and dimensions. Could you post?
bjp
Posts: 9
Joined: Tue Jul 02, 2019 12:01 am

Re: Project TBC (learn some stuff)

Post by bjp »

Thanks for the posts. I'm just at the research stage for my own project, looking at EV conversion of a 1974 Mini. Hoping to use a Toyota Aqua (Prius C) as a donor car, using the dual motor drive concept, as they are popping up regularly at the local damaged vehicle auctions. I wondered why, did a bit of research, and it turns out they are a popular car for stealing for committing commercial burglaries, as they don't have immobilisers fitted! Complete vehicles sell for around $2k (NZ), about £1k. Hopefully I should recover half the cost selling what I don't need... Once I have got the vehicle and pulled the transaxle/inverter/battery, etc, I'll be following your footsteps, getting a board and get everything turning. Biggest problem I see here in NZ is getting hold of a battery pack - not many EV vehicles being wrecked except for the odd Nissan Leaf, which sells for around £3-4k complete wreck, as they are a popular source for off-grid batteries.
Post Reply