Page 3 of 38

Re: The ZombieVerter VCU Project

Posted: Wed Dec 30, 2020 1:24 pm
by Dilbert
I'd probably move the dma_read(mth_data,100);//read down into case 0: as we only want it to happen once every 5ms, rather than every 1ms when it's called.

Re: The ZombieVerter VCU Project

Posted: Wed Dec 30, 2020 1:38 pm
by Jack Bauer
Done! Do we need to handle rx_buffer_count?

Re: The ZombieVerter VCU Project

Posted: Wed Dec 30, 2020 1:47 pm
by Dilbert
I'd image there's a finish flag in the specific DMA controller that would tell us all the bytes have come in, so we could just check that. So just check the finish/complete flag and not that variable.

Re: The ZombieVerter VCU Project

Posted: Wed Dec 30, 2020 1:47 pm
by Jack Bauer
So just using a little cheap tablet scope here in the office looks like the Req pulses are happening every 5ms, clock is firing away at 500khz and one tx data packet is taking about 1.6ms. Also have the oil pump 1khz pwm on timer 1 up and running. Poor timer1, once the driver of igbts and motors now just relegated to a boring single channel fixed duty output :)

Re: The ZombieVerter VCU Project

Posted: Wed Dec 30, 2020 1:49 pm
by Jack Bauer
Dilbert wrote: Wed Dec 30, 2020 1:47 pm I'd image there's a finish flag in the specific DMA controller that would tell us all the bytes have come in, so we could just check that. So just check the finish/complete flag and not that variable.
on it .......

Re: The ZombieVerter VCU Project

Posted: Wed Dec 30, 2020 2:02 pm
by ggeter
Jack Bauer wrote: Wed Dec 30, 2020 7:46 am Perhaps I should have been clearer. This is a development project. It is not and will not be available for sale until such time as it has been tested in my vehicles. I'll update the first post with this notice. Regarding the order from ggeter it is packed and due for dispatch today.
Many thanks!

Re: The ZombieVerter VCU Project

Posted: Wed Dec 30, 2020 3:44 pm
by Jack Bauer
Soo, some more interface tidying, implemented a Low/High/Auto parameter for the GS450H gearbox gear shifting, got my ass handed to me by a switch/case statement and implemented a hard cut rev limiter. Getting near time to move out to the workshop and do some testing on the E65.

Pro tip of the day : using the same id number on two parameters can cause some interesting effects:)

Re: The ZombieVerter VCU Project

Posted: Wed Dec 30, 2020 5:29 pm
by mdrobnak
Jack Bauer wrote: Wed Dec 30, 2020 3:44 pm Soo, some more interface tidying, implemented a Low/High/Auto parameter for the GS450H gearbox gear shifting, got my ass handed to me by a switch/case statement and implemented a hard cut rev limiter. Getting near time to move out to the workshop and do some testing on the E65.

Pro tip of the day : using the same id number on two parameters can cause some interesting effects:)
Excellent progress. This however:
Jack Bauer wrote: Wed Dec 30, 2020 3:44 pm ...and implemented a hard cut rev limiter.
Made me LOL as.. hard cut rev limiter to me == 0 fuel , 0 spark. :D So odd to hear it in this context.
Jack Bauer wrote: Wed Dec 30, 2020 7:52 am Matt, I did actually get the git book on kindle so need to start reading it I guess:)
The diagrams in the first couple chapters helped a bit when I first started using it, coming from SVN. I'm not old enough to have dealt with CVS much, or god forbid RCS. Soon you'll be git clone, pull, commit, push, and merging away. :)

-Matt

Re: The ZombieVerter VCU Project

Posted: Wed Dec 30, 2020 6:54 pm
by Dilbert
Jack Bauer wrote: Wed Dec 30, 2020 1:47 pm So just using a little cheap tablet scope here in the office looks like the Req pulses are happening every 5ms, clock is firing away at 500khz and one tx data packet is taking about 1.6ms. Also have the oil pump 1khz pwm on timer 1 up and running. Poor timer1, once the driver of igbts and motors now just relegated to a boring single channel fixed duty output :)
Looks good...

Re: The ZombieVerter VCU Project

Posted: Thu Dec 31, 2020 8:20 am
by Jack Bauer
Dilbert, new boards should be delivered today.

