Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Tell us about the project you do with the open inverter
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

Firstly thanks for posting, appreciate it :)
seb43654 wrote: Mon Mar 27, 2023 11:46 am Hi Pete, I have a full official CAN .dbc for the smart roadster. Lmk if you want it.

I also installed a iBooster in my roadster for using with openpilot: https://youtu.be/Te4AhlRXnLw

I can give you tips on full install of ibooster if you need to help. Bolt pattern is straight fit. However I used vw e-golf master cylinder instead of tesla one, and theres a few small other hacks you will need to do.

I also sell iBooster's and connector kits on my webstore: https://sghinnovations.com
I've actually already seen your videos and connector kits. It was seeing the iBooster on your car that gave me the confidence to get one. I've been meaning to contact you to check availability of the connector kits too. Unfortunately not even managed to get my iBooster out the box yet and it's all slipped a bit. Do you have stock of the connectors at the moment? If so I'll get an order placed on your site.

Very impressed with the work you have done with the openpilot install, both on the reverse engineering of the iBooster command protocol and the conversion of the Roadster steering rack to full openpilot control. Some very nice work there!

Unfortunately my iBooster is the vw version with the 2 stud fixing. I'd be interested to know which one is a direct fit for the Smart (I believe the ally and steel versions of the 4 stud fixing are different dimensions)? If one is a direct fit then I'll try to source one rather than fabricating something.

Re the master cyclinder plan-A is to make up an adaptor to fir the Roadster one, plan-B is to do as you have with the vw cylinder. Reasoning for this is the rear drum brakes, I don't know yet whether the Roadster cylinder has a residual pressure valve built into it and whether one is necessary to keep the rear brake cylinder seals happy, figured sticking with the Roadster one was a safer bet. Interested to hear whether you have had any issues and whether the bore on the vw one gives a good brake feel?
seb43654 wrote: Mon Mar 27, 2023 11:46 am Great project very interested in seeing how this goes, and if you are in the UK I would be more than willing to support you in any way necessary... I used to work at ZeroEV and highly considered converting my own roadster multiple times.

I mocked up a tesla model 3 drivetrain with calb modules, which would give a power to weight ratio similar to the new Tesla Plaid...
I like your mock up, the model 3 motor looks like it could have been designed to go in there! Interested whether the batteries as drawn will fit without cutting the boot floor? I've been using what appears to be the same 3D model of the subframe (but including the Roadster gearbox, no engine and the same issue with orientation of the damper wrt the RH mount, if it's yours then many thanks for putting it online!) which I've been using to try to estimate battery and motor fit. Unfortunately it doesn't include the boot floor, and I haven't stripped the car yet to take measurements, so don't have a reference for the space envelope available for the battery.

Hoping to start making some real progress on the car soon. So far just been messing about with bits and pieces while trying to get a few other things sorted but hoping to get it into the workshop and stripped down in the not too distant future :)

Also thanks for your offer of support, and yes I'm in the UK. It's quite likely I'll be trying to pick your brain when it comes to commissioning the iBooster. The .dbc file would also be very welcome; I think I have figured out most of the bits needed but there's bound to be something I've missed!
seb43654
Posts: 10
Joined: Mon Mar 27, 2023 11:05 am
Been thanked: 12 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by seb43654 »

Hi Pete,

Yeah connector kits for iBooster in stock and available here: https://sghinnovations.com/?product=bos ... nector-set

Thanks for the kind words on my install.

You want the Tesla version as its nearly a bolt in, and the VW one will be far more awkward to fit. The Tesla one bolts to the original brake pedal. However I have some Tesla ones sitting here missing master cylinders - I could offer you one at a discounted price and then you use the master cylinder from your VW one - win win situation! Direct message me if your interested....

I originally tried making an adaptor for the original smart master cylinder, and it worked ok, but brakes felt a bit squishy, and it was so long i couldnt store the roof bars in the frunk anymore, so I swapped to the VW one. However heres a google drive link to a folder where I put in the roadster .dbc files and the cad for the master cylinder adaptor. I have 1 spare adaptor ready to go if you wanted it too...

https://drive.google.com/drive/folders/ ... share_link

Master cylinder adaptor:

Image

