You are here

VESCs rotating the motors at constant RPM on UART control

2 posts / 0 new
Last post
Pratham701
Offline
Last seen: 3 years 5 months ago
Joined: 2021-03-09 11:00
Posts: 1
VESCs rotating the motors at constant RPM on UART control

So I have connected my VESC 4.21 to a 190KV motor. Using UART, I have paired an Arduino Due with it and powering the VESC with 24 volts. I am using SolidGeek's library(https://github.com/SolidGeek/VescUart) to run the motors.

 

Issues:

1. When I try to use the setNunchuck value function, the motor runs unpredictability. idealy, it should spin clockwise for values 0-127, and the other way for 127-155. What happens is the motor doesn't start until I reach 150 value, at which it attends the constant rpm, which isn't even the max value, and doesn't respond to changes in the nunchuck values. 

2. I used the setCurrent function for the same, and the behaviour is more or less the same. Doesn't run till a point, then starts with a jerk and attains a constant rpm, and then doesn't respond to any change to the current value, unless stopped.

 

Is the issue of VESC tool? Or is the VESC getting constrained to some parameters? I have the proper battery, as the motor works fine when I run it on the tool.

 

Indy8976
Offline
Last seen: 3 months 1 week ago
VESC Free
Joined: 2022-06-20 16:31
Posts: 4

Hi, I hope it is not too late,

May be the problem is that Serial in Arduino Due outputs and inputs are in 3.3V and not in 5V as Arduino UNO; probably you have to buy a Logic Level Converter that increase output tension from 3.3V to 5V in putput and downgrade from 5V to 3.3V in input.

A try you can have is to upload the code ( use SoftwareSerial for multiple VESC ) to an Arduino UNO and see what happens. This because output in Arduino UNO is 5V