- May 18, 2021 at 8:18 am #8396
I am about to build a mecanum robot. I have decided that I am initially is only going to drive it with a RC-controller.
I intend to use an Arduino and Sabertooth motor controller to control it. I will try to use this [code](https://github.com/SuperDroidRobots/RC_Mecanum_PWM/tree/master/RC_Mecanum_PWM) as a basis.
First, I need to ensure that I have all the components I need.
I have four geared [motors](https://rhinomc.com/products/dc-12v-precision-encoder-servo-motor/rhino-200rpm-15kgcm-dc-planetary-geared-high-prescision-encoder-servo-motorrmcs-5024/) with encoders. As I am going to controll with a RC controller. As I understand it will be no need for encoders for a RC controlled robot?. Would it be just fine to not connect the wires from the encoder and just drive it as a normal DC motor?
I am going to use two dual [Sabertooth 12A](https://www.dimensionengineering.com/products/sabertooth2x12).
Radio controller and transmitter.
I have some RC controllers I have used for planes and multicopters. These does only have one spring centred stick. Will a controller like that be just fine? Will different controllers and receivers affect the code?
Is there anything else I need?
In line 29 in this [code](https://github.com/SuperDroidRobots/RC_Mecanum_PWM/blob/master/RC_Mecanum_PWM/hardware.h ) it says, “Output signals for TTL Relays”. Do I need some relays or what?May 18, 2021 at 8:51 am #8399
Your motors are intended to be operated using a Servo Motor Driver, which they mention in the link you posted (https://robokits.co.in/motor-drives-drivers/encoder-dc-servo/dc-servo-motor-driver-40v-20a-w-t-step-direction-input). It may be possible to bypass the servo part of it and operate as a basic DC motor but I don’t want to speculate on how to hack a motor we’ve never used before. If you can put a constant DC voltage on it and it spins continuously then it will work with DC motor controllers.
That being said, I don’t recommend using the Sabertooth 2×12. We consistently encounter problems with this specific model and we try to avoid using them on our robots. However the 2×12 RC, 2×25, and all other Sabertooth models work great. The next cheaper option available to you is the Roboclaw 2×15 which is also good and has the option of reading encoders and doing closed loop speed control.
For the RC controller you will need at least 3 axes to control a vectoring robot (drive, turn, and strafe).
And no you don’t need relays. You can ignore that stuff.
For lots more information take a look at our Vectoring Robot Support page: https://wiki.sdrobots.com/index.php/Vectoring_Robot_SupportMay 18, 2021 at 1:06 pm #8400
Thank you for your answer.
I was not fully aware of the difference of servo motor and DC-motor, but I see now that I should have ordered plain DC-motors.
When I was looking at your robots it seemed like that you were using Sabertooth 2×12.
The problem right now is that I have ordered the Sabertooths, and do not have much time left, so I can most likely not wait for new motors and drivers to be delivered.
I have some servodrivers like these https://robokits.download/downloads/RMCS-2303%20updated%20datasheet.pdf. It would probalby be hard to implement your code for these?May 18, 2021 at 4:07 pm #8401
You can use those Servo Drivers but you will have to modify the Arduino code to send commands to those instead of the Sabertooths. From the datasheet it sounds like you will need to put the drivers in Digital Speed Control mode and send it Modbus ASCII commands from the Arduino. I haven’t tried looking but I would expect you can find some Modbus ASCII Arduino libraries floating around online.
If you can get the servo motors to act as plain DC motors then you can still use the 2×12 though.May 18, 2021 at 4:36 pm #8402
Thank you. It seems like I get the motor to run by just applying a 3s LiPo battery. Will try to use the Sabertooths. It would be fun to implement the servo drivers and make the robot programable, but righ now I have not time for that. I am doing a school project, and I am about to finsih it very soon. (this is outside my field of studt, and what I am expected to do, but I want to take this a little bit longer).May 19, 2021 at 7:41 am #8403
I am a little bit confused regarding how I should hook the Sabertooth controllers to the Arduino, when I look at this code: https://github.com/SuperDroidRobots/RC_Mecanum_PWM/blob/master/RC_Mecanum_PWM/hardware.h.
How does the PWM pin defined in the code correspond with the outputs on the Sabertooth? As I see there is defined one PWM for each motor for controlling speed, and two pins for controlling the direction. When it comes to the Sabertooth I do not understand how to connect this.
I am also wondering about what the LED pins defined are?
May 19, 2021 at 8:13 am #8405
- This reply was modified 8 months, 1 week ago by Aleksander. Reason: Spelling error
That code is written for our PWM Motor Controllers, which take a PWM signal input. Take a look at the RC_Mecanum_Sabertooth sketch for the Sabertooth implementation.May 19, 2021 at 8:33 am #8406
Thank you so much! I have to try to hook it up and see if I can get it up and running.
You must be logged in to reply to this topic.