Space taken up in frunk with vw master cylinder and honda accord remote reservoir (only using remote part not tank)

Image

I would love to do the model 3 setup. The X-frame would need slightly modified, and thats not the most recent cad, I had one with a 3d scan of the bulkhead too to verify batteries would fit.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

Wow! thank you, some great information there :)

Unfortunately the iBooster came without the master cylinder. At the time it didn't seem to matter as a) I didn't plan on using and b) it was so cheap that it either doesn't work or was wrongly listed. Either way it will do for mocking up the install.

I'm very keen to avoid poor brake feel. Squishy isn't quite the term I'd expect from a cylinder mismatch though, too light, too heavy, too much/not enough travel would make more sense but squishy sounds more like it could be a trace of air left in the system. I had a nightmare getting all the air out after changing cylinder to ABS unit pipes on another car which felt exactly like that (put well over 2l of brake fluid though over multiple bleeding sessions trying to fix it) - could something like that be a possibility? I think the VW master cylinder has a bore of around 23mm and the Roadster around 19mm. So could it be that the iBooster provides too much assistance for the small 19mm bore of the Roadster, or that it doesn't support enough travel. In that case the 23mm one from the VW would reduce travel and increase pedal weight - does that match what you found?

Do you know whether there is any way of adjusting the assist ratio on the iBooster (either the Tesla or VW versions)?

Assume you haven't had any issues with the rear brake drum cylinders weeping when using the VW cylinder? (thinking a bit more it seems more likely that any residual pressure requirement for the seals would likely be catered for within the ABS unit rather than the cylinder)

Also guessing that your cuts in your frunk box are for the Roadster master cylinder install? It looks like the later VW cylinder might fit without needing the cuts, can you confirm whether that's the case? If I stick with the VW booster and make my own bulkhead adaptor it looks like there is around 1" length that can be saved there (make it more like the steel flange used on the i-Pace version). Also if the Roadster cylinder pushrod was shortened it looks like the length of your adaptor (very nicely made btw!) could be reduced too. Any idea whether that might get the combined length down enough to fit without the frunk box cuts? BTW - I'm not too worried about fabricating stuff if needed (I have an old Bridgeport milling machine, lathe and TIG/MIG kit).

I really like the way the model 3 motor fits in the back and it would make for an extremely quick car. Be great to see it done although I do wonder if it might prove a little too much for the front suspension mount! Regarding the cells in your model do they all fit in the gap between the subframe and boot floor or are half below the floor and half in the boot? Hoping to get around 100kW out of the Outlander motor and while it's only half the model 3's performance it will hopefully be enough to make the car enjoyable to drive on the road (I was pleasantly surprised by how good it is on the standard ICE).

Sorry for all the questions but the brakes, and iBooster in particular, are an area of the conversion I am still unsure about and it's really good to talk to someone who has already done it :)

Edit - Just checked your shared folder - once again thanks! :D
User avatar
DkubusEV
Posts: 81
Joined: Sat Sep 17, 2022 4:22 am
Location: Australia
Has thanked: 130 times
Been thanked: 15 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by DkubusEV »

Hey Seb, your video on the self drive smart roadster is very cool. Awesome work and I might be biased as I own 5 roadsters but I'm 100% with you on it being way better than a Tesla..

Looking forward to seeing what you come up with next!
1998 Mercedes R170 SLK gs450h project
2003 Smart-Roadster hillclimb EV (DC)zilla2k
1976 Purvis-Eureka EV kit car
2011 Ford focus EV (DC)Soliton1
1990 Daihatsu charade G100 3 door DC conversion.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

This just arrived :
MCyl.JPG
Now I'm reasonably sure it's a Golf GTE master cylinder that should fit the iBooster. It was just described as a Golf part though (no mention of it being a GTE part). @seb43654 - any chance that you could confirm whether it's the same one that you are using?

Details of the cylinder part no. for reference :
MCyl_det.JPG
Edit - Also wondering whether a Vauxhall Agila brake reservoir (pre 2006) might fit, may order one to see.

Edit2 - Also looks like the Roadster reservoir might fit it too, I should check that first!
seb43654
Posts: 10
Joined: Mon Mar 27, 2023 11:05 am
Been thanked: 12 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by seb43654 »

