You are here

Controlling a Tank

3 posts / 0 new
Last post
JulianT
Offline
Last seen: 4 days 18 hours ago
VESC Free
Joined: 2020-01-14 16:25
Posts: 10
Controlling a Tank

Hi.

Maybe i first talk about the setting: Two 13“ (about 255mm) Wheels on each side with a hoover board Motor inside each wheel. A normal ppm remote controller with an Arduino after the receiver for mixing the forward and direction signal. Output of the Arduino is ppm again going to the 2 controller via Y-Cable on each side. VESC setting is PID controller (set RPM) with the standard settings.

Now the Problem: Running straight forward: working fine. Driving a curve at moderate to high speed (large curve radius) also fine. But turning on Place (two wheels forward the other two wheels backwards) doesn’t  work well. The reason should be: very high current at very low RMP needed. Now i could optimize the PID-parameters for this situation but i fear this will negative effect the normal behaviour when just running forward (in this case current is more or less proportional to RPM).

The main problem for a clean solution might be that the left VESC doesn’t know what the right VESC is doing (going same direction -> low Motor current is needed; going opposite direction -> very high current is needed).

Is it possible to change the PID-Parameters over UART while running? (In this case the microcontroller between the receiver and the VESC s will change the PID values depending on the manoeuvre).

Another possibility might be using SetPosition for the case of turning (low speed) and using SetRPM for „normal“ drive ?

The filthiest version might be: Using the Arduino to first making a look up table by measuring the current need for different manoeuvre (learning) and then setCurrent depending on the RC Command and then make the fine tune with a PID Control Loop in the microcontroller.

What might be the most promising way or does anybody have a better Idea?

By the way is it possible to use a UART-Bus two connect all four VESC on one serial Output of the Microcontroller by sending a adress before sending a command or do i need direct connection to the microcontroller for each VESC?

 

Thanks a lot in advance

Kind Regards

Julian Tacke

dkoutras
Offline
Last seen: 8 months 2 weeks ago
VESC Free
Joined: 2023-02-17 12:36
Posts: 2

Hello, I am facing a similar issue. Did you manage to solve the problem?

frank
Offline
Last seen: 16 hours 55 min ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 847

Please make sure to use opto decouplers when using PPM or UART, so that each unit is separated from the others to avoid GND loops. Y-PPm is no good idea, even if you cut cables. Ideally you try to use CAN. Also note that in speed control you can get coupling effects between the individual units. Basically one motor turns slightly faster than another one and they work against each other, each trying to keep the target RPM. This can cause heavy oscillations in the system, even at very low RPM tolerances in between the motors. In current control mode you don't face these issues.