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

Tell us about the project you do with the open inverter
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

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

Post by johu »

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 »

Done!
ESP_CAN_Schema.png
ESP32_CAN.png
Managed to fit the CAN transceiver on plus two extra connector pins so both CAN and RS485 can be fitted and used at the same time. The CAN is connected to ESP pins IO25 (D) and IO26 (R). From what I can tell the CAN lines are are routed through the ESP's IO matrix so any pins can be used but won't know for sure till it's tested - if anyone knows whether this is the case or not please let me know.

Also managed to fit four mounting holes 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 »

So, PCB's ordered :) Although can't believe that you don't seem to be able to combine shipping on multiple boards at JLC :( (or am I missing something?)

Still not got the inverter cleaned up and brought in, maybe tomorrow.

Did check the Roadster over though and not great news. The battery was previously very slow to discharge (virtually no drop over time) so got out the habit of checking. Went out last week and it wouldn't unlock, checked the 12V battery and it was down at 0.2V! What really surprised me is that putting it on charge with recovery mode on the charger and it seems to have recovered and has been fine since, was expecting it to be completely ruined.

Slightly more of a pain though is that the front right spring has collapsed over the winter :(

Knew it was a bit corroded, and the Smarts do have a habit of doing this (I already have the spares ready to go on) but it would have been nice if it could have hung on for a little bit longer!
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

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

Post by johu »

Pete9008 wrote: Tue Feb 14, 2023 2:46 pm So, PCB's ordered :) Although can't believe that you don't seem to be able to combine shipping on multiple boards at JLC :( (or am I missing something?)
Really? I always fill my basket with multiple PCBs and they are shipped in one large box.
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 »

I'm still expecting them to come in one box but every time I added another item to the basket the shipping charge went up!

Tried it multiple ways, tried all the different shipping options (the slow cheap options disappeared as soon as there was more than one pcb in the box too). In the end the cheapest shipping was around £30 for two pcbs and two stencils on 4-6days, not bad given the distance and time but still twice the cost of a single board and stencil.

Sure I must have missed something but couldn't see what?
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

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

Post by johu »

Oh now I see. Yes that's true, shipping cost is weight dependent.
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 »

Not convinced it's due to the weight, my total order will be maybe half a kg in total, well under the shipping limit both for weight and size (it's only 5each of two pretty small pcbs). I did find a forum post by jlc saying it was something to do with import duty declaration, maybe a UK specific thing??

Just something to bear in mind for the future. The first of the two pcbs was ready to go a couple of weeks ago but held it up till the second was ready thinking it sensible to combine postage. If I'd just sent it off it before it would have been back, built and tested by now and not have cost any extra.
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 »

Not made much progress recently, energy levels have just dropped through the floor.

Have done a little more preparatory work though. Have ordered some switches and pots to make a test bench controller box for the inverter. Have also been wondering about how to power it all up on the bench. The original plan was to use my bench power supply in parallel with a lead acid battery (the battery would be there to cope with unintended regen). I've now changed the plan slightly and ordered an adaptor so that I can use the 18V battery packs from my cordless tools instead, should be more compact and better in terms of voltage.

I've also managed to pick up a Gen1 iBooster for a very good price :) Need to get some connectors sorted so I can try powering it up to see if it works but even if it doesn't it will be ideal for mocking up the install and testing whether it will actually fit.

PCBs for the mod board and ESP32 are due in on Monday and all the parts are here ready so hopefully get them built up and tested next week.
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 your hard work done on IPM Simulator, how about 2 hv contactors from an e-tron hvjb?
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 the offer, really appreciate it :)

I think I'm sorted for contactors though (plan to use the ones out of the BMW sbox that I already have) but again, thanks.

And I wouldn't call the simulator hard work, I actually enjoyed doing it (very sad I know!)
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

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

Post by johu »

I don't think it's sad at all to enjoy being creative - otherwise the entire open source community would be a sad bunch ;)
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 »

So a package from JLC turned up today, I thought great, I can build up the first PCB :)

Turns out that they can combine postage as it turns out that this package was both the solder mask stencils in one box, the PCBs are both in another box that isn't getting here till Monday :(
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 »

So the PCBs have turned up and all look ok, hopefully start building them up tomorrow :)

Also finally, after a lot of dithering, I've ordered a 3D printer.