Pete9008 wrote: Wed Mar 29, 2023 1:53 pm Wow! thank you, some great information there :)

Unfortunately the iBooster came without the master cylinder. At the time it didn't seem to matter as a) I didn't plan on using and b) it was so cheap that it either doesn't work or was wrongly listed. Either way it will do for mocking up the install.

I'm very keen to avoid poor brake feel. Squishy isn't quite the term I'd expect from a cylinder mismatch though, too light, too heavy, too much/not enough travel would make more sense but squishy sounds more like it could be a trace of air left in the system. I had a nightmare getting all the air out after changing cylinder to ABS unit pipes on another car which felt exactly like that (put well over 2l of brake fluid though over multiple bleeding sessions trying to fix it) - could something like that be a possibility? I think the VW master cylinder has a bore of around 23mm and the Roadster around 19mm. So could it be that the iBooster provides too much assistance for the small 19mm bore of the Roadster, or that it doesn't support enough travel. In that case the 23mm one from the VW would reduce travel and increase pedal weight - does that match what you found?

Do you know whether there is any way of adjusting the assist ratio on the iBooster (either the Tesla or VW versions)?

Assume you haven't had any issues with the rear brake drum cylinders weeping when using the VW cylinder? (thinking a bit more it seems more likely that any residual pressure requirement for the seals would likely be catered for within the ABS unit rather than the cylinder)

Also guessing that your cuts in your frunk box are for the Roadster master cylinder install? It looks like the later VW cylinder might fit without needing the cuts, can you confirm whether that's the case? If I stick with the VW booster and make my own bulkhead adaptor it looks like there is around 1" length that can be saved there (make it more like the steel flange used on the i-Pace version). Also if the Roadster cylinder pushrod was shortened it looks like the length of your adaptor (very nicely made btw!) could be reduced too. Any idea whether that might get the combined length down enough to fit without the frunk box cuts? BTW - I'm not too worried about fabricating stuff if needed (I have an old Bridgeport milling machine, lathe and TIG/MIG kit).

I really like the way the model 3 motor fits in the back and it would make for an extremely quick car. Be great to see it done although I do wonder if it might prove a little too much for the front suspension mount! Regarding the cells in your model do they all fit in the gap between the subframe and boot floor or are half below the floor and half in the boot? Hoping to get around 100kW out of the Outlander motor and while it's only half the model 3's performance it will hopefully be enough to make the car enjoyable to drive on the road (I was pleasantly surprised by how good it is on the standard ICE).

Sorry for all the questions but the brakes, and iBooster in particular, are an area of the conversion I am still unsure about and it's really good to talk to someone who has already done it :)

Edit - Just checked your shared folder - once again thanks! :D
Pedal feel is perfect with vw master. more responsive than old setup, almost like new car brakes rather than 18 year old brakes!!!

Travel is good and pressure required as similar to before. Pressure required with smart master was low and it was over assisting.

Yes cuts are for master cylinder in frunk liner. I would recommend fitting tesla version and it bolts on and you arent messing around making brackets for such a safety critical mounting. Then brake input fork on tesla ibooster just bolts right up to pedal.

Outlander motor will make for fun drive too!
seb43654
Posts: 10
Joined: Mon Mar 27, 2023 11:05 am
Been thanked: 12 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by seb43654 »

Pete9008 wrote: Fri Mar 31, 2023 12:32 pm This just arrived :
MCyl.JPG

Now I'm reasonably sure it's a Golf GTE master cylinder that should fit the iBooster. It was just described as a Golf part though (no mention of it being a GTE part). @seb43654 - any chance that you could confirm whether it's the same one that you are using?

Details of the cylinder part no. for reference :
MCyl_det.JPG

Edit - Also wondering whether a Vauxhall Agila brake reservoir (pre 2006) might fit, may order one to see.

Edit2 - Also looks like the Roadster reservoir might fit it too, I should check that first!
Looks like the right part! mine came with same resevoir.

you could try out vauxhall one or just go for same setup as me with cr-v resevoir which is great fit.

smart reservoir certainly does not fit atall!
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

seb43654 wrote: Wed Apr 05, 2023 5:28 pm Pedal feel is perfect with vw master. more responsive than old setup, almost like new car brakes rather than 18 year old brakes!!!

