- August 21, 2018 at 1:44 am #5597Brad SquicciariniParticipant
On the electrical assembly page, the documentation says to use a DB9 Rs232 To TTL cable (MCU-026-072) to connect a Roboteq controller to a microcontroller. However, in this code example (https://github.com/SuperDroidRobots/SDC2130-Example/blob/master/SDC2130_Example/SDC2130_Example.ino), it says “Pins 6 and 7 are for TTL level serial”. I tried connecting an Arduino with my SDC2130. I was able to communicate over the digital input pins of the SDC2130 but not over pins 6 and 7 via a TTL serial connection.
What I did was connect the Rx (D0) and Tx (D1) pins of the Arduino to pins 6 and 7, respectively, on the Roboteq with a wire. Am I missing something? Could you elaborate on this more?August 21, 2018 at 8:30 am #5599SuperDroidKeymaster
We have to fix that example code, they use to have pins 6 and 7 to be ttl but now you have to use rs232. You can see the RoboteQ datasheet page 6. You can follow this wiring diagram.
Thanks for letting us know.August 22, 2018 at 5:01 pm #5603DaveParticipant
Hello, I’m also trying to get that exact same demo code working as well, but I’m confused on a couple of points.
1. Do you need to use the “DB9 Rs232 To TTL cable MCU-026-072” or can you connect the SDC2130 directly to the Arduino? Could you please share the schematic for a direct connection? [ex. SDC2130 DB15 pin2 to Arduino P0 & SDC2130 DB15 P3 to Arduino P1]
2. The example code mentioned above states that the “Roboteq SDC2130 COM (Must be 115200)” but I don’t see where you can change the rate in the RoboteQ Utility. Is 115200 the motor controller defult? How can I verify this?
3. It sounds like the encoders have to be enabled using the RobotieQ Utility. What is the proper configuration? I’ve tried a few and I can see the output in the Utility, but no luck with the Arduino moving the motor.
4. Does the SDC2130 DB P5 need to be connected to ground? If yes, I assume it need to be connected to the Arduino Gnd based on note 5 on pg 5 of the SDC2130 manual.
Thank you very much for your help!
PS. I am using your encoder pull-up board (TE-179-000)August 22, 2018 at 5:54 pm #5604SuperDroidKeymaster
See the answers to your questions below:
1. A direct connection will not work here. You need the RS-232 to TTL converter cable.
2. The only baud rate accepted by the RoboteQ MC is 115200. The Ardunio serial port has to be initialized to this rate.
3. Once the encoders have been enabled in Roborun and the configuration has been flashed to the RoboteQ, you should be able to poll encoder data with the Arduino. Of course, the answers to questions 1 and 2 will have to be addressed first. Also, here’s a schematic to verify the encoder wiring: https://www.superdroidrobots.com/Schematics/Roboteq_SDC2260_&_SDC2230.pdf
4. Yes. The schematic in the previous post shows this. The ground is connected to the signal converter which will also be connected to the Arduino.
Let us know if you have anymore questions!August 22, 2018 at 6:43 pm #5605DaveParticipant
Thank you for your quick reply. Looks like I’ll need to order your DB9 Rs232 To TTL cable MCU-026-072 (or is there a more appropriate one?). Meanwhile, regarding enabling the encoders (question 3). There are two different options for enabling the encoders and two boxes that can be checked. Does it matter which option or if any of the boxes are checked? Thanks.
You must be logged in to reply to this topic.