You are here

Controlling VESC with arduino -

4 posts / 0 new
Last post
vulkan66
Offline
Last seen: 5 years 4 months ago
Joined: 2019-04-18 16:45
Posts: 4
Controlling VESC with arduino -

Hi,

I control VESC with arduino and I have a problem with arduino freezing/crashing.

I tried to control it via both UART and PWM. Motor (DYNS1665, 800kV) works well for a while and then the arduino (mega 2560) crashes.

When the motor is disconnected in VESC tool, everything works without any crash (I can see desired RPM in the graph).

It looks like the motor generates some signals and propagates it trough VESC to arduino which can't handle them.

Do you have any tips how to solve this problem?

Thanks.

Pimousse
Offline
Last seen: 11 months 3 days ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 101

Maybe try to filter the power supply of the Arduino.

Shorten or shield your cables could be also a solution.

Jack_Li
Offline
Last seen: 5 years 1 week ago
Joined: 2019-07-01 05:03
Posts: 12

maybe you should think how to isolated siganl。like signal and Power sources

jack li

vulkan66
Offline
Last seen: 5 years 4 months ago
Joined: 2019-04-18 16:45
Posts: 4

Thank you for your advice guys, but i solved it by replacing arduino by raspberry pi. There was another problem with i2c sensor. With VESC and i2c sensor both connected to arduino, VESC somehow caused crash of i2c bus and that caused crash of arduino. frown