Travel is good and pressure required as similar to before. Pressure required with smart master was low and it was over assisting.

Yes cuts are for master cylinder in frunk liner. I would recommend fitting tesla version and it bolts on and you arent messing around making brackets for such a safety critical mounting. Then brake input fork on tesla ibooster just bolts right up to pedal.

Outlander motor will make for fun drive too!
Thanks Seb, exactly what I was hoping to hear. Once I've pulled things apart I'll have a look and decide which way to go with the Tesla vs VAG mount so may get back to you then.

Re the master cylinder I'd like to find one that has a low brake fluid warning switch on it if possible. Hoping I can find one that has the same feed pipe and fastener arrangement but if not I'll copy your solution :)
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

Right - another no progress update but this post may help explain why!

The following is completely off topic and not relevant to EVs at all, it's also slightly personal but might possibly help someone so I'm going to include it anyway (if I'd read something like this a decade or so ago it could have made a real difference).

Basically I've suffered with fatigue for the last couple of decades. It started off just having to be careful not to push myself too hard as if I did my energy levels would crash and need days to recover. Went to the doctors, had tests, paid for private tests but never found anything wrong. The threshold for too much steadily got worse until around 10years ago I was struggling to function and was starting to have physical symptoms (muscle weakness, poor co-ordination, difficulty getting down the stairs in the morning). More tests, again no result. However I came across some articles on food intolerance/allergies and by using an elimination diet found that food containing yeast/gluten seemed to trigger the problems. By avoiding these my health returned to normal which was great!

Unfortunately over the last few of years, despite doubling down on the diet, the problem started to come back again and over the last year in particular has really become a problem. Recently I haven't been up to doing anything physical, my coordination has got worse (to the point I haven't felt safe using power tools or doing DIY) and since Christmas I've even been struggling to walk properly and think clearly. Again, had more tests and all the results came back clear.

Luckily I came across an article on B12 deficiency, found I could tick off pretty much all the symptoms, and went back to the docs. Now I'd already had tests for B12 which had come back at the top of the normal range but fortunately my doctor had recently seen an article discussing how, in some types of pernicious anaemia, the test can give erroneously high readings and was willing to continue considering it as a possibility. There are other more specific tests for this but my NHS practise couldn't get any of them done. Again luckily the doctor was willing to prescribe a course of B12 injections to see whether they would help and the results so far have been almost magical. My co-ordination has improved, the brain fog has lifted, I'm sleeping better, moving better, less joint pain, no longer short of breath and I can walk normally again.

Unfortunately after the first 2-week course of injections ended my symptoms returned within a few days. Done a bit more reading up and this isn't unusual if the deficiency has progressed to the degree mine has. Now on the second course of injections and improving again.

I'm no where near back to normal yet but I actually made it out to the workshop today, for probably the first time in 6-months. I could only manage about an hour of easy stuff before energy levels crashed and co-ordination dropped but that's still progress, and instead of needing days to recover I'm feeling human again after a few hours. Hopefully this will continue to improve over the next few months and I'll start making a bit of progress on the car (and also on the house renovations which will help keep the missus happy!) :)

So in summary, if you are suffering from fatigue, brain fog and co-ordination problems please seriously consider getting your B12 tested (or try taking supplements). If it comes back as OK but your symptoms keep getting worse either look at getting an 'active B12' test done privately or see if you can get a course of injections to see if they help. Don't ignore it, if it progresses too far it can cause permanent nerve damage!

Addendum - If you're wondering why avoiding yeast/gluten helped it's because cutting it out meant I massively reduced the amount of carbohydrate I was eating and so had to increase the amount of protein - protein rich foods are also rich in B12! If you're wondering why the diet stopped working it's because my ability to absorb B12 has slowly been dropping, boosting my B12 initially helped when it was marginal but not any more (so it's now looking like injections for life)

Edit July23 - For anyone interested finding in more information the best resources I have found are https://www.b12deficiency.info/ and https://healthunlocked.com/pasoc. Also worth noting that when starting treating B12 it can cause a drop in other things which may need checking, in particular I've found potassium and folate levels dropped and needed supplementing, folate in particular needed methylfolate rather than folic acid based supplements (some people, including me it seems, can struggle to absorb the latter).
User avatar
johu
Site Admin
Posts: 5685
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by johu »

Thanks for sharing. Basic debugging techniques never fail to to reveal the problem :) Best recovery wishes from --- London :)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