Re: The ZombieVerter VCU Project

Posted: Thu Dec 31, 2020 9:15 am
by Dilbert
Perfect. I can try the stm32-car project on the bench also with the inverter.

Re: The ZombieVerter VCU Project

Posted: Thu Dec 31, 2020 2:11 pm
by Dilbert
Damien the boards arrived today thanks. Are you in a position to send me (or add me on GIT) the STM32-CAR branch you are working on and I can test it here?

Re: The ZombieVerter VCU Project

Posted: Thu Dec 31, 2020 2:21 pm
by Jack Bauer
Excellent. Here is a hex of the bootloader and latest firmware build. You will need a wifi module with the latest openinverter firmware loaded to view and change params. I'll do the github thing later today. Might as well get the dumpster fire as Jon calls it out in the open :) Just select GS450H under inverter modules and it should light off the clock and uart. If its working you should see inverter temp populate a sane value.

Re: The ZombieVerter VCU Project

Posted: Thu Dec 31, 2020 2:29 pm
by Jack Bauer
Today's adventures included adding some params for the gear pos feedbacks from the GS450H gearbox, implement Terminal 15 over can for the E65 (and others) , piped the temperature feedbacks from Leaf inverter, gs450h inverter and gearbox back to the webinterface. Thanks to a classic Damien integer screw up I can confirm temp derating of throttle works just fine:)

Just for Matt I tested the "Hard cut" rev limiter by playing back a leaf can log. It works:)
if(ABS(speed)>=maxRevs) torquePercent=0;//Hard cut limiter:)

Played back some E65 logs, swatted bugs and we have T15 and gear shift via can working on the bench and finally implemented a parameter for setting GS450H oil pump duty on the web interface. Right, time to break out the kindle and see if I can get this disaster up on the 'hub:)

Re: The ZombieVerter VCU Project

Posted: Thu Dec 31, 2020 3:20 pm
by Jack Bauer

Re: The ZombieVerter VCU Project

Posted: Thu Dec 31, 2020 3:43 pm
by Dilbert
Perfect, that looks like i have access. I have downloaded the loader/application file above on to my unit and it is running away blinking the little red LED.

I guess i need to update the wifi interface now too. Is the handiest way to update the web-interface via the FTDI cable? I might have a web interface with the old version, i'll see if i can use the update utility.

Re: The ZombieVerter VCU Project

Posted: Thu Dec 31, 2020 5:12 pm
by Jack Bauer
yep via ftdi and arduino. You need to change the solder jumper on gpio0 to program then change back to use.

Re: The ZombieVerter VCU Project

Posted: Thu Dec 31, 2020 5:18 pm
by mdrobnak
Jack Bauer wrote: Thu Dec 31, 2020 2:29 pm Just for Matt I tested the "Hard cut" rev limiter by playing back a leaf can log. It works:)
LOL
Jack Bauer wrote: Thu Dec 31, 2020 3:20 pm So...uhh....I think I did it : https://github.com/damienmaguire/Stm32-vcu/tree/master
Nice job. So, there's been some developments recently about naming conventions, and the preferred name is now main instead of master.

This is an easy fix. Git knows they are completely unrelated, so you just overwrite the history of one.

In your current folder which is in sync with github do this:

Code: Select all

git push origin master:main --force  # Force flag is required as you are destroying history of that branch. This is expected here. Don't use this often!
Verify github shows what you expect it to under "main" now, which should be the same as master.

If you're happy with it:

Code: Select all

git branch -D main # Delete our existing, previous version of main
git pull # Pull in changes from github
git checkout main # Change our working branch to main
git branch -D master # Remove our local branch master
git push origin :master   # Note that there is a : in front - This deletes the branch on github
As seen above the full syntax if you want to push a different branch is git push origin <src branch>:<tgt branch> - in this case, we want to push "nothing" - aka delete the branch, hence nothing on the left side of the colon.

Sorry about not mentioning the master vs main thing before, it slipped my mind.

-Matt

Re: The ZombieVerter VCU Project

Posted: Thu Dec 31, 2020 5:34 pm
by Jack Bauer
Thanks Matt. Slowly getting to grips:)

Info on programming the wifi here : viewtopic.php?f=5&t=8&start=125

