OpenRB-150 control xl-430 motors and sensors failed

Hi, roboteer

Hope this massage finds you well.

I have soldered the 4 pin header on the openrb-150 board. And I also realized that I can use serial3(D13,D14, VIN, GND). However, I am not sure if my connection is correct or not. Could you please have a look?

I will use serial1 to connect four DXL XL430 motors (COM8, BAUD:1000000 for example)
Then I need to use serial3 to connect four as5047p rotary encoders. Due to the encoders use SPI communication and serial3 is UART communication. How can I connect the encoder to the board? When I use the serial1 to connect the encoders only, the connection is :

AS5047P Pin open RB 150
GND GND
VDD -
VDD3V 3V
MOSI MOSI (Pin: 8)
MISO MISO (Pin: 10)
CLK SCK (Pin: 9)
CSn Any available D pin

When I use serial3, how can I connect D13 and D14?

Best wishes

I am afraid that your recent post is confusing me:

  • In a previous post, I already mentioned that you can forget about Serial2 and just use Serial3 right away, and you were the one insisting on soldering in Serial2. So what seems to be the issue now?

  • Serial1 is internal to the OpenRB-150 and its half-duplex output is at the X3P connectors. So what does Serial1 have to do with COM8? which sounds like a USB Serial Port from the PC?

  • Serial3 use D13 (RX) and D14 (TX) for UART Communications, so why would you want to interface SPI devices to a UART Port, when you already have a SPI Port set up for you via Pins D8, D9, D10? which obviously are separate from D13 and D14. So what is the issue here? In general UART devices are connected to UART ports and SPI devices are connected to SPI Ports.

  • I have never used multiple AS5047P devices before, so you need to shift these types of questions to the Arduino Forum instead, or to the company that sold you those AS5047P, or get a hold of this book “Arduino Cookbook” Amazon.com Most university libraries have this book and it is very useful as it has Arduino code as well as Circuit Diagrams showing how to hook up various devices to the Arduino GPIO pins.

Hi roboteer

Sorry for the confusion. I am a mechanical engineering background student, I did not learn the EEE stuff systematically. That why my question looks stupid.

My initial question was when I use one OpenRB-150 to connect and control everything(Four motors at X3P connectors and Four sensors at SPI port and breadboard), the port will be used by the motors’ control. And the sensors can not be controlled in Arduino with same port. That is why I want to use second serial port to control the sensors. Currently I use two openrb-150, one controls the motors and another one connects with Arduino and controls the sensors as an Arduino nano.

In that case, could you please give me some advice if I can achieve to control everything with single openrb-150?

Best wishes

You obviously is lacking some serious foundational knowledge of the Arduino system, so I would advise you to take a few steps back and read up on a “Getting Started” book like this one:

https://www.amazon.com/Getting-Started-Arduino-Electronics-Prototyping-dp-1680456938/dp/1680456938

If not, you are going to keep on stumbling like this.

In short, my previous post tried to convey that the Arduino board can only control a SPI device through a SPI port, and definitely no SPI control is possible via a UART Port. And this fact applies whether you use ONE OpenRB-150 or TEN of them in your project.

As I don’t know about the actual goals of your project (which I asked about previously), I cannot assess whether using 1 or 2 OpenRB-150s would be appropriate for your project.

A few things I can tell you though:

  • Each OpenRB-150 can use its UART ports (Serial1, Serial2, Serial3 … Serial5) and its SPI port at ANY TIME, but not EXACTLY AT THE SAME TIME, because the MCU on the OpenRB-150 has only one core.

  • So within one iteration of the loop() function, the OpenRB-150 can take care of the DXLs for a short time (a few micro/milli seconds) and only one DXL at a time, then it can switch its attention to monitoring the sensors, and so on… And it can really only monitor ONE sensor at a time too. But as it can execute its loop() function SO FAST, it will look like that it is doing all those tasks simultaneously - but not really.

  • So you are the only one who knows how synchronized all your tasks should be for whatever goals of your project.