Thanks everyone, appreciate it :) Have now been having three B12 injections a week for the last month and things are definitely a lot better. Still very tired but coordination is much better, can walk almost normally, breathing is much better and the brain fog has largely lifted. Still struggling with focus, concentration and physical activity for more than an hour or so but much, much better than it was. Just have to see what happens now the the injections have stopped!

On to more interesting stuff I've actually done a bit on the logic board. The resolver interface is now tested and working :)
ResSetup.jpg
The interface is based on the AU6802 smartcoder interface IC that is used on the Toyota Logic board. I de-soldered them and have used one on my board. It's a big relief that it works as I was worried that I might ave removed a working resolver interface and replaced it with one that didn't work!

The advantages should be that it gives better resolution and lower noise and so far the results back this up. First slowly rotating the motor (using a clamp to give leverage and avoid cogging effects as much as possible):
Rotate.png
And small movements by packing under the end of the clamp with 0.2mm, 0.6mm and 1mm spacers:
SmallMov.png
Still need to check the pole count to see if the absolute values are right (anyone know how many poles the HSG resolver has?) but they look believable. Noise levels are below the measurable limits and the resolution looks to be down below 0.1degrees so pretty happy with that.

The drive level to the resolver is 4Vrms (11.2Vp-p) at 10kHz - does that seem reasonable or should it be a bit more?

Hope to get the inverter bought in and try spinning the motor this afternoon. I've added code to do 4 semi automatic setup steps. The first just provides resolver output without PWM being active (used above). The second checks the phasing of the CTs against the PWM channels. The last two test spin the motor, either forwards or backwards,as if it's a stepper motor (just D current, no FOC control) while measuring the resolver output and the driven angle. When syncofs is right the driven angle and resolver angle should match.

Edit - I'm being dim again, now the resolver is working it should be possible to count the poles however on doing 1 full revolution of the motor while monitoring the angle I get this:
Poles.png
Now this would make it 6 pole pairs wouldn't it? The only post I've found says it should be 3 (HSG Poles) so what am I missing?

Edit2 - Still being dim! Forgot that the motor pole pairs parameter affects the resolver measurement. It was set at 2, setting it to 1 to match the resolver and another turn of the motor now gives:
PolePairs2.png
So 3 pole pairs - much better :)
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Ev8 »

That’s an impressively clean signal there! Resolution looks great this can only mean good things for your build! Sorry to hear about your health and energy level problems, I swear I go through periods of feeling very similar most days I’ve only got a morning of hard work in me, I just put it down to getting older! Lol
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

Yep, pretty happy with that although it remains to be seen whether it's still that clean once there are PWM currents flowing in the motor!

Your comment on energy levels is interesting, it exactly matches how I felt 10years ago before changing my diet (and inadvertently increasing B12 content) and more recently before starting the B12 supplements. Both times my first thought was I'm just getting older but then I'm only in my 50s now and have friends, relatives and colleagues who are 10, 20 even 30years older who have more energy. On reading up B12 and D3 deficiencies can both cause fatigue, and both seem surprisingly common. A supplement should do no harm at all and may just help so are well worth a try!

Didn't manage to try spinning the motor, partly ran out of energy but also decided that my bench power supply wasn't up to it. New 0-30V, 10A one on order which should also be useful for testing 12V automotive bits in the future.

Edit - In case anyone is interested this is the resolver interface I'm using. The schematic is for a parallel interface but the chip can also be used in SPI output mode which should be compatible with the standard F103 chip.
ResolverInterface.png
Edit2 - Aaargh - shouldn't have posted that schematic, it was tempting fate. The resolver is now tripping out on an error after a few hundred ms :(
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

Right - it seems that plugging my logic board into the inverter stops the resolver working!

