The ZombieVerter VCU Project

Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post 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.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Done! Do we need to handle rx_buffer_count?
I'm going to need a hacksaw
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post 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.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post 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 :)
Attachments
2020-12-30 13.41.51.jpg
2020-12-30 13.40.57.jpg
2020-12-30 13.40.19.jpg
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post 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 .......
I'm going to need a hacksaw
User avatar
ggeter
Posts: 133
Joined: Wed Nov 18, 2020 1:56 pm
Location: Houston, TX
Has thanked: 4 times
Been thanked: 15 times

Re: The ZombieVerter VCU Project

Post 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!
Houston, Texas, USA
EV Newbie
1979 MG Midget + GS450h = "Mexus?"
IT Consultant
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post 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:)
I'm going to need a hacksaw
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: The ZombieVerter VCU Project

Post 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
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post 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...
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Dilbert, new boards should be delivered today.
I'm going to need a hacksaw
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post by Dilbert »

Perfect. I can try the stm32-car project on the bench also with the inverter.
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post 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?
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

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

[The extension hex has been deactivated and can no longer be displayed.]

[The extension hex has been deactivated and can no longer be displayed.]

I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post 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:)
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

I'm going to need a hacksaw
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post 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.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

yep via ftdi and arduino. You need to change the solder jumper on gpio0 to program then change back to use.
I'm going to need a hacksaw
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: The ZombieVerter VCU Project

Post 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
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Thanks Matt. Slowly getting to grips:)

Info on programming the wifi here : viewtopic.php?f=5&t=8&start=125
I'm going to need a hacksaw
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post 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.
collin80
Posts: 110
Joined: Sun Aug 30, 2020 3:28 pm
Location: United States, Michigan
Been thanked: 4 times
Contact:

Re: The ZombieVerter VCU Project

Post 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.
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: The ZombieVerter VCU Project

Post 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
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Web interface : https://github.com/jsphuebner/esp8266-web-interface

We really need this stuff in the wiki.
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: The ZombieVerter VCU Project

Post 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.
I'm going to need a hacksaw
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

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