Issue:
I am trying to control Four XL430-W250 motors with OpenRB-150controller and 4 as5047p rotation sensors to monitoring the motor motions. But when I connect one sensor with the controller, the initialisation always failed. I used pin connection below.
AS5047P-----open RB 150
GND-----------GND
VDD------------5V
VDD3V--------NC
MOSI----------MOSI (Pin: 8)
MISO----------MISO (Pin: 10)
CLK-------------SCK (Pin: 9)
CSn------------ChipSelectPort (pin:7)
The motors are powered by the external power source with 11.3V and the jumper remain with VIN (DXL).
Is there a specific reason that you are adding in the extra as5047p encoders? DYNAMIXEL servos already include 12bit encoders providing position feedback that can be used to determine motor positon.
Personally, I have used only the SPI port on the OpenRB-150 with an Adadruit BLE device and the Pixy2 Camera and both worked fine for me. So I was curious why do you encounter some problems with it for your application with the AS5047P? And I investigated a little bit and this is what I found out:
Do you happen to use this type of AS5047P device?
When I looked into its data sheet, it can be powered at 5V or at 3.3 V, and you have chosen to use 5V. However the OpenRB-150 is a 3.3V I/O MCU, so I wondered if you had tried to power the AS5047P at 3.3V yet?
The sensors are working well. Thank you for your suggestions. I am now connecting the Four xl430 motors and sensors with single Openr-150 controller. I would like to ask how to use the second serial port to make both motors and sensors working?
You can have a look at the free Kindle sample of my Arduino book, which happens to have a lot of materials regarding using the various UART Ports on the OpenRB-150
In your book, I have checked relative content, if my understanding is correct, to use serial port2 in openrb-150, I will need to solder another 4 pin on the board and attach the BT-410. Is that right?
Many thanks for your advice. But I would like to ask if this is only way to use serial port. My project is trying to build a legged robot and the design has been determined. If the BT-410 is necessary, then I will have to change the design.
Perhaps I should have asked you first about what do you want to use Serial2 for? What kind of information do you want to send through it?
In general, once you download your Arduino sketch to the OpenRB-150, your code will be controlling the DXLs via Serial1 which is routed to the DXL via the X3P connectors. These are DXL communication packets. They are very different from RC-100 packets which are sent via BT-410 from a Remote Controller such as the Physical RC-100 or a Virtual RC-100 that can be set up on a PC or SBC. For example you can send RC-100 packets that contain information about Up button pushes standing for your wanting to make your robot walk forward. Then your Arduino sketch will pick up those RC-100 packets via Serial2 and then match them with a walking motion pattern for the actual DXLs via Serial1. Is this what you want to do?
So , it would be best if you explain to me your overall strategy for how to move the robot. Is it by wired communication or does it have to be wireless? Then I can suggest possible solutions.
Like the title of this post, I’m planning to use Serial2 for handling additional sensors on my OpenRB-150. This will allow me to manage sensor inputs separately from the Dynamixel motor communications on Serial1, avoiding any potential conflicts between the two data streams.
In that case forget about Serial2 or soldering. Read further on in the book regarding how to setup and use Serial3 and Serial4 which are connected to the GPIO Pins.
BT-410 is for Bluetooth Communications between OpenRB-150 and some other computer or with the RC-100 remote controller. What is the other computer in your system? Or do you want to remotely control your robot? From where please specify because the hardware requirement is different for each case.
Previously you said that you wanted to use Serial Ports for sensors only?
Serial2 without BT-410 is just another UART port so it has 3.3V pin and the usual TX, RX and GND Pin. You can just use the Arduino Serial library for it. No need to layer in the RC-100 protocol.