Seemed really odd because I didn't think there was any connection between the two. Turns out I forgot that the OTF (over temperature fault) line from the the op-amp used to drive the resolver is also a shutdown input. The inverter is driving the MG fault line active which is backfeeding the OTF line which turns off the op-amp so killing the resolver drive. The resolver IC sees the low level, flags its own error (low drive level) and shuts down.

So it's looking like my inverter may be dead :(

Is there anything other than an IGBT problem that can cause the MG fault lines to go active? Does it need HV connected, if so what's the minimum voltage? Or do I just have a faulty inverter?

Edit - starting to wonder whether I've misunderstood how the MG fault lines from the Prius inverter work. Does anyone know whether they are active high or active low?

Edit2 - balls - they're active low, I've got the board logic wrong :( although that might mean that the inverter still works.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

Ok - Not a big problem, this is the circuit:
MGFaultFix.png
I can just remove R163 to isolate the OTF line, lift R164 to isolate MG1 and MG2 faults and then change the BKIN pins to accept an active high signal instead of active low. It means I no longer have any access to the resolver drive over temperature flag (unless I mod wire it to a spare pin) but I can live with that.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

OK, the logic board and inverter both now seem to be working and I have PWM output :)

The main problem, apart from the above, is that the HV supply terminals detailed in the wiki only work if the inverter capacitor pack is connected. Without it you need to connect power directly to the bus bars (seems incredibly obvious now I type it!).

The automated phase check seemed to work well too giving a very clear indication of the swaps needed. Unfortunately I now seem to have managed to break it while messing with other bits of the code.

I've even had the motor turning, well sort of and only in the test mode but it's very jerky. Need to go through things properly and have a look at the voltage and current waveforms tomorrow to see what's going on.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

It's working :)

Turns out the code was fine, the problem was the cheap and nasty croc clip leads I'd temporarily used to connect the motor to the inverter which are now going in the bin. Replaced them with some proper crimped leads with spade terminals to connect to the HSG. Afraid I don't know how do videos but here's a picture which includes the scope showing phase waveforms.
setup.jpg
The motor is spinning much better now, still slightly uneven due to the poles/saliency but not bad at all given it's running on pure D current. The phase detection, resolver setup and test spin steps all seem to work nicely with the new motor leads (I'll put a post up layer with details on the auto setup thread - Edit - done see viewtopic.php?p=56416#p56416).

Next thing to do is to build up a box with a few switches and pots to simulate the controls and then try running it in FOC mode!

Ohh, and for anyone interested I measured the HSG inductance at around Lq=2.3mH and Ld=1.4mH, no idea on flux linkage yet.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

No progress on the motor (the new power supply developed a fault and had to go back - awaiting a replacement).

On a vaguely related topic I've been getting fairly fed up with trying to connect up my logic analyser when debugging. Basically I've been using the fairly poor quality probes that came with it. Recently had to order a couple of chips so to get over the threshold for free delivery decided to splurge on some new probes and thought my findings may be of use to others.

First some micro probes. Decided to go for these Micro probe link. Here is a picture showing the difference, old probes on the left, new ones on the right:
MicroClips.JPG
The standard clips can only get every other pin on a 1.27mm pitch device while the new ones can get every pin. They also have two connector pins which means a single probe can drive the logic analyser and a scope at the same time.

Also got one of these Nano Probe link and here it is connecting to a pin on a 0.5mm pitch IC:
NanoClip.JPG
Well impressed with that! Always found it a right pain making a connection to fine pitch pins.

A little pricey but overall worth it.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

Well after a little over a year of messing around with this stuff the motor has just spun properly - real FOC control this time too :D

It ran pretty much first time using the settings generated with the auto/assisted setup process detailed in the other thread and spins nice and smooth.

Couple of slight issues. First I've re-written the pot code to support three pots, dual redundant throttle inputs plus another for regen - it seems to work fine but potnom is being reported wrong in the web interface. Reverse also doesn't work - pretty sure I've missed a sign inversion somewhere when translating to floating point (it's only ever been simulated going forwards).

Given that this is a completely new logic board, a new resolver interface, new analogue input circuit, different processor, ported code (including floating point main control loop, pseudo MTPV, reworked resolver and current sampling timing and ISRs) and a new motor setup process I'm pretty happy with that!

