PNDEncoderR
Introduction to ABS_EncoderR Parameters
Introduction
The ABS_Encoder is a module that provides end position detection for PNDbotics robot joint actuators. It has a series of functions such as Ethernet or Wi-Fi communication configuration and obtaining absolute angles, providing absolute position information at the joint end for the robot main control.
Application Scenarios
-
Scenario 1: End position detection of robotic arms.
-
Scenario 2: End output shaft position detection of parallel actuators.
-
Scenario 3: End position detection of knee joints of bionic biped robots.
Interface Specifications
Serial Number | Interface Description |
---|---|
A1, A12, B1, B12 | GND |
A4, A9, B4, B9 | VBUS |
A6, B6 | USB differential signal D+, internally connected to USB-to-serial chip |
A7, B7 | USB differential signal D-, internally connected to USB-to-serial chip |
A10 | Ethernet receiving differential signal RX- |
A11 | Ethernet receiving differential signal RX+ |
B2 | Ethernet sending differential signal TX- |
B3 | Ethernet sending differential signal TX+ |
Advanced Features
- Supports the JSON-RPC framework for remote function calls.
- Flexible configuration allows the selection of Ethernet or Wi-Fi communication, with Ethernet communication preferred.
- One Type-C USB interface realizes Ethernet and serial communication.
- OTA upgrade.
Interface Definition
Name | Specs |
---|---|
Physical Layer | 10/100Mbps Ethernet or 2.4GHz Wi-Fi |
Transport Layer Protocol | TCP/UDP |
Communication Port (service) | 2334 |
IP Acquisition Method | DHCP/Static IP |
Application Layer Protocol | JSON-RPC |
Indicator Status Description
Serial Number | Blinking Mode | Meaning |
---|---|---|
1 | Fast purple breathing blinking | Wired Ethernet connection in progress |
2 | Slow purple breathing blinking | Wired Ethernet connection successful |
3 | Fast cyan-blue breathing blinking | Wi-Fi connection in progress |
4 | Slow cyan-blue breathing blinking | Wi-Fi connection successful |
5 | Fast red breathing blinking | Error |
6 | Fast emerald green breathing blinking | OTA upgrade in progress |
JSON-RPC Protocol Framework
JSON-RPC is a stateless and lightweight remote procedure call (RPC) transmission protocol, with JSON as the main format of the transmitted content.
The JSON-RPC protocol framework in this article can use wired 10/100Mbps Ethernet or 2.4GHz Wi-Fi for communication at the physical layer. It supports DHCP function and can automatically obtain IP when connected to a router. Data is communicated using TCP or UDP connection, and the service port is 2334.
In the protocol, the "id" field specifies the sequence number of the call, the "method" field specifies the called method, the "params" field specifies the call parameters, and the "result" field specifies the returned results and parameters.
json-rpc Request Data Frame
Field | Type | Description |
---|---|---|
"id" | Integer | Each request must specify a request frame ID, otherwise it will not be executed. |
"method" | String | Specifies the called method. |
"params" | Object | Call parameters. For each called method, the specific parameter list will be expanded. |
json-rpc Response Data Frame
Field | Type | Description |
---|---|---|
"id" | Integer | The request frame ID specified in each request is returned in the response. |
"result" | Object | Response parameters. For each called method response, the response parameters will be expanded. |
Communication Process
Here, the client represents the user's control computer (such as Raspberry Pi, PC, Mac, etc.), and the server represents the ABS encoder.
Step 1: Obtain device information by broadcasting within the local area network through UDP. After all ABS encoders are connected to the local area network. UDP broadcasting can be used first to obtain the device information of the encoders. The device information contains the IP address of the encoder. The broadcast address is 255.255.255.255 to query all devices within the local area network. After broadcasting, all online devices will return basic device information to the client.
Taking two devices in the local area network as an example:
Step 2: After obtaining the IP address of the ABS encoder, perform data transmission. After obtaining the IP address, you can establish a connection for communication through TCP or maintain UDP communication.
Obtain configuration information
Client sends to the Service port (2334) of the server | |
---|---|
Server returns as follows | |
---|---|
Obtain the absolute angle of the ABS encoder
Client sends to the Service port (2334) of the server | |
---|---|
Server returns as follows | |
---|---|
Set configuration information
The configuration information of the device includes device name, model, production date, hardware version number, Wi-Fi name, Wi-Fi password, host name, whether to enable DHCP, static IP, gateway, DNS, etc. The client can set a certain item individually or set multiple items at the same time. Takes effect after restarting the device.
Client sends to the Service port (2334) of the server | |
---|---|
OTA
After the device receives the OTA instruction, it starts the http upgrade firmware.
Client sends to the Service port (2334) of the server | |
---|---|
Set configuration information
Restart the device
After the device receives the reset request and responds, it waits for one second and then restarts.
Client sends to the Service port (2334) of the server | |
---|---|