4 VESCs CANbus issues

Report your hardware problems here. Include as many details as possible with pictures to get the best possible help and feedback.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
TimB
Posts: 9
Joined: 26 Apr 2017, 14:50
Location: Paris
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

4 VESCs CANbus issues

Postby TimB » 28 Jun 2017, 09:15

Hello everyone,

I am currently working on a project that aims at controlling 4 VESCs from an Arduino board. I have configured the 4 VESCs in FOC mode with 4 different CAN ids and I am only sending them duty cycle CAN commands. I have disabled the "Send status over CAN" parameters in the BLDC tool and when looking at the frames sent on the Bus with a CANbus analyzer I only see my 4 CAN frames commands which is reassuring.

The 4 VESCs react pretty well to my commands. However sometimes one of the VESCs just reboot randomly and/or the Arduino freezes.

I am wondering why I can't fully control what is happening.

Is there something like a CAN frames error counter in the VESCs source code that triggers the reboot of the VESC when reaching a certain value ?

Also is there a protection against rapid duty cycle changes (ramping) that could be the origin of the VESC reboot ?

Thanks in advance for your help !

pf26
Posts: 310
Joined: 28 Mar 2016, 14:37
Location: FR Valence
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: 4 VESCs CANbus issues

Postby pf26 » 03 Jul 2017, 12:10

Sure it is a reboot, or is it just an error ? (in which case you might want to check what error it is, using bldctools)..

TimB
Posts: 9
Joined: 26 Apr 2017, 14:50
Location: Paris
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: 4 VESCs CANbus issues

Postby TimB » 19 Jul 2017, 14:44

Hey,

Thanks for your reply pf26.

It seems like it is an error that leads to the reboot of the VESC. The error appears to be a DRV8302 fault.

You can look at the screenshot of my BLDC tool terminal showing the fault codes in the attached picture.

Still don't know where those errors could come from...
Attachments
DRV8302 fault.PNG
DRV8302 fault.PNG (14.78 KiB) Viewed 1776 times

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: 4 VESCs CANbus issues

Postby rew » 19 Jul 2017, 17:37

If you type "faults" and get those errors, the VESC did not reboot after getting those errors. It forgets all previous errors if it reboots.

TimB
Posts: 9
Joined: 26 Apr 2017, 14:50
Location: Paris
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: 4 VESCs CANbus issues

Postby TimB » 21 Jul 2017, 08:32

I don't know if it is a reboot or not but the VESC stops sending commands then it blinks 3 three times and the motor starts running again...

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: 4 VESCs CANbus issues

Postby rew » 21 Jul 2017, 12:41

It's a fault.
The fault causes the red led to blink. IIRC the number of times gives some indication as to what is wrong.
After the fault clears, some time has to pass before the VESC will allow driving the motor again. This is configurable under BLDC_tool as "fault time" or something like that. 3 seconds by default IIRC.

So... You're getting a DRV fault. As I'm happy to say I don't use DRV chips in my design, I don't know too much about what could cause the DRV to report a fault.

So there are more or less three options.
* FAULT that shouldn't happen, happens, DRV detects fault, reports fault VESC software sees fault reports it (flashses red led) and shuts down for a while.
* No real fault happens, but DRV incorrectly detects a fault , reports fault VESC software sees fault reports it (flashses red led) and shuts down for a while.
* No real fault happens, so DRV doesn't report a fault, but VESC software incorrectly sees fault reports it (flashses red led) and shuts down for a while.

Which of the three is happening: I don't know.

pf26
Posts: 310
Joined: 28 Mar 2016, 14:37
Location: FR Valence
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: 4 VESCs CANbus issues

Postby pf26 » 22 Jul 2017, 09:41

As you say your Arduino freezes too, I suspect there is a bug in your program that sends commands. Possibly you send errouneous commands (like way to high duty cycles..). You should check your code, especially long/ byte conversion and sending commands for all possible values, and ideally in a simpler config (just one Vesc).
Is it always the same VESC showing this error, or can it be any of the 4 ?

TimB
Posts: 9
Joined: 26 Apr 2017, 14:50
Location: Paris
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: 4 VESCs CANbus issues

Postby TimB » 26 Jul 2017, 11:58

Thanks for your tips I decided to just ignore the DRV faults by putting the" fault stop time" to 0 seconds in the BLDC tool.

The Arduino doesn't freeze anymore it was due to something else... I am sure of what I am sending (I can confirm it thanks to the CAN analyzer) and I totally control the value of the duty cycle commands.

The interesting thing is that when I slowly increase (or decrease) the duty cycle commands I have not DRV faults. However I can have some when the duty cycle variation is strong (sending 0% to 50% directly instead of doing a speed ramp)

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: 4 VESCs CANbus issues

Postby rew » 27 Jul 2017, 04:55

The DRV fault may be that it detects an overcurrent situation. This might be fixed by setting the motor current limit a bit lower.


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Return to “Hardware Problems”

Who is online

Users browsing this forum: No registered users and 2 guests