Thumbnail

UBTECH Alpha Servos UBT-12HC

by UBTech

Control the UBTECH Alpha Robot Digital smart Servos (UBT-12HC) with ARC

Requires ARC v11 (Updated 2/27/2020)

How to add the UBTECH Alpha Servos UBT-12HC robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Servo category tab.
  5. 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

User-inserted image

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.

User-inserted image


ARC Pro

Upgrade to ARC Pro

Experience the transformation – subscribe to Synthiam ARC Pro and watch your robot evolve into a marvel of innovation and intelligence.

PRO
USA
#89  

Quote:

...if you want to see the messages then connect to the ezb emulator. Set the emulation device (iotiny) and use your project.

PRO
USA
#90   — Edited

@DJ:

User-inserted image

@DJ: I just got curious .... above you have the output of 3 servo positions 1, 91, 180 (ARC software servo degrees) based in the existent info: https://alexsonea.com/2017/10/15/jimu-hacking-the-communication-protocol/

UBTech Servos rotate 180 degrees and they use 0 for the middle point, so they rotate -90 to 90, using a single byte they can't fit 360 degrees, but they left the door open to cover [-120 to -120] so for a 180 degrees the output must be:

-90 degrees servo /   1 degree ARC   = 120 - 90 = 30
  0 degrees servo /  91 degrees ARC  = 120 + 0   = 120
+90 degrees servo / 180 degrees ARC  = 120 + 90  = 210

Only the middle point seems correct, the angles are stretch to an interval of -120/+120  i presume values < 30 or > 210 will be ignored.

*** edit *** Check the post below

#91   — Edited

I' m serious, but ignorant in ezb's things. I looked at that folder, and have found it. I had  never  looked at that folder before. Thank you.

PRO
USA
#92   — Edited

@DJ, A correction it seems the servos / software supports -120 / +120 

User-inserted image

So the plugin is mapping an interval of 1-180 to -120 to 120, is not stretching but is not correct either, the map should be between [1-240] to [-120 / +120]

PRO
USA
#93  

@Leonardo46: this is the emulator (Emulating an EZB4 v2)

User-inserted image

this is ARC/EZ-Builder:

User-inserted image

#94   — Edited

@PTP. I see you've done some work on ubtech servos. You mentioned  robot Jimu . Are you testing on all servos of  that robot or on a single servo ? Are  the servos and protocol the same as Alpha 1S robot i'm testing with DJ'S plug-in ? I found different results in my tests. Movement range for me is correct, but action execution is erratic.

PRO
USA
#95  

Quote:

I see you've done some work on ubtech servos.
 no work, i just got curious with this thread.

Quote:

 You mentioned robot Jimu
i took a few minutes crawling the thread up and down... DJ wrote:

Quote:

Discussion on these servos is here: https://synthiam.com/Question/3932
Post #27:

User-inserted image

So I follow the link and I post here. ASFAIK there is no public information regarding the Alpha 1's SERVO, one user contacted them and they mentioned the protocol is private.  I believe DJ is using that information.

Quote:

Are the servos and protocol the same as Alpha 1S robot i'm testing with DJ'S plug-in ?
based in the above link,  I believe UBTECH Jimu robots uses the same UBTECH Alpha 1S servos or at least the same servo protocol.

To be honest I think is a waste of resources to do plugins for hacked toys without a public API.

I imagine DJ trying to get the best results and complaining about their implementation, but, their implementation is private is not their intention to share with third party and it works for them.

Imagine someone trying to connect/hack an EZB controller without having information regarding the protocol or knowing the PCB, I would find a lot of design issues (because I'm guessing) and I don't have clue why it works that away.

BUT on the other side I too like to hack and explore new stuff... so I understand DJ.

PRO
USA
#96  

Quote:

I found different results in my tests. Movement range for me is correct, but action execution is erratic.
So if you run this script:

Servo(V1, 1)
Sleep(2000)
Servo(V1, 91)
Sleep(2000)
Servo(V1, 180)

The servo moves 180 degrees correctly ?