Page 1 of 1

Inverter restarting ?

Posted: Sat Jun 03, 2023 9:13 am
by FFMan
So I'm running some road tests, mainly to try and resolve the ABS issue as the car drives ok in my limited testing.

I was trying to obtain some logging both via can (5.27 will be loaded later to resolve that), and via the web ui logger. I noticed that the web logger only worked for less than a minute then stopped. Thinking this was a poor wifi issue i put the wifi dongle on a usb extension to under the bonnet, and note the esp8266 is on a ribbon cable outside the inverter case, so distance to esp8266 to wifi dongle is about 10cm.

I also added code to my arduino to beep if no can messages arrive from the inverter for a second.

On my test runs, the logging stops after les than a minute and my arduino beeps to indicate loss of can. The logging stops as the wifi disconnects i beleive. The drive continues ok, but i get another couple of beeps.

Is it possible the inverter is restarting whilst driving and that i wouldn't notice it through the driving experience etc ?

partial web log file attached. Now will load 5.27 which should enable the arduino sd card logging fully.

thanks

Re: Inverter restarting ?

Posted: Sat Jun 03, 2023 9:44 am
by johu
How does the inverter get its start signal? If it is continues on it would restart right after reset. Reset takes a few 100ms though, so you would notice. The watchdog resets after 2s when the 100ms task is not called. You would certainly notice that.
I wonder if loss of CAN and wifi dropout coincides. Bad grounding perhaps?

Re: Inverter restarting ?

Posted: Sat Jun 03, 2023 9:46 am
by Bigpie
You could try connecting the serial out from the inverter to a usb to ttl and log the serial out. If you see the bootloader 2F2F2F again mid drive it's rebooted.

Re: Inverter restarting ?

Posted: Sat Jun 03, 2023 9:58 am
by FFMan
johu wrote: Sat Jun 03, 2023 9:44 am How does the inverter get its start signal? If it is continues on it would restart right after reset. Reset takes a few 100ms though, so you would notice. The watchdog resets after 2s when the 100ms task is not called. You would certainly notice that.
I wonder if loss of CAN and wifi dropout coincides. Bad grounding perhaps?
the start signal come from the momentary key position i.e. the usual spring loaded action used to start the car when it had an ICE. So i guess if the inverter actually restarted, it wouldn't be in run mode would it and i'd coast to a stop ?

So this suggests not a restart, but loss of wifi and can comms. I'll check the grounds and give it another test now 5.27r is loaded.

Re: Inverter restarting ?

Posted: Sat Jun 03, 2023 10:15 am
by Pete9008
My guess would be that you are getting comms errors on the serial lines. I've noticed on my setup that once the logging receives a corrupt packet it often doesn't receiver.

The CAN is odd, if it's a restart then the CAN logging should restart too. Can't see how a restart that is too short to notice could trigger a 1sec gap in the CAN so I doubt that it's restarting. How confident are you that the two effects are coincident?

Edit - Just had another thought, if something happens within the CAN module that triggers it to take a lot of processor time then it could cause both itself and the serial port to hang without affecting anything else. (the serial is effectively the lowest cpu priority with the CAN next lowest).

My revised guess is that something is causing the CAN module to hog processor time which steals all the processing time from lower priority tasks and so causes serial comms to hang. To test try removing all the CAN transmits and see if the serial logging then lasts longer. Also worth disconnecting the CAN and seeing if that makes the serial survive longer (could be due to excessive CAN Rx packets too).

Re: Inverter restarting ?

Posted: Sat Jun 03, 2023 11:19 am
by FFMan
thank you for the advice.

Strangely, i loaded 5.27 and took it for a spin and didn't observe the restart beep from my arduino. I didn't bother with the web logging as the bug affecting the can setup is fixed and my logging is looking ok, just needs a few tweaks and i'll do a run later.

I also think (could be just me) but having run 5.24 and 5.27 back to back this morning, that 5.27 pulls away more smoothly ?