Page 14 of 37
Re: ZombieVerter VCU Support
Posted: Wed Feb 02, 2022 6:11 am
by streber
https://github.com/damienmaguire/Stm32-vcu/pull/29 fixed the slow blinking issue for me. I think it is spending too long waiting on the SPI transfers and slowing everything down.
I've attached a bin with this fix in it. No idea if this will help with the reverse issue.
I find VSCode + PlatformIO a relatively user friendly dev environment since it can take care of pulling down all the right tools for you.
This is my setup for building the Stm32-vcu codebase:
https://github.com/streber42/Stm32-vcu-pio.git
One issue with PlatformIO is that it wants to provide libopencm3 for you and it isn't the patched version Stm32-vcu wants. So I've patched the installed version, but I haven't gotten that to work reliably yet but the diff is in there.
Re: ZombieVerter VCU Support
Posted: Wed Feb 02, 2022 3:09 pm
by Jack Bauer
Slow blinking of the led indicates the watchdog reset is firing. If that is the case then the cpu is hung up on something.
Re: ZombieVerter VCU Support
Posted: Wed Feb 02, 2022 5:54 pm
by EV_Builder
Maybe someone can post a version which doesn't use the additional placed components. If that works we know the issue.
Re: ZombieVerter VCU Support
Posted: Thu Feb 03, 2022 12:59 am
by 86elcamino
Does it matter which side of the shunt is hooked up to the battery and to the inverter?
Re: ZombieVerter VCU Support
Posted: Thu Feb 03, 2022 2:05 am
by EV_Builder
Normally yes, in the negative lead and with polarity.
Which shunt?
Re: ZombieVerter VCU Support
Posted: Thu Feb 03, 2022 1:06 pm
by 86elcamino
Issabeelnehutte ISV-T
Re: ZombieVerter VCU Support
Posted: Thu Feb 03, 2022 2:58 pm
by dadiowe
Re streber firmware.bin.
I am sorry to say that the activity light is not flashing at all now. I tried using a blank .bin file and re uploading after renaming the file as stm32_vcu.bin but that made no difference. Reflashed with blank firmware and reinstalled the october stm32_vcu.bin and everything is acting as it should (except still no throttle control).
I appreciate the effort though guys.
Re: ZombieVerter VCU Support
Posted: Thu Feb 03, 2022 4:57 pm
by EV_Builder
86elcamino wrote: ↑Thu Feb 03, 2022 1:06 pm
Issabeelnehutte ISV-T
Yes it has polarity check the datasheet. At least it has a recommend installation polarity.
Re: ZombieVerter VCU Support
Posted: Fri Feb 04, 2022 11:31 am
by Jack Bauer
dadiowe wrote: ↑Wed Jan 19, 2022 2:39 pm
Does anyone have a solution for KOPPI's post on December 11th 2021 as I have exactly the same problem.
If reverse is selected when the throttle is applied the motor runs at a constant speed in the reverse direction and no throttle or brake input makes any differance. The only way to stop the motor is to take the reverse input off and put a forward input in, or power off the system.
Thanks
Ok just so I'm understanding this problem correctly. You are pressing the throttle in neutral and then selecting reverse? If so that would be an unexpected input sequence to the vcu and is not something I have tested. The "normal" way that I would operate would be to release throttle fully, select direction and then apply throttle.
I'd also recommend this video as I go through a Leaf setup in very painstaking detail and also discuss problems and ways to diagnose :
Sadly my workshop is in motion right now so I can't test.
Re: ZombieVerter VCU Support
Posted: Fri Feb 04, 2022 2:23 pm
by dadiowe
Thanks for the reply Damien. I am actually a patron of yours (Rob Shephard) but I know what you are up to at the moment so I did not want to bother you.
I have reviewed your zombieverter "trilogy" on many a desperate evening. Shows you how keen I am!!!
I now see how missing out a simple comma can mislead the reader. (If reverse is selected, when the throttle is applied the motor runs at a constant speed in the reverse direction)
I have a positive terminal that I either connect to the Zombieverter Forward, pin 54 or Reverse input, pin 53. Everything works great in forward.
When I select reverse and operate the throttle I have to move it to about 20% travel (guess) then the motor starts running in reverse direction at a constant speed. If I then increase or decrease the throttle the revs stay the same. If I disconnect the 12v feed to the reverse input the motor continues to run. The only way to stop the motor is to power off the system or connect the positive input to the forward pin (54) then everything works correctly until I try reverse again.
I can't try a different .bin file,
A, because despite a number of days trying to figure out the dark art of compiling I fail miserably. Even tried code blocks but it does not seem to be able to locate the gcc-arm location despite the file appearing to be in the place it is looking for it!!!
B, lots of helpful people have put some .bin files on the vcu forum but none of them seem to work when uploaded to the board. Either the light flahes at the wrong rate or not at all. But the real issue is that the parameter and spot value parts of the web page are not visible.
I did try Johanus' stm32 sine.bin and interestingly no flashing light and all his parameters and spot values are present but that file I assume is not comaptable with the zombieverter wiring.
Happy, punctuation interpritation.
Rob
Re: ZombieVerter VCU Support
Posted: Sat Feb 05, 2022 8:03 am
by Jack Bauer
Ok I understand now. Lets get some diagnostics going :
1)Is your motor loaded or unloaded? ie on a bench just spinning itself or in a vehicle?
2)When you get the constant speed in reverse problem what is the value of the "torque" parameter under spot values?
3)As (2) but Speed value?
4)If you set revlimit parameter to a low value (say 500rpm) does the problem persist and if so does the speed in reverse obey the revlimit parameter?
5)What type of leaf motor/inverter combo are you using and did they come from the same vehicle?
I'm attaching a zip with the exact code I have been running in the grey goose past 2 months or so. It does not have regen but is probably the most tested and wrung out version that I have. Currently driving about 600 miles a week using a gen1 leaf drivetrain.
Ideally the last thing I want is to have folks struggling with code. Whole idea of this project is to provide a menu that can be just selected for various options. Sadly with the house move I'm not able to do much on this for the next few months.
Re: ZombieVerter VCU Support
Posted: Sat Feb 05, 2022 8:04 am
by Jack Bauer
Please dont use inverter firmware in the vcu and vice versa. Its a bit like trying to load a Spectrum game on a C64:)
Re: ZombieVerter VCU Support
Posted: Sat Feb 05, 2022 2:55 pm
by dadiowe
Ok Damien, thank you for the file, I now have correct throttle response in forward and reverse.
I could not get the system working with the older, october bin file, probably the stm 32 got a bit upset with being invaded by the vcu firmware. So I just ran your blank .bin file then installed your firmware, but as you said Regen is not working ( even though 2 is selected).
Thanks for the help, you can get back to home renovation for a while now

