A reminder about the “weirdness” of the CM-530 previously mentioned. You CANNOT use the Mini USB and the 4-pin connectors at the same time. Strangely, the older CM-510 can use both ports at the same time.
Okay…
Tried using the UART and Serial1 of the Arduino NANO 33 IoT into the CM-530 mini-USB port to no avail…
Sent you an email with more info…
After so much implementation problems from your end, so I decided to drag out all my Arduino boards and CM-530, and do this project myself.
On my Arduino R4 Minima, I used this sketch:
uint16_t TxData = 0;
uint8_t TxD_packet[6] = {0xFF, 0x55, 0, 0, 0, 0};
void setup() {
// initialize both serial ports:
Serial.begin(115200);
Serial1.begin(57600);
delay(2000);
}
void loop() {
for (int i=0; i < 51; i++)
{
TxData = i;
TxD_packet[2] = lowByte(TxData);
TxD_packet[3] = ~TxD_packet[2];
TxD_packet[4] = highByte(TxData);
TxD_packet[5] = ~TxD_packet[4];
Serial1.write(TxD_packet, sizeof(TxD_packet));
Serial.println("Sending Music Scale No.\t" + String(TxData));
delay(5000);
}
}
Essentially, every 5 seconds the R4 will send a number between 0 and 50 through Serial1 over to the CM-530.
On the CM-530, I used a simple TASK program which will pick up this number and use it as a Musical Scale and play it.
First Project: Using wired connection between R4 and CM-530
Below is my first test configuration, whereas I modified the SMALLER end of the typical Wireless Cable used for BT-210/410 (which you already ordered). TX and RX were cross-overed as required.
At run time for both boards, every 5 seconds, I saw the blue LED (RxD) blinks on briefly on the CM-530, meaning that it did receive a BT RC-100 packet, but the CM-530 did not play the music scales as programmed!
As if it did not want to process the RC-100 packet! But I know that this technique had worked for me before (as documented in my Arduino book Section 2.11 for dual OpenRB-150 back in 2022). So what happened between now and then?
Second Project: Using wired connection between OpenRB-150 and CM-530
Below is my second test configuration, whereas the same modified wireless Cable used for BT-210/410 is used between Serial3 on the OpenRB-150 and the CM-530, and TX and RX were cross-overed as required.
And exactly the same previous results with the R4 happened again! So I scratched my head for a while and “expletives deleted”.
And then I realized that I forgot the most fundamental principle in using ROBOTIS systems: although the OpenRB-150 is an open-architecture board, the CM-530 is a closed/proprietary board. Consequently, the CM-530 only works with ROBOTIS hardware. Technically speaking, I think it got to do with the FTDI communication chip, used in all past-present-future ROBOTIS systems, and each FTDI chip is licensed so there must be some “secret handshakes” going on behind the scenes within the firmware of the CM-530.
From the user’s point of view, the only choice we have is to figure out a way to “fake out” the CM-530 into thinking that it is receiving an RC-100 packet from the RC-100B Physical Remote Controller that came with your Premium kit (even though it actually came from an Arduino board). Luckily, you still have your matching set of BT-410s (right?).
Right now, you should have the BT-410 (Peripheral module) installed in the head of your Premium Humanoid and it is plugged into the 4-Pin Comm. Port on the CM-530.
The master BT-410 has been connected to the RC-100B, so you need to disconnect it from the RC-100B and modify its BIGGER END using Dupont Pins as shown below:
You have my Arduino book, so the details of the wiring work is shown in Fig. 2.10. You have your order of the wireless cables being sent to you right? So if you cannot wait, go ahead and modify your existing Master BT-410 cable per the above picture.
Third Project: Using wireless BT-410 connection between UNO R4 and CM-530
The picture below shows how the rewired Master BT-410 is hooked up to the R4.
And on the CM-530, I hooked up my Peripheral BT-410 as shown below:
And I restarted all programs, and everything worked as it should, view the short video enclosed below.
Thanks for pursuing…that is a solution…may also be able to just use the BT module embedded in the UNO itself too?
So, maybe that is the case, but that seems so obstructive by Robotis, and why then would things have worked when I sent PySerial packets from the RPi to the mini-USB port?
Is it possible to address/interact with the engineering group at Robotis?
I think that ROBOTIS and/or Windows OS and RPi OS somehow pay for the FTDI License indirectly so that we (the users) get to use the “free” drivers in Windows COM Port or RPi OS ttyUSB device.
Everybody has to protect their Intellectual Property somehow - although I am doing a very poor job at it .
For example, ChatGPT just gathers up all the web postings in the world to come up with its “recommendations”, but they did have to create their ChatGPT “engine” so they deserve a subscription fee. Only the “free post-generating” peoples like me got nothing! Only occasional thanks from forum users to keep us going!
If you email @ROBOTISUSA privately, he probably can help you which whom to contact with ROBOTIS.
I do not know anything about the UNO BT stack, you’ll need to check directly with the Arduino Forum for that topic.
Well, I got my cables in and confirmed your experience with my NANO 33 IoT using UART/Serial1 and the 4-pin port…
I ordered a set of BT-410 modules as that looks to be the only way home at present, though not very elegant - thank you for investigating that…I considered having the Arduino instruct an RPi, but that seems ridiculous, eh!
I still think I am missing something simple…I sent a message to Jonathon and hopefully he can get me to engineering somehow - if nothing else I would like an explanation/closure on this…not sure I buy the FTDI thing, I do not think they charge for use…the secret protocol may be at work but the RPi thing discounts that in my mind…
The BT-410 “pipe” that is created is moving the same data you sent…I suppose they could be doctoring the transmission and adding something such that the CM-530 sees something that says, “Oh, okay, that’s a valid transmission”…
You have been at this much more than me, so you know better Robotis’ philosophy about such things and I trust that, but again, it seems so backward to want to restrict interfacing such things…that’s not where they make their money…
Anyway, Chi, thanks again for all your attention to this…you have provided a path and that’s what I was after, after all, so good on you/us!
I’ll keep you posted…Frank
I was trying to save you money, so I tried to find a work-around involving your existing equipment as much as possible.
If money is no object to you, and as you are keen towards USB devices, there is also the ROBOTIS U2D2 module you can also look at.
It uses a USB input and outputting into a UART 4-pin connector. But I have never tried it that way though with any CM-5XX controller - so I do not know if it is really compatible with the CM-530 or not. I only used it to control DXLs directly via the USB port.
This sub-capability used to be performed by the LN-101 which is “retired” some years back.
No, remember, the key to all this, underlying, is to have a device that is compatible with the Arduino IoT Cloud, Alexa, etc., which the NANO 33 IoT and the R4 WiFi provide, so I will continue that way since it appears the U2D2 needs at true USB Host Controller on the upwind side…interesting device though and I may order one just to play with…
The BT-410 route is OK, just not a fan of BT for reliability but it is probably fine for this application - I just have to get used to the idea of not having the simple, direct hardwired connection!
Again, I appreciate all your attention!!
Having a direct hard wired connection to the Humanoid means that the bot is tethered mechanically and this will affect its balance when it is walking or doing leg tricks, i.e. you’ll likely have to revise the existing motion files.
No, I just meant a hardwired connection between the CM-530 and the Arduino…the bot would be typically battery powered as you saw for Jarvis…
I am obviously still bugged by this and have not heard from Jonathon, so, what I think I will do is break out a serial logger and see if i can detect what might be different coming out of the raw Serial1 UART from the Arduino and compare to the output of the BT-410…something is different, right?
See if I can detect any “secret” protocol…maybe they add a bit/byte, something to the packet we can see and add too?!
Irritated by all this…
I got a hunch that this happens at the initial connection/handshake so the Robotis devices can recognize each other and they don’t like to “talk to strangers”. But you seems to know more about that area than me.
Humanoid up and responding to Alexa trigger, so on my way!
Thanks Chi (@roboteer) for all your help/guidance along the way…
When I get a moment, I will write up a recap of this venture and post here…
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.