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

Post by Pete9008 »

Peter wrote: Fri Sep 30, 2022 6:29 pm Even so with 100kW you will be flying :-)
Sounds good :)

Need to familiarise myself with all the options for foc, so far had just been thinking that throtcur would do most of it but there are obviously a few more options to consider.

Edit - thinking a bit more I'm not that fussed about 0-30 acceleration, it needs to be reasonable but that's all. Its more the bit from 30-70 that determines whether a car feels slow or not so throtcur probably will do most of the job.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster

Post by Pete9008 »

When I first started this project one of my first questions was how much can you get out of a motor - how much can it be overrated in terms of power and torque. Unfortunately there wasn't an awful lot of data (there was a fair bit of speculation though ;) )

Well the simulator has got to a stage now where I think it may be possible to use it to get an idea what a motor can do. This is a plot produced using it based on winding inductance measurements taken on the Outlander rear motor I have, and a few guesses!
OutlanderRear.png
I produced plots for a few other motors based on other peoples measurements which can be seen here viewtopic.php?p=47770#p47770

Now I very much doubt that it is perfect but I what it does do is increase my confidence level in a few of the total guesses I made at the start. These were that I could get 100kW out of the motor (Mitsubishi spec is 60/70kW) and 250Nm torque (Mitsubishi spec os ~195Nm). The graph comes pretty close on both of these. On other motors, where more data is available, the simulator seems to be underestimating a little so overall I'm fairly happy that the 100kW and 250Nm I'm after should be possible.