Re: ZombieVerter VCU Support
Posted: Sat Feb 05, 2022 2:56 pm
by dadiowe
Sorry, the attached file was what the older firmware was displaying
Re: ZombieVerter VCU Support
Posted: Mon Feb 07, 2022 6:18 pm
by Jack Bauer
Ok looks like we have a bug in the regen code. Given the different numbering systems and sign flips we do I guess I'm not surprised. will be a few months at least before I can get back to this so if anyone else wants to jump in ...
Re: ZombieVerter VCU Support
Posted: Mon Feb 14, 2022 4:10 am
by Reid0102
Hello all,
I am running into a bit of trouble with the VCU and 2nd gen leaf motor and inverter. I have a new ISA shunt and went through the steps to initialize it. When I go through the start up process T15 is on, it passes pre-charge stage and i can measure pack voltage across the inverters positive and negative terminals. The forward position is on. The duel channel POT is calibrated and Pot nom goes between -30% to 100% and I can see both POT channels cycling through their resistance and I can see a torque spot value go up to 2000 and back down with the throttle but the motor won't spin.
the invstat is off and the invudc is 0, but on udc i can see full pack voltage. Does anyone have an idea of what may be going on?
Re: ZombieVerter VCU Support
Posted: Mon Feb 14, 2022 8:29 am
by Jack Bauer
You obviously have no can comms between inverter and vcu.
Re: ZombieVerter VCU Support
Posted: Mon Feb 14, 2022 11:10 pm
by 86elcamino
GS450H inverter and transmission.
I can't seem to get potnom to move. I've checked everything in the configuration setup section from the initial startup guide in thew wiki. The pot and pot2 are reading above the min and below the max. Throtmax is 100, tmpm is 200, and tmpmmax is 300. T15Stat is on ,uaux is 12.65. udc is 60, and udcmin is 20.
Any ideas?
Thanks
BTW, last week there were two inverters on Ebay for sale with the unobtanium connector. I was able to purchase a connector by itself from one of the vendors. The other vendor never responded to my message, but it might be worth looking into if someone needs that connector.
Re: ZombieVerter VCU Support
Posted: Mon Feb 14, 2022 11:32 pm
by EV_Builder
Not sure if those values move in all inverter states but i expect Johannes to jump in he knows.
Re: ZombieVerter VCU Support
Posted: Tue Feb 15, 2022 8:10 am
by Jack Bauer
Please review the video where I run through fault finding for that exact problem.
Re: ZombieVerter VCU Support
Posted: Tue Feb 15, 2022 7:57 pm
by Reid0102
Jack Bauer wrote: ↑Mon Feb 14, 2022 8:29 am
You obviously have no can comms between inverter and vcu.
Thank you, I was thinking I was having a CAN communication problem. This gave me a direction to go.
I started to think about what all can give me issues with CAN communication so i decided to start with the basics.
1) I verified all CAN ext are wired correctly for H & L and tested for good continuity with my DMM which each wire had about 1-3 ohms. I made sure that there were no shorts on the board or a wire strand that may be sticking out, etc.
2) I made all the 12v perm., and ground connections better and verified continuity
3) I made all the CAN connectors better
4)I verified ground on the motor casing and battery too, to each ground connection.
5) I made a new twisted pair for the shunt to CAN EXT2 and that helped to clean up the signal a bit along with new wire for the power and ground for the shunt and made a new lead for the single wire connector. Then I have a 120 ohm 1/2 watt termination resistor, that measures 119ohms, on the middle two pins of the shunt. I had the single wire lead connected to the inverters positive terminal and I was unable to get the pre-charge to complete and was getting a pre-charge error. until I moved the lead to the main contactor and then it was able to read the voltage and complete the pre-charge. After that I moved that lead to the inverter and the pre-charge still is able to complete.
a) for the pre-charge I am using a 100ohm 100 watt power resistor. and I have the positive cable from my pack going to the main contact. at this terminal I have a wire that goes to the pre-charg contactor and then on the other side of that contact it goes to the power resistor and then the other terminal on the main contactor and then that hv cable goes to the main fuse and then the inverter B+ terminal.
b) For the negative side of the battery pack I have the cable going to the side of the shunt that is marked negative. and then on the other side of the shunt the cable goes to the inverters neg terminal.
c) I have the main contactor wire and pre-charge wire leads from the VCU going to the contactors and then the wire that is B+ contactor ls switch going to my main relay for switched power.
6) I made a new twisted pair for the motors can wires, I am not using all of the stock harness only the small amount that is needed for this that includes all the paired wires for the resolver (pin 17&18 resolver s2-24) (pin 19 and 27 for motor resolver r1-r2) (pin 20 and 21 for motor resolver s1-s3) (pin 44 and 45 for thermistors), perm. 12v, ground, and switched power (pin42 on motor harness) that goes to the relay. Pin 46&48 of the motor harness I have both connected to perm. 12v. power source and pin47&49 of the motor harness going to ground I have VCU can ext H going to pin 14 CAN-H for the motor and CAN EXT L going to pin 15 CAN-L for the motor.
Next after verifying all the wiring is correct and I have good continuity to all points in the wire harness and individual components. I was looking at what can cause the CAN errors and I was looking at the switched power possibly being the issue, but the relay is working properly and measuring voltage to pin 42 on the motor. I was curious to see if this would make a difference so I changed out the relay for a manual switch that I can control and made no difference so I put the relay back in.
In the videos it was said that there are two switched power connections but per wire diagrams I only see one which is pin 42 on the back of the motor, what is the second switch power lead? I do not have the PDU connected and I am only running the motor and inverter together.
Next I plan on decoupling the wires at the motor for the can and measure the resistance of pin 14 and 15 on the motor to see if I have any excessive resistance or not. and also test the voltage to pi 14 and 15. I was also going to make a shield from foil and wrap the can wires for the motor to see if that helps to clean up the signal any.
Still sorting out what is causing the CAN communication problem. I put my scope on both the shunts can and motor can when it was in run mode and also tried hitting the start inverter manual mode and see if it made a difference which it didn't. and I have attached some images of the video i took when I was testing them. the signal I am getting from the shunt is much cleaner than the one for the motor.
Later this afternoon I am heading back to try and do some more problem solving on this.
any ideas?
Re: ZombieVerter VCU Support
Posted: Thu Feb 17, 2022 8:10 pm
by Reid0102
Quick update:
I was able to do some more testing focusing on trying to diagnose why I am having some CAN communication problems.
I verified all the wiring is correct along with the polarity of the shunt and inverter connection.
I started data gathering process:
With a DMM:
With the system off and connected to Aux 12vdc:
CAN Ext1 H: 2.427v
CAN EXT1 L: 2.423v
Shunt H: 2.446v
Shunt L: 2.466
With Aux 12vd and T-15 on: No changes to values
With Aux 12vd and T-15 and ignition on no changes to values
With T-15 on, ignition on, start on, run mode on, pre-charge complete:
CAN Ext1 H: 2.453v
CAN EXT1 L: 2.411v
Shunt H: 2.497v
Shunt L: 2.353v
Hz:
CAN Ext1 H: 186Hz
CAN EXT1 L: .92-.79kHz
Shunt H: 5.713Hz-0Hz
Shunt L: 768Hz
Duty cycle:
CAN Ext1 H: 0%
CAN EXT1 L: 3.7%-0%
Shunt H: 99.9% holding
Shunt L: less than 5% and cycling 0%
Conducted the next series of tests by pressing the throttle rapidly and then by pressing and holding, slow press and slow release, slow press, and quick release.
No significant changes to values.
With the inverter start manual mode repeated the same tests:
No significant changes to duty cycle, voltage, or Hz.
Shunt Hz: ranged from 600Hz – 780 Hz
Motor can: H: 0% duty, 0 Hz
L: less than 5% duty, .9k ohms
Pressing the throttle presented no changes.
*for a quick second on CAN H for the motor I saw 80% duty and then went away and didn’t come back.
For the possibility of too much noise I removed the CAN Ext1 H and L from all other power connections, wire runs, etc and isolated it and wrapped some foil around it. The signal became clearer but no other changes.
Testing voltage across the motors and CAN EXT1 H&L:
39.5mV
Shunt:
141 mV
*new condition pressing throttle
Shunt: 138mV, release throttle goes back up to 141mV
CAN EXT1 H&L: 39.5mV, no change when pressing the throttle.
Checked voltage across the motors positive and negative terminal: 191.1V
Testing CAN EXT1 H&L at junction of motor harness and vcu harness:
Test across H&L:
120.3 ohms
Disconnected motor from vcu harness: on motor CAN H&L: 51.2 kohms
CAN EXT1 H&L harness: 120.6 ohms
System on and run condition CAN motor and EXT1 disconnected the voltage across the harness: 1.411V
76.62k Hz-.63kHz &52.7% duty at rest.
Throttle press and hold, rapid press, slow press: no changes to values.
Checking for can signal on the scope at the motor connection and I can see a signal being sent to the inverter but no motor movement.
In the VCU web portal:
Motor is in run, t15 on, pre-charge is done, no errors, but the inverter udc and invstat is off and has a value of zero.
Next, I am going to see if I can find out what the leaf’s gen 2 inverters can resistance is supposed to be as 52 kohms seems really high to me when all other is 120 ohms.
I am thinking the issue may be in the leaf’s inverter itself unless there is a second switch power I missed.
Next time I am at the vehicle I will open up the inverter and check.
Re: ZombieVerter VCU Support
Posted: Fri Feb 18, 2022 5:44 pm
by janosch
Reid0102 wrote: ↑Thu Feb 17, 2022 8:10 pm
...52 kohms seems really high...
Should be fine for a chip that is turned off and hasn't got the 120 Ohm resistor across CANH CANL.
I just measured it on a little CAN dongle (not plugged in) and get ~50k Ohm.
Re: ZombieVerter VCU Support
Posted: Fri Feb 18, 2022 8:38 pm
by Reid0102
janosch wrote: ↑Fri Feb 18, 2022 5:44 pm
Reid0102 wrote: ↑Thu Feb 17, 2022 8:10 pm
...52 kohms seems really high...
Should be fine for a chip that is turned off and hasn't got the 120 Ohm resistor across CANH CANL.
I just measured it on a little CAN dongle (not plugged in) and get ~50k Ohm.
Thank you for confirming that and that is basically the same. The only 120 ohm resistor I have is a 1/2 watt that measures 119 on my DMM and that is on the shunt. Do you know if VCU uses the shunts termination resistor to supply the 120 ohm for the whole can bus (motor, shunt, vcu in my case)? I am wondering if I may need to add a second termination resistor for the motor?
I noticed today the udc value on the shunt sometimes showed and other times didn't so I am wondering if the shunt may be part of the issue here?
Re: ZombieVerter VCU Support
Posted: Sat Feb 19, 2022 2:47 am
by EV_Builder
CANBUS off with DMM should be 60Ohm. 2x 120Ohm in parallel.