Control the UBTECH Alpha Robot Digital smart Servos (UBT-12HC) with ARC
How to add the UBTECH Alpha Servos UBT-12HC robot skill
- Load the most recent release of ARC (Get ARC).
- Press the Project tab from the top menu bar in ARC.
- Press Add Robot Skill from the button ribbon bar in ARC.
- Choose the Servo category tab.
- Press the UBTECH Alpha Servos UBT-12HC icon to add the robot skill to your project.
Don't have a robot yet?
Follow the Getting Started Guide to build a robot and use the UBTECH Alpha Servos UBT-12HC robot skill.
How to use the UBTECH Alpha Servos UBT-12HC robot skill
Control the UBTECH Alpha Robot Digital smart Servos (UBT-12HC) with ARC. The servos must be powered appropriately, and connected to the EZ-B v4 or IoTiny with the respective port. Visit the Config menu of this plugin to view the port configuration.
The Virtual Ports (V0..V99) in ARC can be assigned to the UbTech servos.
UART Ports
This plugin requires the RX signal wire of the servo be connected to TX of the selected UART or digital port (if Software UART is selected on IoTiny)
Hardware UART is for the EZ-B v4 only. Do not use software UART on EZ-B v4. View the EZ-B v4 datasheet to identify the UART ports (0, 1, or 2). EZ-B v4 datasheet can be found here: http://www.ez-robot.com/Tutorials/Lesson/18
Software UART should only be used with IoTiny
Default baudrate of UBTECH servos is 115,200
Bind To Virtual Servos
- The configuration menu also provides an option to select the Virtual Ports, which correspond with the ID's of the UBTech servos. If the UBTECH servo ID #0 is connected, select V0. #1 = V1, #2 = V2, etc..
Additional Info
- Discussion on these servos is here: https://synthiam.com/Question/3932
Custom Bit Settings There are 3 bits that seem to not be understood for the protocol. Since UBTech does not release the protocol for their products, the community is working to better understand what the parameters are. The configuration menu of this plugin allows you to set hardcoded values for those bits. The bits are for 5, 6 & 7.
Custom servo Position Mapping The UB Tech servos have their own position range, and we don't know what it is. So, the configuration menu allows you to specify the min and max positions for the range. This will be mapped to the ARC servo position range. Meaning, if you set the range in this plugin, it will be mapped to the range for all ARC servo controls.
Protocol Packet Code Here's a copy and paste from the plugin code. This is how the packet is being assembled to be sent to each servo. The values specified by you in the configuration menu are b5, b6, b7, mapLow and mapHigh.
Not exactly. I have : 1 =full counter clockwise (-90) 70 =center 140 =full clockwise (+90) more than 140-145: servo stalls and releases (self protection)
but you wrote:
So is movement range correct or not ?for "correct" I intend I can position the servo within its complete movement range 0 to 180, not necessarily inputting numbers 0 to 180. This way it works. The problem arises when executing fast and complex actions by EZB, that seems to send much more bytes than needed. I observed the byte stream with an oscilloscope. I'm trying to understand what ezb really outputs when performing actions. That's why I need the ezb emulator, that I wasn't able to connect. I saw the images you sent, but I had no connection. Can you suggest why ?
It's not my toy... but we are not discussing IDs or codes, we are talking degrees: I would be worried for a 180 degrees servo 1 is not in the left side and 180 is not in the other extreme and 91 in the middle.
It hurts my brain imagining rotational values with a side paper ...
You run the emulator you select listening, then you connect ARC to the localhost address. I presume you are running the emulator and the ARC in the same machine. Also check:I'm guessing, are you using Windows 7 ?
Alpha 1 Series PC communication protocol (3).pdf Alpha 1 Series Bluetooth communication protocol (3).pdf Here is public information from ubtech, related to their bluetooth and PC protocols. Did you know these documents ? I'd be pleased if you took a look to them, and see if you worked on the same documents, and if you see there something useful for our tests. I'll try your suggestions about connection, but tomorrow. Here it's time to go to bed, Thanks for you collaboration.
that's public I know but that is not for the servo protocol, did you read the other thread ? Another user mentioned a contact with UBTECH and they denied that info.
I'm only here for a couple hours, but my assumptions are based on the existent information here and in the other thread.
you wrote:
I can't understand why you asked the above questions, each servo command message is 10 bytes. If you have a frame with 17 servos ARC will send 17 x 10 bytes = 170.I don't see nothing wrong there, for me what is awkward is the servo range.
maybe i'm jumping the conclusions...
I worked in the other thread too. Look at this bluetooth protocol. There are messages for positioning one servo , and even to position more servos with a single message, and they should be the same with WiFi . This is in response to post 102