Plan now is to fix the above bugs, work though the rest of the hardware (need to characterise the temperature sensors) and figure out how to set up regen and test that it works too. Would also like to take a log to feed through the calculator to find optimum values for Lq, Ld and flux linkage for the HSG - but I appear to have broken the web interface logging too!

Edit - might have to take some of that back. Every minute or so it hiccups, only for a few ms, heard as a slight knock and a slight drop in speed before it recovers. Looks like I may need to get the binary logging going again to catch it and see what's going on.

Edit2 - going to reserve judgement on the hiccups for now. Having dug a little deeper it's pushing quite a way into FW (it's only running on 20V, so could be running out of volts), working at very low currents so noise levels are relatively high and I haven't even tuned the control loop gains yet!
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

Little more progress.

It's now running in forward and reverse - had missed checking the sign of Is when calculating Iq and Id!

Hiccuping seems to have dissapeared. Not sure whether this is linked to the above, FW which is now disabled or down to a dodgy connection on the forward input (really should make all the connections properly now it's working, just twisted together at the moment).

Web page logging is now working and the graphs are working better too. I'd been reporting the wrong value for the version spot value which meant the web interface was using the get command rather than stream which was massively slowing things down!

Still got an intermittent comms problem which I think is down to the way the RS485 direction control is done (I think occasionally the end of DMA ISR is dropping the transmit enable just after a new transmission has started). Bit more debugging needed.

I also tried taking a log and feeding it through the calculator to work out motor parameters but without load it doesn't work too well for Ld and Lq. Indicated that flux linkage is around 75mWb though.

Ohh, and the old way of calculating syncofs gave exactly the same answer as found using the new test mode method.
User avatar
Bigpie
Posts: 1586
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Bigpie »

That's some great progress. Awesome that your syncoff auto tune matches too, that's going to be a great help to many :D
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

Thanks, it's getting there :-)

Not got much done recently, energy levels crashed again! :-(

Did sort the comms problem though - there was a small window between the Tx DMA completing and the UART last byte transmission completing where starting a new transfer messed up the RS485 transmit enable control. Added and extra check in the UART complete ISR and it seems to be working fine now.

Going to see if I can sort out the inverter temperature next - it always reads 75C at the moment.

Edit - temperature sorted, when porting the code I'd copied the temperature conversion code for hwRev == HW_PRIUS - wrong one! Changed to the code for HW_REV3 and the semikron sensor type and it works fine (possibly a little high at room temp but near enough) :-)
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

Thought the following was interesting. Now the temp sensor is working I was curious whether running the motor (without any coolant) would cause a temperature rise so I put the inverter into test spin mode at 15A and plotted the temperature and this is what I got:
TempPlot.png
You can clearly see where I started the motor at around 115 and where I stopped it at around 340. What I found really interesting though is that you can see the temperature changing as the load in the individual phases changes (the test spin is pretty slow). This suggests that the temperature is actually a die temperature not a heatsink temperature. Had a quick look at the board and the middle IGBT driver on the middle phase has an extra opto (all the others have 2 this one has 3) so I'm guessing that the reported temperature is actually the die temperature on the phase 2 IGBT die??

If this is the case then I'm happy to run things a little warmer!
User avatar
bexander
Posts: 834
Joined: Tue Jun 16, 2020 6:00 pm
Location: Gothenburg, Sweden
Has thanked: 63 times
Been thanked: 89 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by bexander »

My experience is that the temperature is difficult to monitor as it changes so much with load.
Maybe better to use the coolant temp sensor, but it might be on the slow side? Or maybe move the coolant sensor closer to the heatsink?
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster (with Prius Gen3 Inverter and Outlander Rear Motor)

Post by Pete9008 »

If it was the die temp then that would make perfect sense.

The IGBT to heatsink thermal resistance and the low thermal mass will mean it will vary a lot with load. The upside is that it should be safe to allow it to go right up to the IGBT limit (125C?? - need to check) rather than the heatsink temp which is likely to be tens of degrees cooler (and as you say much slower to respond).

Edit - just checked and 150C seems to be a common max IGBT junction temperature.

Could really do with verifying the sensor calibration at higher temperatures. I'm not keen on putting the entire inverter in the oven so will need to look out for a dead inverter to do some tests on.
Post Reply