Page 4 of 38
Re: The ZombieVerter VCU Project
Posted: Fri Jan 01, 2021 5:58 pm
by jon volk
If I run a make get-deps it gets real mad about a missing nvic.h file. I just copied a libopencm3 folder from one of Johannes' projects Ive been messing with and all is well. Im not sure if others have this issue.
Re: The ZombieVerter VCU Project
Posted: Fri Jan 01, 2021 6:03 pm
by johu
It doesn't quite have the structure of the inverter project yet, i.e. libopeninv and libopencm3 are not tied in as submodules
Re: The ZombieVerter VCU Project
Posted: Fri Jan 01, 2021 6:28 pm
by johu
Took the liberty to recreate the project. If you want carry on with it.
https://github.com/jsphuebner/stm32-vcu
Re: The ZombieVerter VCU Project
Posted: Sat Jan 02, 2021 12:43 pm
by Jack Bauer
Thanks Johannes. I have added a VAG module as a way of saying thanks:)
Re: The ZombieVerter VCU Project
Posted: Sat Jan 02, 2021 3:50 pm
by Dilbert
OK, i can select GS450H now and i'm seeing HTM / REQ & CLK being generated. All 3 signals look good.
I'm not getting anything back from my inverter on the bench on the MTH line, so i'll need to investigate that a bit more. I have flipped REQ and CLK in the harness, so that should be ok. I'm going to scope the inverter connections and see if i can spot anything.
I'm thinking it would be a good idea to have a parameter for the status of the selected inverter, it would be an easy way to see if the inverter is "online" so to speak.
Re: The ZombieVerter VCU Project
Posted: Sat Jan 02, 2021 4:02 pm
by Jack Bauer
Good idea! I'll do that asap.
Re: The ZombieVerter VCU Project
Posted: Sun Jan 03, 2021 10:10 am
by Jack Bauer
Inverter status (InvStat) now on web interface. Only works on gs450h for now. Latest on the 'hub.
Re: The ZombieVerter VCU Project
Posted: Sun Jan 03, 2021 2:40 pm
by Jack Bauer
Any luck Dilbert?
Re: The ZombieVerter VCU Project
Posted: Sun Jan 03, 2021 2:57 pm
by Dilbert
I spend hours figuring out that i'd flip'd the wrong pair(s) in the CAT5 cable, as the colors at each end of the cable didn't match due to the fact I had a coupler in the middle.
I'm now getting data in/out of the ECU from the inverter, which is good news. Now that i have comms, I can test tomorrow with the motor on the bench.
I won't be using the pre-charge, i'll just have a 24V PSU connecting to the inverter, is there any way to disable this? do i just set a low value for the pre-charge voltage?
I've calibrated my BMW pedal, but i'm not seeing the "potnom" parameter move, even when i give it a direction input. So i need to look at that, I think i haven't given the ECU the "start" input.
Re: The ZombieVerter VCU Project
Posted: Sun Jan 03, 2021 3:15 pm
by Jack Bauer
Ok great. Just set udcsw to 0 to bypass precharge. It won't command torque unless in "run" mode. Easy way to enter run is just select bmw e46 vehicle and give a 12v pulse to the In1 pin then set direction to default forward and torque should increase linearly with throttle. All going well I'll test in the E65 tomorrow also.
Re: The ZombieVerter VCU Project
Posted: Sun Jan 03, 2021 3:37 pm
by Dilbert
OK that's a good tip.
So in E46 mode, IN1 will bring it into run mode. Which pins are mapped for the direction inputs on the E46?
Re: The ZombieVerter VCU Project
Posted: Sun Jan 03, 2021 3:43 pm
by Jack Bauer
Well the current hardware only has 2 12v digital inputs so I've mapped in1 to start and reverse and in2 to forward. so if you just hit in1 it will enter start mode then put direction mode into default forward and your good to go. to test reverse pull in2 to 12v and select direction switch and then switch reversed for the other direction. Bit of a kludge but will work for testing. Assuming it works out I'd like to have a look back at the gen 3 prius data with you to see if we can make that work.
Re: The ZombieVerter VCU Project
Posted: Sun Jan 03, 2021 4:02 pm
by Dilbert
OK that brings the "din_start" to 1 and "dir" to 1.
I don't seem to be getting anything on "potnom" when i push the accelerator, have i the name of that parameter correct?
Re: The ZombieVerter VCU Project
Posted: Sun Jan 03, 2021 4:11 pm
by Jack Bauer
is opmode showing run?
Re: The ZombieVerter VCU Project
Posted: Sun Jan 03, 2021 4:15 pm
by Dilbert
Jack Bauer wrote: ↑Sun Jan 03, 2021 4:11 pm
is opmode showing run?
seems to be stuck at 0
Re: The ZombieVerter VCU Project
Posted: Sun Jan 03, 2021 4:18 pm
by Dilbert
UDCSW had somehow got set back to 330. I'm now showing OPMODE of 1
Re: The ZombieVerter VCU Project
Posted: Sun Jan 03, 2021 5:06 pm
by Jack Bauer
Ok should say "run" under opmode but 1=run. Should show potnom and torque now.
Re: The ZombieVerter VCU Project
Posted: Sun Jan 03, 2021 5:20 pm
by Dilbert
Jack Bauer wrote: ↑Sun Jan 03, 2021 5:06 pm
Ok should say "run" under opmode but 1=run. Should show potnom and torque now.
See attached the guages and param export.
Re: The ZombieVerter VCU Project
Posted: Sun Jan 03, 2021 5:42 pm
by Jack Bauer
Ah yes you need to set udcmin to 0 also. Sorry forgot that one. Also you only need to pulse in1 high start is a momentary signal.
Re: The ZombieVerter VCU Project
Posted: Tue Jan 05, 2021 12:21 pm
by Jack Bauer
Well I donned the snowsuit and commenced E65 testing today. Removed a pile of Damien generated bugs and the car side can is now happy and convinced there is a 3.5l v8 and a 6 speed autobox in there idling away happy at 750rpm. Despite using a "start/stop" agm battery and a 15amp charger it didn't take long for the SuperYacht's thirst for 12v power to drop the voltage to a point that all kind of weird faults started turning up. So I jumped it to the Panzer and left the car "idling" so the Tesla dcdc was supplying power. Then brought up the GS450H systems. To my delight I got a InvStat ON message from the inverter but then weird things started when I fired up the gearbox oil pump and the jumpleads started smoking despite the cooling 0C airflow and rain hitting them. Finally time to connect the hv, set udscw, put my faith in Johannes and press the appropriately named "engine start" switch. Precharge kicked in, hit the threshold and main contactor closed, dcdc came up and all those little computers in the E65 got a steady 14.4v and all were happy.
Ok then lets see if the car moves. Calibrated the throttle, set a 20% max throttle, shifted into drive, pressed the pedal and....we get a rumbling from the gearbox and the car shakes back and forth a little but no movement. BUT that is waaayyyy more then I expected so generally happy. Now we just need to refine the serial comms to the inverter and we should be driving.
While I was there tested the oil pump speed setting : works. tested the high/low shift and feedbacks : works. We don't seem to get any feedback from the inverter like temps or rpms so need to get into the serial comms.
I think we're on the way here folks............. Dilbert, any luck with your bench tests?
Re: The ZombieVerter VCU Project
Posted: Tue Jan 05, 2021 3:46 pm
by mdrobnak
Nice work!
I'm coming back to my 330 engine/transmission control stuff while taking a short break from the charge port stuff. I'll try and get cppcheck setup so you can do something like `make lintcheck` or something hopefully this weekend. After that, maybe we can even get Travis-CI integrated with github to have that run any time someone posts a Pull Request.
Re: The ZombieVerter VCU Project
Posted: Tue Jan 05, 2021 4:15 pm
by Jack Bauer
Uhh....Yeah! that's what I was thinking Matt:) (No idea what any of that means but must not look stupid in public).
dilbert is there a reason we are running at 500k baud? looks like the arduino version ran at 250k.
Re: The ZombieVerter VCU Project
Posted: Tue Jan 05, 2021 4:28 pm
by mdrobnak
Jack Bauer wrote: ↑Tue Jan 05, 2021 4:15 pm
Uhh....Yeah! that's what I was thinking Matt:) (No idea what any of that means but must not look stupid in public).
dilbert is there a reason we are running at 500k baud? looks like the arduino version ran at 250k.
Basically... have something look over the code we write and ensure it doesn't do stupid things unintentionally, using
static analysis. If we're gonna make this 'the thing' we should try and strive for high quality code.
Travis, or Travis-CI is for "Continuous Integration" - basically, on every Pull Request (someone wants to make a change), humans review the code change, and you can have automated checks run on every commit (hence the continuous piece)...so automatic runs of code analysis. There is Travis-CI integration for github that's completely free for open source projects. So that fits well here.
-Matt
Re: The ZombieVerter VCU Project
Posted: Tue Jan 05, 2021 5:53 pm
by Dilbert
Jack Bauer wrote: ↑Tue Jan 05, 2021 4:15 pm
Uhh....Yeah! that's what I was thinking Matt:) (No idea what any of that means but must not look stupid in public).
dilbert is there a reason we are running at 500k baud? looks like the arduino version ran at 250k.
On the atmel processors 250k baud, gives a 500khz clock.
Will review the code in the morning to see what I can spot. I'd imagine if the data isn't getting clocked out correctly, the inverter would detect a checksum error and ignore the packet. So it's strange you got inverter whine
Re: The ZombieVerter VCU Project
Posted: Tue Jan 05, 2021 6:01 pm
by Jack Bauer
Not only that but it responded to a torque command from the throttle.