This is the one I've gone for https://www.amazon.co.uk/FLASHFORGE-Adv ... ref=sr_1_6. No idea whether it's any good as it hasn't turned up yet, and it only has a fairly small build volume, but the price seems right and the enclosure means it should be able to print ABS/ASA (always been disappointed with the robustness of PLA prints at work). The plan is to use it with this https://www.3djake.uk/extrudr/durapro-asa-black ASA filament which is a UV stable version of ABS. Hopefully it will fit the integrated reel holder (it doesn't accept 1kg reels!) and will also print using the standard extruder (limited to 240C temperature). Fingers crossed it all works, first job will be a case for the remote keyfob mentioned earlier in the thread.

Any advice on software welcome. The plan is to use the Flashforge slicer and FreeCAD to design but open to other suggestions?
royhen99
Posts: 195
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 14 times
Been thanked: 94 times

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

Post by royhen99 »

I have the same 3d printer. I have no experience with other printers but it seems capable of good results. The reel size limit is one of the biggest drawbacks. I use 1KG reels on a spindle extension. A 265C extruder is available ( I have one ) but the only difference I can see is the type of plastic used for the connector. It's possible just to set the 240C to to run upto 265C which I have done with any problems. I mostly use the Flashforge slicer, but have also used Prusa slicer. Flashforge seems to add non G-code header data to the file so to use files from other slicers it is nessecaryt to load the G-code into Flashforge slicer to upload.
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, glad to hear you've had good results with it. What materials do you print with it?

I'd seen the higher temp extruder but it seems quite expensive for what it is so was hoping to avoid the need. The datasheet for the ASA filament above gives a recommended nozzle temp of 215-240C so hopefully it will print ok using the standard one. I've checked with the supplier and they claim that the 750g reel will fit inside the printer which would be nice (it won't be permanently set up so having the reel inside makes it a lot easier to set up and put away after).
royhen99
Posts: 195
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 14 times
Been thanked: 94 times

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

Post by royhen99 »

I mostly use PLA and PETG. I have tried ABS but with fairly poor results. The small sample of rigid.ink filament was not too bad, but the e-sun ABS+ is unusable. The layer adhesion is poor and has almost no strength. Maybe better quality filament will be OK. As with any printer using dry filament is important for good layer adhesion. Even PLA prints badly if it has higher moisture levels.
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 »

Hmm, I knew moisture was an issue with PLA but was hoping that ABS/ASA would be less susceptible - maybe keeping the reel in the printer isn't such a good idea. Do you need keep them in a sealed bag with desiccant to keep them dry or bake them before use?
royhen99
Posts: 195
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 14 times
Been thanked: 94 times

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

Post by royhen99 »

I don't have a very good storage system. At the moment I have three reels on top of a radiator in an attempt to keep dry. Not sure how susceptible to moisture ABS is but drying it was one of things I tried to get good prints. PLA is worst as it has to be dried at below 60c. The last printing I did I got such bad results I just bought a new reel.
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 »

I recently bought a PrimaCreator P120 V4. It's a even smaller printer but boy is it usefull for a lot of stuff.
I use OnShape for 3D-cad and then Ultimaker Cura for slicing. Works well for the jobs I've done so far.

OnShape is a online cad tool that is "free" as long as you are ok with public documents i.e. every other onshape user can see and copy your designs.
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 »

bexander wrote: Wed Mar 01, 2023 4:38 am I recently bought a PrimaCreator P120 V4. It's a even smaller printer but boy is it usefull for a lot of stuff.
I use OnShape for 3D-cad and then Ultimaker Cura for slicing. Works well for the jobs I've done so far.

OnShape is a online cad tool that is "free" as long as you are ok with public documents i.e. every other onshape user can see and copy your designs.
Thanks, will have a look at those.
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 »

Boards built :)
BuiltBoards.JPG
The small one was a real fiddle to put together, my eyesight isn't what it once was!

Not tested yet. I've also realised I don't have a 3V3 CAN transceiver for the ESP board but can still see if the rest works.

3D printer has also arrived, not unboxed yet though and the filament won't be here till next week.

Edit - I'll start another thread to cover the ESP board (with links to all the data) once I've checked it works!

Edit2 - Just un-boxed the 3D printer, calibrated the Z axis, loaded the filament and had it do the demo print (simple cube model that comes pre-installed); in total took about an hour. So far can't fault it. I was expecting a customer return based on price but it looks like a brand new unit. Everything seems to work and the quality of the first print is surprisingly good. Still need to try it with ASA filament (which is due next week) but at the moment I'm well happy with 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 »

