Direct CAN velocity control

Discussions regarding the Field Oriented Control (FOC) implementation on the VESC.
[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
jgeating
Posts: 21
Joined: 20 Jan 2016, 04:29
Location: Washington, DC
[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

Direct CAN velocity control

Postby jgeating » 21 Jul 2018, 21:00

Attachments
_DSC0663.JPG
_DSC0663.JPG (178.36 KiB) Viewed 822 times
_DSC0662.JPG
_DSC0662.JPG (297.48 KiB) Viewed 822 times

jgeating
Posts: 21
Joined: 20 Jan 2016, 04:29
Location: Washington, DC
[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: Direct CAN velocity control

Postby jgeating » 21 Jul 2018, 21:09

Update: If I unplug two of the CAN connections to the other motors, the remaining single motor works just fine. The motion is both smoother, and it doesn't crap out when I cross zero. I couldn't find much concrete information about proper multiple device CAN networking, so I just wired everything in parallel. I set the CAN ID's in VESC tool, which lets me control the motors individually. The CAN shields are properly terminated with 120 ohm resistors, and I would assume the VESC is as well. Any CAN experts out there know what could be the problem?

Thanks! Once I get this robot up and running, I'm excited to post some videos here showcasing the precision and power of the VESC 6.

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: Direct CAN velocity control

Postby pf26 » 23 Jul 2018, 08:48

Having CAN signals through sliprings seems a bit scary to me for long term reliability.. I would have used sliprings for power, and wireless (802.15.4) for control. If you use CAN through sliprings, maybe using some small capacitors (47pF ?) between 0V and both CANH and CANL, can help filter the possible rotating contact noise.
Usually, one prefers chaining the CAN devices, and having terminating resistors on both ends. Not sure the VESC6 has the termination resistor embedeed, it may be manufacturer dependant. Using a parallel/start cabling is likely to cause more issues, at least you would not want to use 4 times 120R resistors, that would be too much load (possibly you could try with 270R instead).
Nice setup anyway, must be tough to control with less degree of freedom (3) than motors to drive (6) if I understand well ?

jgeating
Posts: 21
Joined: 20 Jan 2016, 04:29
Location: Washington, DC
[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: Direct CAN velocity control

Postby jgeating » 26 Jul 2018, 23:39

Thanks pf26, appreciate the reply. You're quite active here and super knowledgeable. Do you have any links to recent work you've done? A while ago I saw you using a VESC to control the pitch of an airfoil, but that was ages ago. I'm curious what you've done since.

I'm definitely going to look at the wireless control - I was trading CAN vs. UART vs. PPM and all the while forgot wireless control was available. For the 3 motors NOT going through sliprings (these control the yaw or pointing angle of the wheels), I'll stick with CAN, but run a shielded cable (CANH, CANL, GND) from the microcontroller transceiver to the three nodes serially, and terminate with a 120 ohm resistor (the microcontroller transceiver already has terminating resistors for both of its channels).

Re. DOFs, there are three wheels, but 6 DOFs and 6 motors. Each wheel has a drive motor to spin the wheel, but then also a yaw motor to aim it. It's called "swerve drive", and it's pretty popular in first robotics among other applications. Never to this power level/package size that I've seen though. I advised and had a senior design team build it for me this past year: https://swerveroboticsystems.github.io/

Bad news - two days ago it looks like I may have simultaneously bricked all 6 of the VESCs on the robot in parallel. Just when I was getting confident to give them all power simultaneously. All I did was switch all the CAN rates from 500K to 125K, thinking that might help with the comms issues. I likewise switched the microcontroller transceiver code to 125K, and may have made some other small changes (position mode instead of RPM), but when I hooked it up, the motors buzzed like they were in position control mode, then the sound slowly faded, and I got the dreaded red blinking LED. 2x blinks, even after restart. VESC tool doesn't show any faults in the terminal though. I can connect and measure resistance/inductance, but when I try and measure the flux linkage, the motor doesn't rotate or try. Are my DRV8302's toast? And before I think about buying 6 new VESCs, is it feasible to replace these, assuming I had access to proper equipment - which I probably do.

Thanks,
-Josh


[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 “FOC”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests