Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control multiple motors #43

Open
MatishParmar opened this issue May 4, 2023 · 3 comments
Open

Control multiple motors #43

MatishParmar opened this issue May 4, 2023 · 3 comments

Comments

@MatishParmar
Copy link

Hi, how to do I control two motors within VESCUart for speed control? I want both motors to spin at the same speed as one another bidirectional, there's no need for the motors to ever operate at different speeds.

Thanks

@MatishParmar
Copy link
Author

what type of vehicle are these motors for? and yes you can set them to be exactly the same with the vest tool

On Thu, May 4, 2023 at 2:06 PM MatishParmar @.> wrote: Hi, how to do I control two motors within VESCUart for speed control? I want both motors to spin at the same speed as one another bidirectional, there's no need for the motors to ever operate at different speeds. Thanks — Reply to this email directly, view it on GitHub <#43>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AX6CZDEZUS7AG6BAUNSW2U3XEPV2XANCNFSM6AAAAAAXWDY3JM . You are receiving this because you are subscribed to this thread.Message ID: @.>

The vehicle is a pod operating on magnetic propulsion that simply needs to go forwards. To levitate, the motors need to spin at a set speed. To brake, the motors need to spin in the opposite direction at a set speed.

Hence i need bidirectional speed control for 2 motors and was hoping the joystick gives the same speed to both motors

@SolidGeek
Copy link
Owner

SolidGeek commented May 8, 2023

You should be able to use the CAN bus functionality of the library. You need to connect both your VESC over CAN, and connect over UART to the "master" VESC. Then you can control the speed of both VESCs from one microcontroller using:

https://github.com/SolidGeek/VescUart/blob/master/src/VescUart.h#LL153C12-L153C12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@SolidGeek @MatishParmar and others