revr
10 µW
Hi folks, I am after some basic guidance on getting a raspberry pi to drive a VESC inverter via the CAN.
The main issue is that I don't seem to be getting any CAN traffic with candump on the Pi. No CAN messages from Pi have any effect on the ESC.
It's dead Jim.
I need a way to get the ESC to create a CAN message I can read on the Pi, at least as a test.
I am using VESC Tool 6 for MacOS and also Android. This version seems very basic, even tho it was paid. It doesn't say "bronze" or etc. There are not dev tools or CAN analysis tools. Are these only on PC and Linux?
Here is the pi CAN hat doc and tests which I can run fine on the Pi
The ESC is MKS 84200HP
I have wired the two Pi CAN Hat ports together and to the CAN bus on the ESC.
This is so I can run commands on can1 and dump can0.
The CAN H and CAN L have 100 ohms of resistance on the ESC, which apparently means it is not blown.
The messages I have attempted to make assume that the VESC ID is the ID in the message:
00 00 0A 00 00 27 4C 00
Was suggested online:
if your CAN ID is 76 (4C) for example : Send 0x000000A 00 00 27 4C and your motor will run at 10% Duty Cycle
Sent as
data=[0x00, 0x00, 0x0A, 0x00, 0x00, 0x27, 0x4C, 0x00]
candump shows
008 [8] 00 00 0A 00 00 27 4C 00
However, contention_id (8) and source and target id and message id (also 8, seems wrong) I don't understand.
Thanks,
Craig
The main issue is that I don't seem to be getting any CAN traffic with candump on the Pi. No CAN messages from Pi have any effect on the ESC.
It's dead Jim.
I need a way to get the ESC to create a CAN message I can read on the Pi, at least as a test.
I am using VESC Tool 6 for MacOS and also Android. This version seems very basic, even tho it was paid. It doesn't say "bronze" or etc. There are not dev tools or CAN analysis tools. Are these only on PC and Linux?
Here is the pi CAN hat doc and tests which I can run fine on the Pi
The ESC is MKS 84200HP
I have wired the two Pi CAN Hat ports together and to the CAN bus on the ESC.
This is so I can run commands on can1 and dump can0.
The CAN H and CAN L have 100 ohms of resistance on the ESC, which apparently means it is not blown.
The messages I have attempted to make assume that the VESC ID is the ID in the message:
00 00 0A 00 00 27 4C 00
Was suggested online:
if your CAN ID is 76 (4C) for example : Send 0x000000A 00 00 27 4C and your motor will run at 10% Duty Cycle
Sent as
data=[0x00, 0x00, 0x0A, 0x00, 0x00, 0x27, 0x4C, 0x00]
candump shows
008 [8] 00 00 0A 00 00 27 4C 00
However, contention_id (8) and source and target id and message id (also 8, seems wrong) I don't understand.
Thanks,
Craig