ESP32 board now tested and seems to be working.

Couple of slight issues. First I managed to order the 250kbps slew rate limited RS485 transceiver chip for it :oops: so it's not too happy running at higher baud rates. A 20Mbps version is available and the schematic has been updated to reflect the correct part.

Secondly the SDIO interface for the SD card conflicts with the GPIO12 pin boot functions. Essentially the ESP32 uses a pull up or pull down on this pin to detect whether it has a 1V8 or 3V3 internal flash memory fitted and adjust its voltage regulator to suit. The pull up required by the SDIO interface is incompatible with the pull down required for the 3V3 flash on the ESP32-WROOM-32E modules. To fix you have to burn an eFuse on the ESP32. Bit of a nuisance but it sorts the issue. Further details in the github readme.

There is also a new branch in the ESP32 firmware git repo to go with it.

All further work on this board will now be in its own thread viewtopic.php?t=3361

Now that this board is working I can talk to the inverter again so the next job is to fit the mod board and see if it sorts the noise issue on the current sensors.
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 »

So, the mod board is fitted ..... and it works :)

This is what it looks like fitted to the board:
ModBrd_Fitted.jpg
Quite happy with that, should be robust enough and you would hardly notice it is there.

This is the circuit block that I ended up using (one of these per channel):
ModBrd_channel.png
ModBrd_channel.png (8.51 KiB) Viewed 1407 times
The input from the CT comes in on the left and is first divided down, with a little bit of filtering, relative to the 5V rail (which is what the CT uses as its 0V reference). This is then fed into an instrumentation amplifier. Instrumentation amps are nice in that the output is proportional to the difference in the inputs, they ignore any common mode voltage. They also allow the output to be referenced to a different voltage, in this case the 3V3 rail is used (actually the VDDA pin on the processor). This means that any movement between the 3V3 and 5V rails is compensated for by the instrumentation amp. Obviously for this to work the amp has to have a bandwidth that covers the full noise frequency spectrum present on the rail and the reference line must not be filtered (so that it tracks the rail).

The above gives an output from the amp that is centred on the 3V3 rail and proportional to the CT output. To then get 0A to be in the middle of the ADC range another potential divider is used to halve the signal giving a centre point of 1.65V that is locked to the ADC reference voltage.

Before fitting the board I had a standard deviation on the current measurement channels of 2A, after fitting this board it is down to 0.15A! :D

This is what the output now looks like for a 2A peak input signal (actually 100mA x 20turns through the CT as that's all my sig gen can do):
Noise.jpg
Pretty happy with that!

Note - for anyone not familiar with using standard deviation it's just a nice way to measure noise amplitude. For a random noise signal ~2/3 of samples will be within 1 standard deviation of the average and 99.9% of samples will be within 3 standard deviations. So to start with I had peak current error of 3x2A=6A, after fitting the board it's down to 3x0.15A=0.45A max error.

Edit - It's probably worth mentioning that if using multiple ADCs make sure that two different ADCs are not sampling the same channel. Initially when fitting the board the noise only went down to around 0.4A. It turned out that I was sampling the current on ADC1 as part of the regular conversion scan and the spikes generated by the ADC1 sampling capacitor charging were intermittently coinciding with ADC2 sampling and causing an error. Removing the current channels from ADC1 completely cleaned up the samples on ADC2 and got the noise down to the final 0.15A.
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 »

Bit of a no update update.

Very happy with the 3D printer. The out of the box settings for ABS seem to work well with the ASA filament (which doesn't fit in the integrated reel holder after all despite the seller assuring me they had used it in that machine and it did!). The only issue I have had is with rafts and bed adhesion. Using rafts works well but I find it difficult that gives both a good first layer finish while still being able to separate the raft. Printing straight to the bed works but I seem to get a little warping. No issues with moisture absorption yet on the ASA either. Layer adhesion maybe not quite as good as I'd hoped though so may get some PETG and give it a go.

All other progress has stopped, my wife tested positive for Covid last week (clear now). I've tested negative throughout but my energy levels dropped though the floor (so no idea whether I had it or not), too tired to get stuck into anything properly but just well enough to be bored - hence the excessive recent posting on other threads! Hoping to start to make a bit of progress on the Roadster soon though.
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, 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

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

Image

Image
Post Reply