Torque Mode, mixed mode

2 years 1 month ago #29533915 by dgonchar@mail.ru
Good day everyone, sorry if my english is not perfect.
My setup is following:
- SBL2360
- Torque mode
- Mixed mode #3
- two bldc.

Q1. I want to send motors torque comand and steering comand via rs232. Is it correst if I use following strings:
- !G1 xxx - for both motor torque;
- !G2 yyy - for steering value.
If it is correct, than what parameter the steering comand will change speed of the motors or its torque?

Q2. To tune the robot, I want to send PID coefficients (kP, kI,kD) using serial. How do I do this in my cace?
Do I need to send ^KD 1 xxx for first motor and ^KD 2 xxx for the second one, or ^KD 1 xxx is enough for both motors in mixed mode?

Thanks for any answer,
Dmitry.

Please Log in or Create an account to join the conversation.

2 years 1 month ago - 2 years 1 month ago #29533922 by Gabriel_Isko
Replied by Gabriel_Isko on topic Torque Mode, mixed mode
Everything looks mostly correct from my end, just a few notes:

All mixing mode does is mix the motor command inputs going to each motor output channel. You can think of all mixing taking place before any setting in the power output window is used (other than the mixed mode setting itself).

For question one, you are completely correct in how this works. You just forgot a space between the first argument. Here is the correct syntax:

!G 1 xxx
!G 2 yyy

For the PID coefficients, you will need to send each per motor channel since the PID loop runs between the calculated command value from the mixing, and the measured current from the motor.

The only concern I have is that I am not sure I understand why you are using mixed mode with torque mode. Usually, mixed mode is only used with open loop or with a speed control mode. Let me know more about your application, and I will recommend the best movement mode for you.

Please Log in or Create an account to join the conversation.

2 years 1 month ago #29533928 by dgonchar@mail.ru
Gabriel,
Thanks for your reply.
My primary aim is to study this marvelous controller as a hobby. The application I chose for my first project is Segway-like scooter. I have arduino that gets angle from MPU5060, calculates error from vertical and sends this error to the SBL2360 controller. This error should be the feedback to the torque PID regulator. Also, using arduino I'm planning to send coefisients to PID by means of potentiometers (!G 2 yyy).
To steer, I'm going to use potentiometer connected to steering bar. This potentiometer will send signal to chanel #2.
Regards,
Dmitry

Please Log in or Create an account to join the conversation.

2 years 1 month ago #29533930 by LROBBINS
Replied by LROBBINS on topic Torque Mode, mixed mode
Why are you using torque mode? That will maintain set torque, not set speed - if you come to an obstacle, like an up slope, the motors will slow down. To me this seems the opposite of what you want in a person mover.

Please Log in or Create an account to join the conversation.

2 years 1 month ago #29533931 by Gabriel_Isko
Replied by Gabriel_Isko on topic Torque Mode, mixed mode
If you are trying to perform balancing, Torque mode is usually what get's used, but using it in conjunction with mixed mode doesn't seem like a great idea. I have to admit that I have never built a Segway style balancer before, so I'm not sure how turning control should be implemented in that type of application. However, I would double check our mixed mode implementation. Documentation should start on page 83 of our User Manual . Make sure this performs what you want for mixed mode in a segway with torque control - I would imagine a better approach would be to set up an independent control either in Arduino or a Microbasic script and control each wheel torque independently.

Please Log in or Create an account to join the conversation.

2 years 1 month ago #29533936 by dgonchar@mail.ru
Thaks for your feedback! I think, proerly adjusted Integral part of PID regulator should increase the torque if it is not enough to overcome the slope.

Please Log in or Create an account to join the conversation.

2 years 1 month ago #29533937 by dgonchar@mail.ru
Gabriel,
Yes, separate torque control is what first came in mind. But it is a bit more difficult in terms of mah and programming and my skils are not perfect on that subject. So I'm thinking to evaluate the Mixed mode first and if it fails, I'll try what you've proposed.
Regards,
D.

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.193 seconds