Re: The ZombieVerter VCU Project

Posted: Thu Dec 31, 2020 7:22 pm
by Dilbert
Uploading to the esp is grand, where is the most up to date source for the esp?

I looked on git but couldn't see the source for the web interface, is it in another repo, or part of another project.

Re: The ZombieVerter VCU Project

Posted: Thu Dec 31, 2020 8:17 pm
by collin80
mdrobnak wrote: Thu Dec 31, 2020 5:18 pm Nice job. So, there's been some developments recently about naming conventions, and the preferred name is now main instead of master.

This is an easy fix. Git knows they are completely unrelated, so you just overwrite the history of one.
... depends on who you ask. Personally I don't plan to change any of my git repos over on purpose just to satisfy the current winds of political correctness. But, master, main, same thing. I wouldn't waste any time trying to update old repos to the new "PC" terminology but in the future I imagine most hosts like github and bitbucket are going to default to main. Similar discussions are being had about other uses of such terms. SPI is suddenly naughty for having slaves.... You'd think we had already solved the world's actual problems with all the nitpickiness over technical terms.

Re: The ZombieVerter VCU Project

Posted: Thu Dec 31, 2020 8:31 pm
by mdrobnak
collin80 wrote: Thu Dec 31, 2020 8:17 pm
mdrobnak wrote: Thu Dec 31, 2020 5:18 pm Nice job. So, there's been some developments recently about naming conventions, and the preferred name is now main instead of master.

This is an easy fix. Git knows they are completely unrelated, so you just overwrite the history of one.
... depends on who you ask. Personally I don't plan to change any of my git repos over on purpose just to satisfy the current winds of political correctness. But, master, main, same thing. I wouldn't waste any time trying to update old repos to the new "PC" terminology but in the future I imagine most hosts like github and bitbucket are going to default to main. Similar discussions are being had about other uses of such terms. SPI is suddenly naughty for having slaves.... You'd think we had already solved the world's actual problems with all the nitpickiness over technical terms.
Fair enough - on a new project I use main, but if master is there, then it is there. It's always good to try and look at things from multiple perspectives; what might not bother you may be very hurtful to someone else. There is a balance between overly sensitive and using a term which has no ambiguity attached to it. For me, if it helps to be more inclusive, and is a no-op (on a blank repo they give you the commands to cut and paste to rename the branch), then it seems like the right move to me.

In any case, the branch should either be renamed, or the default branch should be fixed in the repository, so there is work either way. :)

Apologies for the off-topic.

-Matt

Re: The ZombieVerter VCU Project

Posted: Fri Jan 01, 2021 9:25 am
by Jack Bauer
Web interface : https://github.com/jsphuebner/esp8266-web-interface

We really need this stuff in the wiki.

Re: The ZombieVerter VCU Project

Posted: Fri Jan 01, 2021 1:50 pm
by Jack Bauer
Maybe the branch should be called Moron in honor of your truly:)

Soo today's mission so far has been to rework the startup and precharge logic to suit the vcu.Tried my hand at a state machine for this and the compiler got very angry and said in all caps : ISO C++ FORBIDS blah blah......oops sorry mr.compiler sir, won't happen again.

Standard openinverter logic for precharge and startup goes :
1)apply 12v switched from ign
2)close precharge
3)count to 5
4)if dc bus v not greater than threshold throw error and sit there until 12v is recycled.

New vcu logic:
1)apply 12v always
2)chill out until ign(digi i/p) on and start(digi i/p) goes high or T15 over can goes high
3)close precharge
4)count to 5
5)if dc bus v not greater than threshold throw error and sit there until start goes low or T15 over can goes low
6)goto2

If precharge has completed then we goto run mode, power up the inverter 12v and start comms. Then we wait for either ign (digi i/p) to go low or T15 over can to go low then goto 2.

Re: The ZombieVerter VCU Project

Posted: Fri Jan 01, 2021 5:23 pm
by Dilbert
Jack Bauer wrote: Fri Jan 01, 2021 9:25 am Web interface : https://github.com/jsphuebner/esp8266-web-interface

We really need this stuff in the wiki.
I couldn't see any updates pushed to that repo for STM32-VCU, so thought there might be another repository/branch with the changes for STM32-VCU.