It also gives a good idea of what the torque curve might look like which is something that worries me about EVs. I'm used to ICE cars and they have a pretty flat torque curve, the electric motor drops off at higher speeds (although changing gears in a ICE has the same effect). The graph has convinced me that I will have enough punch left at say 60mph for it to still feel quick enough at A-road speeds :) (although if I can afford the weight I'm still tempted to keep the Roadsters gearbox so that I can use 2nd for sports mode, 3rd for more relaxed cruising and maybe even 4th for economy? (it's a 6speed box btw).

The measured winding inductances of the Outlander motor, at Lq=.3mH and Ld=0.16mH, also means that it is fairly low inductance. This means that it shouldn't suffer from any of the remaining FOC control issues.

The only slight worry is that, being low inductance, it may not be happy being driven at the Prius Inverters 4.4kHz upper PWM limit.

Does anyone know what frequency the OEM Outlander rear inverter runs at?
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Smart Roadster

Post by Pete9008 »

Ages ago I started designing a PCB (see viewtopic.php?p=39624#p39624 for details). It never got finished because I ended up going down the simulator rabbit hole to prove to myself that the FOC control with OpenInverter was the right way to go. Well I'm now happy that it is and so I can now get back to the hardware. Here is version 2 of the PCB:
PCB_Ver2.png
It's essentially a slimmed down version of the last one but modified to reflect the stuff that I've learned on the simulator and logging threads. So what's changed and what's still there?

First the unchanged bits, it still uses reclaimed Toyota connectors for the interface. It also uses the resolver interface IC off the Toyota board.

Pretty much everything else has changed:
  • The STM32L496 has gone, at some point in the future it will reappear as part of a climate control and charg controller. This change has also simplified the power supplies as the permanent 3V3 rail is no longer needed.
  • It no longer uses the STM32F103 for motor control. Instead it uses a STM32F405 (actually a 407 as I've managed to get hold of a eval board with one on).
  • Both CAN interfaces on the F4 are routed out, one will be for the BMS bus and one to interface to the Roadster CAN bus.
  • Both advanced PWM timers on the F4 are used, one to drive MG1 and one for MG2. Not planning on using this feature but it seemed sensible to track it out that way. If both were used, and separate resolver interfaces needed, a second resolver daughter board would be needed connected to a header. There are also links to allow both to be driven from timer1 which is the way I plan on using it.
  • I'm a little concerned about current sampling on low L motors so have added anti-aliasing filters (2nd order sallen-key) on the current input lines to make things a little easier.
  • The ESP8266 module and SD card that were on the board have been removed. Instead a remote ESP32 with an SD card (as per the logging thread) will be connected via a RS485 link. This removes the wifi from inside the screened metal inverter housing which should both remove the noise it induces and improve signal strength, hopefully to the point where it can connect to the house wifi from the parking spot around 20m away. It also makes it much easier to modify if needed and the card can be removed to read the logged files.
  • It now has a STM32F103 driving the DC/DC converter and buck/boost converter. Probably overkill but I have a few and it means that the CAN interface can be used to control it.
  • It has an interface for a HLSR current transducer, intended for measuring the current in the buck/boost converter, connected to the F1 processor.
It's not finished yet (the signal tracking was supposed to be this afternoons job but I got sidetracked onto the final simulator release) but hope to get it done and out for manufacture in the not too distant future.

Moving to the F4 will be a bit of a pain but I think it will be worth it. While the fixed point math works well on the F1 the floating point coprocessor on the F4 will eliminate all the potential for overflows, improve performance and should make the code simpler and easier to maintain. I was planning to change the way the peripherals were configured to reduce latencies anyway so combining the move to a different processor at the same time makes sense.

Still been very little progress on the Roadster itself, it's sitting under the carport looking fairly sorry for itself. I need to decide whether to start pulling it apart now or whether to try and catch up on the house for the next couple of months and then re MOT it in the new year so that it's road legal for the duration of the conversion. Erring towards the latter given that I can still progress the new board and it's firmware in the evenings.
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Smart Roadster

Post by johu »

Nice one.
Given the latest experience with Prius transmissions it seems sensible to run both motors and put the second resolver IC on there (despite not being a huge fan of dedicated resolver chips)
Maybe this helps to get you started on an F4 implementation: https://github.com/jsphuebner/libopeninv/tree/stm32f4
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

Post by Pete9008 »

johu wrote: Wed Nov 16, 2022 7:31 pm Nice one.
Given the latest experience with Prius transmissions it seems sensible to run both motors and put the second resolver IC on there (despite not being a huge fan of dedicated resolver chips)
Maybe this helps to get you started on an F4 implementation: https://github.com/jsphuebner/libopeninv/tree/stm32f4
Thanks, have seen that but not had a proper look at it yet.

With the resolver I've run out of pins on the connector, and partly space on the board. The thought was that if the gears are welded up in the Prius transmission then one resolver would do, if not a second resolver could be added using the SPI pins that happen to be available on the JTAG programming connector.

With the resolver chips I wouldn't buy one to use (as they are not cheap!) but given that they are essentially free with the Prius inverter it seems a waste not too. If it works then getting the angle just becomes a read from the FSMC interface. If it doesn't then I feel a bit silly and have to respin the board!
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 »

Very keen to follow along for this one as I have 5 smart roadsters (one of my favourite cars of all time) one of which I'm building into a ev hillclimb racer (small battery not a problem for that). But I've also just started on the other car you were choosing from the SLK Mercedes Benz for the same reasons you mentioned. I live far from the city so the battery capacity won my decision making process. Have just received my gs450h parts and now just waiting on the zombie to arrive in Australia... looking forward to hearing more regarding the smart roadster you're building. Cheers guys.

Mike.
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 »

The Roadster is a nice car isn't it! I had never considered one before as I had just assumed I wouldn't fit (I'm 6' 4") but seeing a post on another forum made me reconsider. There is really nothing else quite like it and I'm on the lookout for another myself, 5 could be considered a little excessive though! ;)

Which generation SLK are you doing? They should be a much more practical proposition for an EV conversion and the 450h transmission should be a good match.

What battery are you using for the hillclimb car? Capacity may not be an issue but I'm wondering if peak current from a smaller pack might be? Also what motor are you going for?
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 »

Yes 5 is probably too many but over here in Australia these little cars are seriously rare and I figured I might need a spare car or three if someone crashes into me one day (it's happened once already) as people don't look for little cars (or motorcycle's).

The SLK is the first generation "R170" (25 years old and qualifies for historical cheaper registration here). Majority of my vehicles are all over 30 years old other than the roadsters.

For the hillclimb racing roadster the battery will be a very specialised cell chemistry and configuration to allow well over 1,800A for upto 60 seconds. The battery will be of modest "capacity" but it's physical size isn't. It sits where the passenger would normally be to offset the weight of the driver and the twin Warp9 DC motors with Z2k controller.

Quite experimental but should be very quick off the line, (if it doesn't break itself).
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 »

DkubusEV wrote: Wed Dec 07, 2022 12:55 am For the hillclimb racing roadster the battery will be a very specialised cell chemistry and configuration to allow well over 1,800A for upto 60 seconds. The battery will be of modest "capacity" but it's physical size isn't. It sits where the passenger would normally be to offset the weight of the driver and the twin Warp9 DC motors with Z2k controller.

Quite experimental but should be very quick off the line, (if it doesn't break itself).
Wow, that should go nicely :)

Very interested in hearing more, especially about the batteries. What are your plans for the rear suspension/drivetrain? Do you have a build thread anywhere - or plans to do one?

Not a lot of progress on mine recently, been feeling fairly rubbish so not got done much. I have managed to get the inverter logic PCB finished though so hopefully should have that back from manufacture early in the new year.
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 »

I haven't done a build thread as I don't really have time and for a race car I'm kinda keen to "surprise" my potential competitors (rather than warn them) lol. But perhaps after the car has run a few times I'll do a retrospective build biology run through.

Rear end of car is completely custom fabricated with alloy five link rods and pushrod and bell crank actuated suspension damper units with option for 3rd member acting on pivot anti roll bar for heave compensation if I decide to add loads of aerodynamic downforce ?? Lots still to do...
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 »

DkubusEV wrote: Thu Dec 08, 2022 11:01 pm I haven't done a build thread as I don't really have time and for a race car I'm kinda keen to "surprise" my potential competitors (rather than warn them) lol. But perhaps after the car has run a few times I'll do a retrospective build biology run through.

Rear end of car is completely custom fabricated with alloy five link rods and pushrod and bell crank actuated suspension damper units with option for 3rd member acting on pivot anti roll bar for heave compensation if I decide to add loads of aerodynamic downforce ?? Lots still to do...
Sounds a fantastic project, love to see/hear more once you're happy to share.

Suspension sounds similar to the bell crank system I put together on the front of my track car. Started off designing using a blade to provide the spring element for the anti roll but due to the limited adjustability and design uncertainty on spring rates I went with a rocker arm working on a pair of die springs underneath. Not as light but very easy and cheap to have both fine (via link positions) and coarse (via spring change) rate adjustment. Not the best picture but I think it shows the idea.
FrontSusp.jpg
Have you kept the dedion axle?
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 »

Very cool set-up. No I don't have the DeDion axle any more in this car, the whole back of car behind the tridion main hoop is cut off and now the rear end is a tube frame with long 5 link rods per side. Basically the link rods are totally adjustable "wishbone replacements" that extend all the way from the diff centre to the hub carrier. 3 lateral links and two drag links per side of the car. Lots of adjustable range so I can get it really wrong or hopefully really good (eventually)...
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 »

Sorry, I usually associate 5-link with live axles (two trailing links per side plus a panhard rod or watts linkage) and hadn't read you post correctly!

So is that two links at the bottom of each upright (one of them used to adjust toe in), one at the top (adjusted to set camber) and then a drag link at the top and another at the bottom (adjusted to set castor)? As you say infinitely adjustable. I went for solid wishbones with very limited adjustment and lots of simulation first to fix the geometry. Seems to have worked and it handles pretty well (although it took a while to tame the snap oversteer!).

For a while I wondered about adding a MGR or similar at the front (currently only RWD) of the track car to recover energy when braking and provide AWD out of corners but it was battery technology that stopped me investigating further (considered super caps but didn't like the compromises). Glad I didn't go any further with it as the MGR would have proved pretty useless at track speeds! The thought is still at the back of my mind though so very interested to hear how you get on.
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 »

yes the rear suspension is exactly as you describe (10 link rods in total) plus the push rods and bell cranks for the central mounted (above the dual motors) coil over damper units. for now ill stay RWD only but that may change if i cant use the power effectively.
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 »

Sounds good! I spent quite a lot of time looking at front and rear roll centre movement and camber change during bump and roll before finalising the upper and lower link locations. If you haven't already done this it would be worth a look before fixing the mounting points.

Be interested to hear more about the Purvis conversion too (believe it is the same car as the UK Nova?)
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 »

Yes the "Purvis Eureka" is the Australian Licenced version of the UK-NOVA (but of course not the Chevy Nova). When I get a bit further through this gs450h EV conversion with the SLK I hope to have some more spare time to do some "build biology" type of threads for each of my EV projects.
Attachments
my "other" Nova/Eureka (built in 2006)
my "other" Nova/Eureka (built in 2006)
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 »

DkubusEV wrote: Thu Dec 15, 2022 3:10 am Yes the "Purvis Eureka" is the Australian Licenced version of the UK-NOVA (but of course not the Chevy Nova). When I get a bit further through this gs450h EV conversion with the SLK I hope to have some more spare time to do some "build biology" type of threads for each of my EV projects.
Noticed that your image is marked as built in 2006 - does that mean that it's the later space frame chassis version rather than the Beetle floorpan underneath? A retrospective build thread on your EV conversions would be be great :)
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, had an email from JLC saying that I should have my logic board by Christmas so need to start thinking about building it up. I have all the parts although some of the chips are still on the Toyota logic board/STM eval boards so they are in sealed bags with desiccant to get all the moisture out and so reduce the chance of them being damaged when being removed and re-soldered.

Also need to start thinking about firmware. The board used the STM32F405 processor rather than the STM32F103 so it runs faster (168MHz rather than 72MHz) and has an integrated floating point coprocessor. Both these changes are looked after by the compiler and have little impact on the firmware and the old code would likely run with minimal changes. It also has a whole new set of peripherals with different capabilities and control registers and the old firmware will not play nice with these :(

Fortunately LibOpenCM3 already supports the F4 series which should minimise the pain. Johannes has also done a port of LibOpenInv to the F4 but it doesn't look like it has been updated for a while, so won't include the latest features, and it's not clear whether it has ever been used in anger. I think instead I'm going to start with the latest F1 version and port it across fresh. This has the advantage that it's up to date tried and tested code code that I'm already familiar with. I'll also need to make a few other structural changes, irrespective of the starting point, to cater for the dedicated resolver chip and to reduce control loop latency. he aim is to get to a motor current/motor position measurement to PWM value update latency of the order of 30us. Given the low inductance of the Outlander rear motor I'd also like to increase the PWM frequency as far as possible (obviously limited by the inverter) and look at different motor current sampling methods.

Still not done much on the car as still physically and mentally drained but optimistic that I'll get to it soon. Slight change of plan from before. My normal approach is to do things once (mainly because I get bored doing things a second time). Now in this case that would mean fully refurbishing everything while doing the conversion and also sorting out charging, VCU, instruments, etc. and this is all likely to take time. Now that's not an issue in itself, it's a hobby and has no real deadline, but I'm already way behind where I hoped to be and am getting a little worried about the DVLA, changes in regulations, inspections, IVAs, etc. So the plan is to do the bare minimum to get to a safe usable car (so motor, battery and inverter), get it registered as electric, use it a bit to find any bugs and then pull it all apart again to do the refurbishment and add all the non critical creature comforts. If another Roadster comes along at a reasonable price I'll probably buy it to simplify the process a little too.

Talking of non-essential creature comforts the one thing that I have always wanted to add to a car is a way to remotely enable the heater/AC to either warm or cool the car ready to go (and the recent UK weather has focused my mind on the heating/defrosting side!). Now I could do this with the existing remote plip, the trouble is it is very limited in range and there is no confirmation if you can't see the car. An alternative would be to use a mobile SIM, but I'm not keen on this for a number of reasons (SIM costs, complexity, don't like smartphones, power consumption, need static IP address, poor local coverage, etc). Instead I've ordered one of these:
image.png
It's a LoRa wireless transciever with a M0 48MHz micro, oled display, couple of buttons and battery management circuits. The LoRa wireless transceivers can supposedly give a range of >5km line of sight (been tested to 14km!) or ~1km in built up areas, only uses uA in standby mode (and the car end 6mA in receive mode or 2mA @ 12V via a switch mode supply) and is supported by numerous code libraries. The plan is to make a fob sized remote out of it, have it show the car status (SOC, range, voltages,temps) on the display on a single button press and on an additional long press start the car climate control.
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 »

Hi Peter, what talks to the "LoRa" at the vehicle side? Looks like an awesome thing.

The "built in 2006" is actually when I Re-built it as a full caged tarmac-rally spec vehicle. It's an original 1976 eureka (had a full vw pan). From about 1994 I drove it as it was when I bought it. In about 2002 a stripped it back to all of its individual pieces and started planning the "rally" car build. Due to classic tarmac-rally regulations of the time it still has a "vw backbone" and "suspension pick-up points" however the integrated roll cage and tubular frame carries all chassis torsional loads and in essence the vw parts are just "satisfying the rules".

The one I'm now building as an EV (I have 3 eureka' in total) is following on in the footsteps of the principals of the rally eureka in so much as it will (ror road registration laws) retain its "vw backbone" however everything else is fabricated to make the "battery-chassis-seating" the fully stressed structural component. As with the rally car this will have significant body tub alterations to re-angle the bodywork in a more aerodynamic orientation. I'll save the rest of those details for when I do a proper thread.

Cheers for the interest.
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 »

Makes sense. Always liked the Nova, especially the roof, but the Beetle floorplan put me off and back when I was building kit cars I didn't have the fabrication skills to add a cage the way you have (it should stiffen things up a treat). A friend who used to build Novas commercially when they first came out mentioned that they always went light at the front at speed, have your aerodynamic improvements addressed that (I would have thought a proper front splitter would help a lot)? Lots of other questions but will wait for your thread!

On the LoRa the plan is to build one of these https://www.fanstel.com/lr1262 into the VCU. Will probably add another into the house BMS (Building not Battery!) to allow it to monitor the car's state too (could do that with WiFi but don't like having the constant power drain associated with WiFi and the car will also be parked a little too far away for WiFi to be reliable).
RetroZero
Posts: 702
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 311 times
Been thanked: 38 times
Contact:

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

Post by RetroZero »

With all this hard work done in your Simulator, I would have jumped in and helped get your smart running. Pitty I am on the other side of the channel. I hope this new board helps your project advance 💪🤞
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 for that.

It will get there, it's a little frustrating not to be able to move it forward as fast as I'd like but if I can get the groundwork out the way ready then it will all move forward much quicker once I do start on the mechanical stuff.

The PCB's have arrived and the last of the bits I forgot to order before arrived from Digikey this morning so hopefully will have a go at assembling one over the Christmas break :)

Just working through porting the software over to the STM32F405. Johannes has done a fair chunk of the work already with the libopeninv port but it needs bringing up to date and then there is still a lot of configuration to do to suit the new board. So far it feels that all I have achieved it to get thoroughly confused by git and github!
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 »

Quick update, got code that compiles cleanly for the STM32F405 :)

It's very hacked as I have removed all the stuff to support old board versions and there are still a lot more changes to make to get the IO mapped correctly, rejig the ADC sampling and control loop execution, add the second CAN port, move from fixed point to floating and tidy everything up but it's a good start.
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 »

Pete9008 wrote: Thu Dec 22, 2022 6:59 pm Quick update, got code that compiles cleanly for the STM32F405 :)

It's very hacked as I have removed all the stuff to support old board versions and there are still a lot more changes to make to get the IO mapped correctly, rejig the ADC sampling and control loop execution, add the second CAN port, move from fixed point to floating and tidy everything up but it's a good start.
I don't yet know what most of what you just said is? But I'm sure it is Awesome!!

Apparently my Zombie verter is now in the post so hopefully I'll start learning some of this programming stuff eventually....

I'm in a similar position to you, I can't yet get my slk onto the hoist to rip it apart, so I've been building the wire harness for the gs450h to Zombie...

Like you said, that way things should go faster once it's time to get it all going.
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 »

Quick update, most of the big firmware changes are done, not tested as don't have hardware yet but it compiles OK. Essentially removed all the legacy bits that don't make sense on this board and changed the interrupts so that the spare channel on the main PWM timer is used to trigger the angle measurement from the resolver (via a DMA FSMC read) and ADC conversions for the motor currents (using ADC2 and 3). The timing should give measurement to PWM update latency of around 40us (down from 180us). Still need to change the main control loop from fixed point to floating point math (think I'll probably leave all the parameter stuff using fixed point).

All the bits I need have been removed from the ST eval boards (STM32F103 and STM32F407 ICs) and Toyota logic board (resolver ICs, crystals, connectors) ready to build up the new logic board. All the ICs and most of the connectors came off without any trouble.

Only problem is the 50way header that connects to the Toyota IGBT driver board didn't want to come off and got a little too hot when de-soldering (silly mistake - should have put a kapton heat shield round it). It's probably OK to reuse but a little borderline so if anyone has a spare JST BM50B-SHLDS-Q-TFT (as used on the Toyota logic boards) please let me know!

Edit - One other question - I'm inclined to try and increase the PWM frequency a bit due to the low Outlander motor inductance. Does anyone have a view on what frequency the Prius Gen3 can run at or what the Outlander rear inverter normally runs at?
Post Reply